csqueue

package
v1.2.54 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrItIsExists = errors.New("this the id is exists of csqueue")

Functions

func GetQueueLength

func GetQueueLength() int

func Has

func Has(id int64) bool

func In_front

func In_front(id int64) bool

func Length

func Length() int

func Push

func Push(id int64) error

func Remove

func Remove(id int64)

func SetQueueLength

func SetQueueLength(length int)

更新 Redis cs queue length

Types

type QueueImpl

type QueueImpl struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*QueueImpl) AutoExpiredNode added in v1.2.2

func (this *QueueImpl) AutoExpiredNode()

func (*QueueImpl) Has

func (this *QueueImpl) Has(id int64) bool

func (*QueueImpl) In_front

func (this *QueueImpl) In_front(id int64) bool

func (*QueueImpl) Length

func (this *QueueImpl) Length() int

func (*QueueImpl) Push

func (this *QueueImpl) Push(id int64) error

func (*QueueImpl) Remove

func (this *QueueImpl) Remove(id int64)

func (*QueueImpl) Sync

func (this *QueueImpl) Sync()

type QueueInterface

type QueueInterface interface {
	Has(id int64) bool
	In_front(id int64) bool
	Push(id int64) error
	Length() int
	Remove(id int64)
	Sync()
}
var CsQueue QueueInterface

type Userinfo

type Userinfo struct {
	Id                int64
	LatestRequestTime time.Time
}

Jump to

Keyboard shortcuts

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