//
pkg.gl
Category
github.com/fynxiu/go-common
snowflake
package
0.0.10
Repository:
https://github.com/fynxiu/go-common.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
5
Dependents
0
Files
142 SLOC
#
Functions
Decompose
Decompose returns a set of Snowflake ID parts.
NewSnowflake
NewSnowflake returns a new Snowflake configured with the given Settings.
#
Constants
BitLenMachineID
bit length of machine id.
BitLenSequence
bit length of sequence number.
BitLenTime
bit length of time.
#
Structs
Settings
Settings configures Snowflake: StartTime is the time since which the Snowflake time is defined as the elapsed time.
Snowflake
Snowflake is a distributed unique ID generator.