Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snowflake ¶
type Snowflake struct {
*snowflakex.Node
// contains filtered or unexported fields
}
Snowflake represents a distributed snowflake ID generator backed by PostgreSQL
func (*Snowflake) Generate ¶
Generate creates and returns a unique snowflake ID It panics if the worker lease has expired to prevent ID collision.
func (*Snowflake) GetWorkerID ¶
GetWorkerID returns the current worker ID
Click to show internal directories.
Click to hide internal directories.