yunque

package
v0.0.0-...-560c451 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisClient *redis.Client

Functions

func ClosePing

func ClosePing(uid int64)

func CreateCloseSign

func CreateCloseSign(uid int64)

func CreateNewSessionSign

func CreateNewSessionSign(uid int64)

func CsQueueLen

func CsQueueLen() int

获取任务队列长度

func EnCsQueue

func EnCsQueue() (int64, bool)

获取一个待命 uid

func GetCloseSessionSign

func GetCloseSessionSign(uid int64) bool

func GetNewSessionSign

func GetNewSessionSign(uid int64) bool

捕获分配 session 信号

func InitRedisConfig

func InitRedisConfig(host, password string, DB int) error

func JoinCsQueue

func JoinCsQueue(uid int64)

加入任务队列

func MD5

func MD5(str string) string

func Ping

func Ping(uid int64)

设置心态时间

func PintOut

func PintOut() []int64

Types

type Display

type Display struct {
}

func (*Display) DeQueue

func (d *Display) DeQueue(queuename string) (value string, ok bool, err error)

func (*Display) EnQueue

func (d *Display) EnQueue(queuename, value string) error

func (*Display) InQueue

func (d *Display) InQueue(queuename, value string) (ok bool, err error)

func (*Display) Len

func (d *Display) Len(queuename string) (len int, err error)

type Queue

type Queue interface {
	EnQueue(queuename, value string) error
	DeQueue(queuename string) (value string, ok bool, err error)
	InQueue(queuename, value string) (ok bool, err error)
	Len(queuename string) (len int, err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳