Documentation ¶
Index ¶
Constants ¶
View Source
const ( HostIDBits = 8 TimeBits = 48 IncrementorBits = 8 )
bit counts.
Variables ¶
This section is empty.
Functions ¶
func GenShort ¶
func GenShort() int64
GenShort returns a 64 bit id. The first 8 bits are from the server id The next 48 bits are from the timestamp with microsecond precision The last 8 bits are from an incrementor
func HostID ¶
func HostID() int64
HostID returns the host ID for the current machine. The first bit is always 0
func ShortTimeReset ¶
ShortTimeReset the current bounds of validity for timestamps extracted from shorts
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.