idgen

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 4 Imported by: 0

README

idgen

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewToken

func NewToken() string

Creates a new, random token.

func NextID

func NextID(nodeID int64) int64

NextID can generate ~1M ints per second for a given nodeID.

nodeID must be less than 64.

func SplitID

func SplitID(id int64) (unixTime, nodeID, counter int64)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL