store

package
v0.0.0-...-7e42109 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCustomGenerator

func InitCustomGenerator(cusGen Generator)

InitCustomGenerator if you give a custom generator, it will be used to generate id and not check worker number format anymore

func InitFlakeGenerator

func InitFlakeGenerator(machineId uint16)

InitFlakeGenerator

func IsCustomGenerator

func IsCustomGenerator() bool

IsCustomGenerator returns whether the custom generator is initialized.

func NextID

func NextID() uint64

NextID

func NextStringID

func NextStringID() string

NextStringID

Types

type Generator

type Generator interface {
	NextID() (uint64, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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