snowflakex

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSnowFlake

func InitSnowFlake(workerId int64)

Types

type Snow

type Snow struct {
	sync.Mutex
	WorkerId  int64 // 机器号,0~1023
	TimeStamp int64 // 时间戳
	Sequence  int64 // 序列号
}
var NewSnow *Snow

func (*Snow) NewId

func (snow *Snow) NewId() int64

Jump to

Keyboard shortcuts

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