snowflake

package
v0.0.0-...-b289748 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SnowFlake

type SnowFlake struct {
	// contains filtered or unexported fields
}

SnowFlake is a structure which holds snowflake-specific data.

func NewSnowFlake

func NewSnowFlake(workerId uint32) (*SnowFlake, error)

NewSnowFlake initializes the generator.

func (*SnowFlake) Next

func (sf *SnowFlake) Next() (uint64, error)

Next generates the next unique ID.

Jump to

Keyboard shortcuts

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