Versions in this module Expand all Collapse all v0 v0.5.0 Dec 23, 2022 Changes in this version + func NewSequence(generator *config.SequenceGenerator, tableName string) (proto.SequenceGenerator, error) + type SegmentConfig struct + DSN string + From int64 + Step int64 + type SegmentWorker struct + func NewSegmentWorker(dsn string, from, len int64, biz string) (*SegmentWorker, error) + func (w *SegmentWorker) NextID() (int64, error) + func (w *SegmentWorker) ProduceID() + type SnowflakeConfig struct + WorkerID int64 + type SnowflakeWorker struct + func NewWorker(id int64) (*SnowflakeWorker, error) + func (w *SnowflakeWorker) NextID() (int64, error)