slowid

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkerIdBits = 10
	SequenceBits = 1

	MaxWorkerId = -1 ^ (-1 << WorkerIdBits)
	MaxSequence = -1 ^ (-1 << SequenceBits)
)

Variables

View Source
var (
	Since int64 = time.Date(2014, 11, 1, 0, 0, 0, 0, time.UTC).UnixNano() / 1000000
)

Functions

This section is empty.

Types

type Slowid

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

func NewSlowid

func NewSlowid(workerId int) (*Slowid, error)

func (*Slowid) Next

func (sf *Slowid) Next() (int64, error)

Jump to

Keyboard shortcuts

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