regworkerid

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMany

func RegisterMany(conf RegisterConf) []int32

func RegisterOne

func RegisterOne(conf RegisterConf) int32

func UnRegister

func UnRegister()

func Validate

func Validate(workerId int32) int32

Types

type RegisterConf added in v1.3.3

type RegisterConf struct {
	Address         string // 注意:哨兵模式下,这里传入的是 Sentinel 节点,不是 Redis 节点
	Password        string
	DB              int
	MasterName      string // 注意:哨兵模式下,这里必须传入 Sentinel 服务名称
	MaxWorkerId     int32
	MinWorkerId     int32
	TotalCount      int32 // 注意:仅对 RegisterMany 生效
	LifeTimeSeconds int32
}

Jump to

Keyboard shortcuts

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