Documentation
¶
Overview ¶
Package idgenerator provides distributed unique ID generation using the Snowflake algorithm. It supports multiple worker instances with configurable worker IDs to ensure globally unique 64-bit integers across distributed systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIdGenerator ¶
NewIdGenerator creates a new ID generator instance with the specified worker ID. Each worker should have a unique ID to ensure global uniqueness across multiple instances. Returns a function that generates new unique IDs when called.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.