idworker

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 6 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 NewWorkerWithRedis

func NewWorkerWithRedis(r *redis.RedisClient, appName string) (*Worker, error)

func (*Worker) GetId

func (w *Worker) GetId() string

* @desc 获取id @auth jerry.shi 2021-05-24

func (*Worker) GetIdWithPrefix

func (w *Worker) GetIdWithPrefix(prefix string) string

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