Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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)
type SnowflakeSequencer ¶
type SnowflakeSequencer struct {
// contains filtered or unexported fields
}
a simple snowflake Sequencer
func NewSnowflakeSequencer ¶
func NewSnowflakeSequencer(nodeid string, snowflakeId int) (*SnowflakeSequencer, error)
func (*SnowflakeSequencer) NextFileId ¶
func (m *SnowflakeSequencer) NextFileId(count uint64) uint64
func (*SnowflakeSequencer) Peek ¶
func (m *SnowflakeSequencer) Peek() uint64
return a new id as no Peek is stored
func (*SnowflakeSequencer) SetMax ¶
func (m *SnowflakeSequencer) SetMax(seenValue uint64)
ignore setmax as we are snowflake
Click to show internal directories.
Click to hide internal directories.