adding etcd storage support for cluster meta data. Currently just

sequence. More to come...
This commit is contained in:
Chris Lu
2013-11-10 01:31:50 -08:00
parent 5cb6590eae
commit 1888d01fa0
12 changed files with 149 additions and 56 deletions

View File

@@ -0,0 +1,19 @@
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
}