cache

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StraMap = &SafeStraMap{M: make(map[string]map[string][]*model.Stra)}
)

Functions

This section is empty.

Types

type SafeJudgeQueue

type SafeJudgeQueue struct {
	sync.RWMutex
	Data map[string]*list.SafeListLimited
	Ts   map[string]int64
}

func NewJudgeQueue

func NewJudgeQueue() SafeJudgeQueue

func (*SafeJudgeQueue) Clean

func (s *SafeJudgeQueue) Clean()

func (*SafeJudgeQueue) Del

func (s *SafeJudgeQueue) Del(instance string)

func (*SafeJudgeQueue) Exists

func (s *SafeJudgeQueue) Exists(instance string) bool

func (*SafeJudgeQueue) Get

func (s *SafeJudgeQueue) Get(instance string) (*list.SafeListLimited, bool)

func (*SafeJudgeQueue) GetAll

func (s *SafeJudgeQueue) GetAll() map[string]*list.SafeListLimited

func (*SafeJudgeQueue) Set

func (s *SafeJudgeQueue) Set(instance string, q *list.SafeListLimited)

func (*SafeJudgeQueue) UpdateTS

func (s *SafeJudgeQueue) UpdateTS(instance string)

type SafeStraMap

type SafeStraMap struct {
	sync.RWMutex
	M map[string]map[string][]*model.Stra
}

func (*SafeStraMap) GetAll

func (s *SafeStraMap) GetAll() []*model.Stra

func (*SafeStraMap) GetByKey

func (s *SafeStraMap) GetByKey(key string) []*model.Stra

func (*SafeStraMap) ReInit

func (s *SafeStraMap) ReInit(m map[string]map[string][]*model.Stra)

Jump to

Keyboard shortcuts

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