idgenerator

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Epoch is set to the twitter snowflake epoch of Nov 04 2010 01:42:54 UTC in milliseconds
	// You may customize this to set a different epoch for your application.
	Epoch int64 = 1288834974657
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IdGenerator

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

func MakeGenerator

func MakeGenerator(node string) *IdGenerator

func (*IdGenerator) NextId

func (w *IdGenerator) NextId() int64

Jump to

Keyboard shortcuts

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