Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EtcdKeyPrefix = "/seaweedfs" EtcdKeySequence = "/master/sequence" EtcdContextTimeoutSecond = 100 * time.Second DefaultEtcdSteps uint64 = 500 // internal counter SequencerFileName = "sequencer.dat" FileMaxSequenceLength = 128 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdSequencer ¶
type EtcdSequencer struct {
// contains filtered or unexported fields
}
func NewEtcdSequencer ¶
func NewEtcdSequencer(etcdUrls string, metaFolder string) (*EtcdSequencer, error)
func (*EtcdSequencer) GetMax ¶
func (es *EtcdSequencer) GetMax() uint64
func (*EtcdSequencer) NextFileId ¶
func (es *EtcdSequencer) NextFileId(count uint64) uint64
func (*EtcdSequencer) Peek ¶
func (es *EtcdSequencer) Peek() uint64
func (*EtcdSequencer) SetMax ¶
func (es *EtcdSequencer) SetMax(seenValue uint64)
* instead of collecting the max value from volume server, the max value should be saved in local config file and ETCD cluster
type MemorySequencer ¶
type MemorySequencer struct {
// contains filtered or unexported fields
}
just for testing
func NewMemorySequencer ¶
func NewMemorySequencer() (m *MemorySequencer)
func (*MemorySequencer) NextFileId ¶
func (m *MemorySequencer) NextFileId(count uint64) uint64
func (*MemorySequencer) Peek ¶
func (m *MemorySequencer) Peek() uint64
func (*MemorySequencer) SetMax ¶
func (m *MemorySequencer) SetMax(seenValue uint64)
Click to show internal directories.
Click to hide internal directories.