Versions in this module Expand all Collapse all v0 v0.3.19 Dec 28, 2023 v0.3.18 Dec 13, 2023 Changes in this version + func GetIPWorkerID(ip string) int + func GetLocalIP() string + func GetRandWorkerID() int + func HashWorkerID(data []byte) int + func SetEpoch(t time.Time) + func SetNodeBit(nodeBits uint8) + func SetStepBit(stepBits uint8) + type Node struct + func NewNode(nodeID int) (*Node, error) + func NewNodeWithDefault() (*Node, error) + func NewNodeWithIP(ip string) (*Node, error) + func (n *Node) GenerateID() snowflake.ID + func (n *Node) GenerateInt() int + func (n *Node) GenerateString() string + func (n *Node) GetNodeID() int