adding etcd storage support for cluster meta data. Currently just

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

No files matched your search

+19
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
}