SnowFlake

package
v1.1.156 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

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

定义一个woker工作节点所需要的基本参数

func NewWorker

func NewWorker(workerId int64) (*Worker, error)

func (*Worker) GetId

func (w *Worker) GetId() int64

接下来我们开始生成id 生成方法一定要挂载在某个woker下,这样逻辑会比较清晰 指定某个节点生成id

Jump to

Keyboard shortcuts

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