memsto

package
v5.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlertMuteCache = AlertMuteCacheType{
	// contains filtered or unexported fields
}
View Source
var AlertRuleCache = AlertRuleCacheType{
	// contains filtered or unexported fields
}
View Source
var AlertSubscribeCache = AlertSubscribeCacheType{
	// contains filtered or unexported fields
}
View Source
var BusiGroupCache = BusiGroupCacheType{
	// contains filtered or unexported fields
}
View Source
var LogSampleCache = LogSampleCacheType{
	// contains filtered or unexported fields
}
View Source
var RecordingRuleCache = RecordingRuleCacheType{
	// contains filtered or unexported fields
}
View Source
var TargetCache = TargetCacheType{
	// contains filtered or unexported fields
}

init TargetCache

View Source
var UserCache = UserCacheType{
	// contains filtered or unexported fields
}
View Source
var UserGroupCache = UserGroupCacheType{
	// contains filtered or unexported fields
}

Functions

func Sync

func Sync()

func SyncAlertMutes

func SyncAlertMutes()

func SyncAlertRules

func SyncAlertRules()

func SyncAlertSubscribes

func SyncAlertSubscribes()

func SyncBusiGroups added in v5.5.0

func SyncBusiGroups()

func SyncRecordingRules added in v5.9.5

func SyncRecordingRules()

func SyncTargets

func SyncTargets()

func SyncUserGroups

func SyncUserGroups()

func SyncUsers

func SyncUsers()

Types

type AlertMuteCacheType

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

func (*AlertMuteCacheType) GetAllStructs

func (amc *AlertMuteCacheType) GetAllStructs() map[int64][]models.AlertMute

func (*AlertMuteCacheType) Gets

func (amc *AlertMuteCacheType) Gets(bgid int64) ([]*models.AlertMute, bool)

func (*AlertMuteCacheType) Reset added in v5.11.0

func (amc *AlertMuteCacheType) Reset()

func (*AlertMuteCacheType) Set

func (amc *AlertMuteCacheType) Set(ms map[int64][]*models.AlertMute, total, lastUpdated int64)

func (*AlertMuteCacheType) StatChanged

func (amc *AlertMuteCacheType) StatChanged(total, lastUpdated int64) bool

type AlertRuleCacheType

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

func (*AlertRuleCacheType) Get

func (arc *AlertRuleCacheType) Get(ruleId int64) *models.AlertRule

func (*AlertRuleCacheType) GetRuleIds

func (arc *AlertRuleCacheType) GetRuleIds() []int64

func (*AlertRuleCacheType) Reset added in v5.11.0

func (arc *AlertRuleCacheType) Reset()

func (*AlertRuleCacheType) Set

func (arc *AlertRuleCacheType) Set(m map[int64]*models.AlertRule, total, lastUpdated int64)

func (*AlertRuleCacheType) StatChanged

func (arc *AlertRuleCacheType) StatChanged(total, lastUpdated int64) bool

type AlertSubscribeCacheType

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

func (*AlertSubscribeCacheType) Get

func (*AlertSubscribeCacheType) GetStructs

func (c *AlertSubscribeCacheType) GetStructs(ruleId int64) []models.AlertSubscribe

func (*AlertSubscribeCacheType) Reset added in v5.11.0

func (c *AlertSubscribeCacheType) Reset()

func (*AlertSubscribeCacheType) Set

func (c *AlertSubscribeCacheType) Set(m map[int64][]*models.AlertSubscribe, total, lastUpdated int64)

func (*AlertSubscribeCacheType) StatChanged

func (c *AlertSubscribeCacheType) StatChanged(total, lastUpdated int64) bool

type BusiGroupCacheType added in v5.5.0

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

func (*BusiGroupCacheType) GetByBusiGroupId added in v5.5.0

func (c *BusiGroupCacheType) GetByBusiGroupId(id int64) *models.BusiGroup

func (*BusiGroupCacheType) Set added in v5.5.0

func (c *BusiGroupCacheType) Set(ugs map[int64]*models.BusiGroup, total, lastUpdated int64)

func (*BusiGroupCacheType) StatChanged added in v5.5.0

func (c *BusiGroupCacheType) StatChanged(total, lastUpdated int64) bool

type LogSampleCacheType added in v5.14.2

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

func (*LogSampleCacheType) Clean added in v5.14.2

func (l *LogSampleCacheType) Clean()

func (*LogSampleCacheType) Get added in v5.14.2

func (l *LogSampleCacheType) Get() map[string]map[string]struct{}

func (*LogSampleCacheType) Len added in v5.14.2

func (l *LogSampleCacheType) Len() int

func (*LogSampleCacheType) Set added in v5.14.2

func (l *LogSampleCacheType) Set(m map[string][]string)

type RecordingRuleCacheType added in v5.9.5

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

func (*RecordingRuleCacheType) Get added in v5.9.5

func (*RecordingRuleCacheType) GetRuleIds added in v5.9.5

func (rrc *RecordingRuleCacheType) GetRuleIds() []int64

func (*RecordingRuleCacheType) Reset added in v5.11.0

func (rrc *RecordingRuleCacheType) Reset()

func (*RecordingRuleCacheType) Set added in v5.9.5

func (rrc *RecordingRuleCacheType) Set(m map[int64]*models.RecordingRule, total, lastUpdated int64)

func (*RecordingRuleCacheType) StatChanged added in v5.9.5

func (rrc *RecordingRuleCacheType) StatChanged(total, lastUpdated int64) bool

type TargetCacheType

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

1. append note to alert_event 2. append tags to series

func (*TargetCacheType) Get

func (tc *TargetCacheType) Get(ident string) (*models.Target, bool)

func (*TargetCacheType) GetDeads

func (tc *TargetCacheType) GetDeads(actives map[string]struct{}) map[string]*models.Target

func (*TargetCacheType) Reset added in v5.11.0

func (tc *TargetCacheType) Reset()

func (*TargetCacheType) Set

func (tc *TargetCacheType) Set(m map[string]*models.Target, total, lastUpdated int64)

func (*TargetCacheType) StatChanged

func (tc *TargetCacheType) StatChanged(total, lastUpdated int64) bool

type UserCacheType

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

func (*UserCacheType) GetByUserId

func (uc *UserCacheType) GetByUserId(id int64) *models.User

func (*UserCacheType) GetByUserIds

func (uc *UserCacheType) GetByUserIds(ids []int64) []*models.User

func (*UserCacheType) GetMaintainerUsers added in v5.9.2

func (uc *UserCacheType) GetMaintainerUsers() []*models.User

func (*UserCacheType) Set

func (uc *UserCacheType) Set(m map[int64]*models.User, total, lastUpdated int64)

func (*UserCacheType) StatChanged

func (uc *UserCacheType) StatChanged(total, lastUpdated int64) bool

type UserGroupCacheType

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

func (*UserGroupCacheType) GetByUserGroupId

func (ugc *UserGroupCacheType) GetByUserGroupId(id int64) *models.UserGroup

func (*UserGroupCacheType) GetByUserGroupIds

func (ugc *UserGroupCacheType) GetByUserGroupIds(ids []int64) []*models.UserGroup

func (*UserGroupCacheType) Set

func (ugc *UserGroupCacheType) Set(ugs map[int64]*models.UserGroup, total, lastUpdated int64)

func (*UserGroupCacheType) StatChanged

func (ugc *UserGroupCacheType) StatChanged(total, lastUpdated int64) bool

Jump to

Keyboard shortcuts

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