generator

package
v0.0.0-...-12f838c Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimestampOffset        = 25
	CurrencyBound          = 1024
	CurrencyMask    uint64 = 0x3FF
)

Variables

This section is empty.

Functions

func Gen

func Gen(prod int32) (uint64, *errors.RuntimeError)

func InitIdGenerator

func InitIdGenerator(idc uint64, workerID uint64) error

func MultiGen

func MultiGen(prod int32, count uint32) (lowerUid, upperUid uint64,
	realCount uint32, err *errors.RuntimeError)

Types

type IDGenerator

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

Jump to

Keyboard shortcuts

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