Documentation ¶
Index ¶
- Variables
- func Sync()
- func SyncAlertMutes()
- func SyncAlertRules()
- func SyncAlertSubscribes()
- func SyncBusiGroups()
- func SyncRecordingRules()
- func SyncTargets()
- func SyncUserGroups()
- func SyncUsers()
- type AlertMuteCacheType
- func (amc *AlertMuteCacheType) GetAllStructs() map[int64][]models.AlertMute
- func (amc *AlertMuteCacheType) Gets(bgid int64) ([]*models.AlertMute, bool)
- func (amc *AlertMuteCacheType) Reset()
- func (amc *AlertMuteCacheType) Set(ms map[int64][]*models.AlertMute, total, lastUpdated int64)
- func (amc *AlertMuteCacheType) StatChanged(total, lastUpdated int64) bool
- type AlertRuleCacheType
- func (arc *AlertRuleCacheType) Get(ruleId int64) *models.AlertRule
- func (arc *AlertRuleCacheType) GetRuleIds() []int64
- func (arc *AlertRuleCacheType) Reset()
- func (arc *AlertRuleCacheType) Set(m map[int64]*models.AlertRule, total, lastUpdated int64)
- func (arc *AlertRuleCacheType) StatChanged(total, lastUpdated int64) bool
- type AlertSubscribeCacheType
- func (c *AlertSubscribeCacheType) Get(ruleId int64) ([]*models.AlertSubscribe, bool)
- func (c *AlertSubscribeCacheType) GetStructs(ruleId int64) []models.AlertSubscribe
- func (c *AlertSubscribeCacheType) Reset()
- func (c *AlertSubscribeCacheType) Set(m map[int64][]*models.AlertSubscribe, total, lastUpdated int64)
- func (c *AlertSubscribeCacheType) StatChanged(total, lastUpdated int64) bool
- type BusiGroupCacheType
- type LogSampleCacheType
- type RecordingRuleCacheType
- func (rrc *RecordingRuleCacheType) Get(ruleId int64) *models.RecordingRule
- func (rrc *RecordingRuleCacheType) GetRuleIds() []int64
- func (rrc *RecordingRuleCacheType) Reset()
- func (rrc *RecordingRuleCacheType) Set(m map[int64]*models.RecordingRule, total, lastUpdated int64)
- func (rrc *RecordingRuleCacheType) StatChanged(total, lastUpdated int64) bool
- type TargetCacheType
- func (tc *TargetCacheType) Get(ident string) (*models.Target, bool)
- func (tc *TargetCacheType) GetDeads(actives map[string]struct{}) map[string]*models.Target
- func (tc *TargetCacheType) Reset()
- func (tc *TargetCacheType) Set(m map[string]*models.Target, total, lastUpdated int64)
- func (tc *TargetCacheType) StatChanged(total, lastUpdated int64) bool
- type UserCacheType
- func (uc *UserCacheType) GetByUserId(id int64) *models.User
- func (uc *UserCacheType) GetByUserIds(ids []int64) []*models.User
- func (uc *UserCacheType) GetMaintainerUsers() []*models.User
- func (uc *UserCacheType) Set(m map[int64]*models.User, total, lastUpdated int64)
- func (uc *UserCacheType) StatChanged(total, lastUpdated int64) bool
- type UserGroupCacheType
- func (ugc *UserGroupCacheType) GetByUserGroupId(id int64) *models.UserGroup
- func (ugc *UserGroupCacheType) GetByUserGroupIds(ids []int64) []*models.UserGroup
- func (ugc *UserGroupCacheType) Set(ugs map[int64]*models.UserGroup, total, lastUpdated int64)
- func (ugc *UserGroupCacheType) StatChanged(total, lastUpdated int64) bool
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 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()
Types ¶
type AlertMuteCacheType ¶
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 ¶
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 ¶
func (*AlertSubscribeCacheType) Get ¶
func (c *AlertSubscribeCacheType) Get(ruleId int64) ([]*models.AlertSubscribe, bool)
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
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
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
func (*RecordingRuleCacheType) Get ¶ added in v5.9.5
func (rrc *RecordingRuleCacheType) Get(ruleId int64) *models.RecordingRule
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 ¶
1. append note to alert_event 2. append tags to series
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 ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.