idgen

package
v0.0.0-...-2c5f5e2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen() int64

Types

type Worker

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

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

func NewWorker

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

@desc 初始化一个节点 @auth liuguoqiang 2020-06-16 @param @return

func (*Worker) GetId

func (w *Worker) GetId() int64

@desc 获取id @auth liuguoqiang 2020-06-16 @param @return

func (*Worker) Now

func (w *Worker) Now() int64

@desc 获取当前时间 @auth liuguoqiang 2020-06-16 @param @return

Jump to

Keyboard shortcuts

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