ids

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDWorker added in v0.3.11

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

func NewIDWorker added in v0.3.11

func NewIDWorker() (*IDWorker, error)

func NewIDWorkerWith added in v0.3.11

func NewIDWorkerWith(workerID, datacenterID int64) (*IDWorker, error)

func (*IDWorker) NextID added in v0.3.11

func (w *IDWorker) NextID() (int64, error)

type SnowflakeID

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

func (*SnowflakeID) Generate

func (s *SnowflakeID) Generate() string

func (*SnowflakeID) Init

func (s *SnowflakeID) Init() error

func (*SnowflakeID) New

func (s *SnowflakeID) New(node int64)

Jump to

Keyboard shortcuts

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