mcache

package
v0.0.0-...-b6b44b4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type MaskCacheMap

type MaskCacheMap struct {
	Data map[string][]string
}

MaskCacheMap 给alarm用,判断告警事件是否被屏蔽 key是'${metric}#${endpoint},value是list, 每一条是屏蔽策略中配置的tags,比如service=x,module=y

var MaskCache *MaskCacheMap

func NewMaskCache

func NewMaskCache() *MaskCacheMap

func (*MaskCacheMap) GetByKey

func (mc *MaskCacheMap) GetByKey(key string) ([]string, bool)

func (*MaskCacheMap) SetAll

func (mc *MaskCacheMap) SetAll(m map[string][]string)

type StraCacheMap

type StraCacheMap struct {
	sync.RWMutex
	Data map[int64]*model.Stra
}

StraCacheMap 给alarm用

var StraCache *StraCacheMap

func NewStraCache

func NewStraCache() *StraCacheMap

func (*StraCacheMap) GetById

func (sc *StraCacheMap) GetById(id int64) (*model.Stra, bool)

func (*StraCacheMap) SetAll

func (sc *StraCacheMap) SetAll(m map[int64]*model.Stra)

Jump to

Keyboard shortcuts

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