cache

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetricHistory *history // history.go

Functions

func Init

func Init(ctx context.Context) error

func NewHistory

func NewHistory() *history

Types

type CollectRuleCache

type CollectRuleCache struct {
	sync.RWMutex
	*config.CollectRuleSection
	Data map[int64]*models.CollectRule
	TS   map[int64]int64
	C    chan time.Time
	// contains filtered or unexported fields
}
var CollectRule *CollectRuleCache // collectrule.go

func NewCollectRuleCache

func NewCollectRuleCache(cf *config.CollectRuleSection) *CollectRuleCache

func (*CollectRuleCache) Clean

func (p *CollectRuleCache) Clean()

func (*CollectRuleCache) Get

func (p *CollectRuleCache) Get(id int64) (*models.CollectRule, bool)

func (*CollectRuleCache) GetAll

func (p *CollectRuleCache) GetAll() []*models.CollectRule

func (*CollectRuleCache) Set

func (p *CollectRuleCache) Set(id int64, rule *models.CollectRule)

Jump to

Keyboard shortcuts

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