Versions in this module Expand all Collapse all v1 v1.1.0 Mar 8, 2021 Changes in this version + const BitLenMachineID + const BitLenSequence + const BitLenShardID + const BitLenTime + type Settings struct + CheckMachineID func(uint16) bool + MachineID func() (uint16, error) + ShardID func() (uint16, error) + StartTime time.Time + type SnoyflakeIDInfo struct + ID int64 + MSB int64 + MachineID uint16 + Sequence uint8 + ShardID uint8 + Time int32 + func Decompose(id uint64) SnoyflakeIDInfo + type Sonyflake struct + func NewSonyflake(st Settings) *Sonyflake + func (sf *Sonyflake) NextID() (uint64, error)