utils

package
Version: v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	START_EPOCH     int64 = 1571385784722
	MACHINE_LEN     uint8 = 10
	SEQ_LEN         uint8 = 12
	TIMESTAMP_SHIFS uint8 = 22
	MAX_MACHINE_NUM int64 = 1023
	MAX_SEQ_NUM     int64 = 4095
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalIdGen

type GlobalIdGen struct {
	MachineId int64
	// contains filtered or unexported fields
}

func NewGlobalIdGen

func NewGlobalIdGen(machineId int64) (*GlobalIdGen, error)

func (*GlobalIdGen) GetId

func (gi *GlobalIdGen) GetId() int64

Source Files

Jump to

Keyboard shortcuts

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