Versions in this module Expand all Collapse all v1 v1.0.1 Sep 25, 2022 Changes in this version + const BitLenMachineID + const BitLenSequence + const BitLenTime + func Decompose(id uint64) map[string]uint64 + func ElapsedTime(id uint64) time.Duration + func MachineID(id uint64) uint64 + func SequenceNumber(id uint64) uint64 + type Settings struct + CheckMachineID func(uint16) bool + MachineID func() (uint16, error) + StartTime time.Time + type Sonyflake struct + func NewSonyflake(st Settings) *Sonyflake + func (sf *Sonyflake) NextID() (uint64, error)