You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
323 B
19 lines
323 B
package sequence
|
|
|
|
import ()
|
|
|
|
// just for testing
|
|
type MemorySequencer struct {
|
|
counter uint64
|
|
}
|
|
|
|
func NewMemorySequencer() (m *MemorySequencer) {
|
|
m = &MemorySequencer{counter: 1}
|
|
return
|
|
}
|
|
|
|
func (m *MemorySequencer) NextFileId(count int) (uint64, int) {
|
|
ret := m.counter
|
|
m.counter += uint64(count)
|
|
return ret, count
|
|
}
|