Documentation ¶
Index ¶
- 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
- func (amc *AlertMuteCacheType) SyncAlertMutes()
- 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
- func (arc *AlertRuleCacheType) SyncAlertRules()
- 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
- func (c *AlertSubscribeCacheType) SyncAlertSubscribes()
- type BusiGroupCacheType
- type DatasourceCacheType
- type NotifyScriptCacheType
- 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
- func (rrc *RecordingRuleCacheType) SyncRecordingRules()
- type Stats
- 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
- func (tc *TargetCacheType) SyncTargets()
- 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
- func (uc *UserCacheType) SyncUsers()
- 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
- func (ugc *UserGroupCacheType) SyncUserGroups()
- type WebhookCacheType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertMuteCacheType ¶
func NewAlertMuteCache ¶
func NewAlertMuteCache(ctx *ctx.Context, stats *Stats) *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 ¶
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
func (*AlertMuteCacheType) SyncAlertMutes ¶
func (amc *AlertMuteCacheType) SyncAlertMutes()
type AlertRuleCacheType ¶
func NewAlertRuleCache ¶
func NewAlertRuleCache(ctx *ctx.Context, stats *Stats) *AlertRuleCacheType
func (*AlertRuleCacheType) GetRuleIds ¶
func (arc *AlertRuleCacheType) GetRuleIds() []int64
func (*AlertRuleCacheType) Reset ¶
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
func (*AlertRuleCacheType) SyncAlertRules ¶
func (arc *AlertRuleCacheType) SyncAlertRules()
type AlertSubscribeCacheType ¶
func NewAlertSubscribeCache ¶
func NewAlertSubscribeCache(ctx *ctx.Context, stats *Stats) *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 ¶
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
func (*AlertSubscribeCacheType) SyncAlertSubscribes ¶
func (c *AlertSubscribeCacheType) SyncAlertSubscribes()
type BusiGroupCacheType ¶
func NewBusiGroupCache ¶
func NewBusiGroupCache(ctx *ctx.Context, stats *Stats) *BusiGroupCacheType
func (*BusiGroupCacheType) GetByBusiGroupId ¶
func (c *BusiGroupCacheType) GetByBusiGroupId(id int64) *models.BusiGroup
func (*BusiGroupCacheType) Set ¶
func (c *BusiGroupCacheType) Set(ugs map[int64]*models.BusiGroup, total, lastUpdated int64)
func (*BusiGroupCacheType) StatChanged ¶
func (c *BusiGroupCacheType) StatChanged(total, lastUpdated int64) bool
func (*BusiGroupCacheType) SyncBusiGroups ¶
func (c *BusiGroupCacheType) SyncBusiGroups()
type DatasourceCacheType ¶
func NewDatasourceCache ¶
func NewDatasourceCache(ctx *ctx.Context, stats *Stats) *DatasourceCacheType
func (*DatasourceCacheType) GetBId ¶
func (d *DatasourceCacheType) GetBId(id int64) *models.Datasource
func (*DatasourceCacheType) Set ¶
func (d *DatasourceCacheType) Set(ds map[int64]*models.Datasource, total, lastUpdated int64)
func (*DatasourceCacheType) StatChanged ¶
func (d *DatasourceCacheType) StatChanged(total, lastUpdated int64) bool
func (*DatasourceCacheType) SyncDatasources ¶
func (d *DatasourceCacheType) SyncDatasources()
type NotifyScriptCacheType ¶
func NewNotifyScript ¶
func NewNotifyScript(ctx *ctx.Context) *NotifyScriptCacheType
func (*NotifyScriptCacheType) GetNotifyScript ¶
func (w *NotifyScriptCacheType) GetNotifyScript() models.NotifyScript
func (*NotifyScriptCacheType) SyncNotifyScript ¶
func (w *NotifyScriptCacheType) SyncNotifyScript()
type RecordingRuleCacheType ¶
func NewRecordingRuleCache ¶
func NewRecordingRuleCache(ctx *ctx.Context, stats *Stats) *RecordingRuleCacheType
func (*RecordingRuleCacheType) Get ¶
func (rrc *RecordingRuleCacheType) Get(ruleId int64) *models.RecordingRule
func (*RecordingRuleCacheType) GetRuleIds ¶
func (rrc *RecordingRuleCacheType) GetRuleIds() []int64
func (*RecordingRuleCacheType) Reset ¶
func (rrc *RecordingRuleCacheType) Reset()
func (*RecordingRuleCacheType) Set ¶
func (rrc *RecordingRuleCacheType) Set(m map[int64]*models.RecordingRule, total, lastUpdated int64)
func (*RecordingRuleCacheType) StatChanged ¶
func (rrc *RecordingRuleCacheType) StatChanged(total, lastUpdated int64) bool
func (*RecordingRuleCacheType) SyncRecordingRules ¶
func (rrc *RecordingRuleCacheType) SyncRecordingRules()
type Stats ¶
type Stats struct { GaugeCronDuration *prometheus.GaugeVec GaugeSyncNumber *prometheus.GaugeVec }
func NewSyncStats ¶
func NewSyncStats() *Stats
type TargetCacheType ¶
1. append note to alert_event 2. append tags to series
func NewTargetCache ¶
func NewTargetCache(ctx *ctx.Context, stats *Stats) *TargetCacheType
func (*TargetCacheType) GetDeads ¶
func (tc *TargetCacheType) GetDeads(actives map[string]struct{}) map[string]*models.Target
func (*TargetCacheType) Reset ¶
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
func (*TargetCacheType) SyncTargets ¶
func (tc *TargetCacheType) SyncTargets()
type UserCacheType ¶
func NewUserCache ¶
func NewUserCache(ctx *ctx.Context, stats *Stats) *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 ¶
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
func (*UserCacheType) SyncUsers ¶
func (uc *UserCacheType) SyncUsers()
type UserGroupCacheType ¶
func NewUserGroupCache ¶
func NewUserGroupCache(ctx *ctx.Context, stats *Stats) *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
func (*UserGroupCacheType) SyncUserGroups ¶
func (ugc *UserGroupCacheType) SyncUserGroups()
type WebhookCacheType ¶
func NewWebhookCache ¶
func NewWebhookCache(ctx *ctx.Context) *WebhookCacheType
func (*WebhookCacheType) GetWebhooks ¶
func (w *WebhookCacheType) GetWebhooks() []*models.Webhook
func (*WebhookCacheType) SyncWebhooks ¶
func (w *WebhookCacheType) SyncWebhooks()
Click to show internal directories.
Click to hide internal directories.