idgenerator

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDGenerator added in v1.2.5

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

IDGenerator generates unique uint64 ID using snowflake algorithm

func MakeGenerator

func MakeGenerator(node string) *IDGenerator

MakeGenerator creates a new IDGenerator

func (*IDGenerator) NextID added in v1.2.5

func (w *IDGenerator) NextID() int64

NextID returns next unique ID

Jump to

Keyboard shortcuts

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