Documentation ¶
Index ¶
- func Hash(ruleId, datasourceId int64, vector common.AnomalyPoint) string
- func TagHash(vector common.AnomalyPoint) string
- type AlertCurEventMap
- func (a *AlertCurEventMap) Delete(key string)
- func (a *AlertCurEventMap) Get(key string) (*models.AlertCurEvent, bool)
- func (a *AlertCurEventMap) GetAll() map[string]*models.AlertCurEvent
- func (a *AlertCurEventMap) Keys() []string
- func (a *AlertCurEventMap) Set(key string, value *models.AlertCurEvent)
- func (a *AlertCurEventMap) SetAll(data map[string]*models.AlertCurEvent)
- func (a *AlertCurEventMap) UpdateLastEvalTime(key string, lastEvalTime int64)
- type EventMuteHookFunc
- type ExternalProcessorsType
- type HandleEventFunc
- type Processor
- func (p *Processor) BuildEvent(anomalyPoint common.AnomalyPoint, from string, now int64) *models.AlertCurEvent
- func (p *Processor) DatasourceId() int64
- func (p *Processor) Handle(anomalyPoints []common.AnomalyPoint, from string, inhibit bool)
- func (p *Processor) HandleRecover(alertingKeys map[string]struct{}, now int64)
- func (p *Processor) Hash() string
- func (p *Processor) Key() string
- func (p *Processor) RecoverAlertCurEventFromDb()
- func (p *Processor) RecoverSingle(hash string, now int64, value *string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TagHash ¶
func TagHash(vector common.AnomalyPoint) string
Types ¶
type AlertCurEventMap ¶
type AlertCurEventMap struct { sync.RWMutex Data map[string]*models.AlertCurEvent }
func NewAlertCurEventMap ¶
func NewAlertCurEventMap(data map[string]*models.AlertCurEvent) *AlertCurEventMap
func (*AlertCurEventMap) Delete ¶
func (a *AlertCurEventMap) Delete(key string)
func (*AlertCurEventMap) Get ¶
func (a *AlertCurEventMap) Get(key string) (*models.AlertCurEvent, bool)
func (*AlertCurEventMap) GetAll ¶
func (a *AlertCurEventMap) GetAll() map[string]*models.AlertCurEvent
func (*AlertCurEventMap) Keys ¶
func (a *AlertCurEventMap) Keys() []string
func (*AlertCurEventMap) Set ¶
func (a *AlertCurEventMap) Set(key string, value *models.AlertCurEvent)
func (*AlertCurEventMap) SetAll ¶
func (a *AlertCurEventMap) SetAll(data map[string]*models.AlertCurEvent)
func (*AlertCurEventMap) UpdateLastEvalTime ¶
func (a *AlertCurEventMap) UpdateLastEvalTime(key string, lastEvalTime int64)
type EventMuteHookFunc ¶
type EventMuteHookFunc func(event *models.AlertCurEvent) bool
type ExternalProcessorsType ¶
var ExternalProcessors ExternalProcessorsType
func NewExternalProcessors ¶
func NewExternalProcessors() *ExternalProcessorsType
func (*ExternalProcessorsType) GetExternalAlertRule ¶
func (e *ExternalProcessorsType) GetExternalAlertRule(datasourceId, id int64) (*Processor, bool)
type HandleEventFunc ¶
type HandleEventFunc func(event *models.AlertCurEvent)
type Processor ¶
type Processor struct { TargetCache *memsto.TargetCacheType BusiGroupCache *memsto.BusiGroupCacheType Stats *astats.Stats HandleFireEventHook HandleEventFunc HandleRecoverEventHook HandleEventFunc EventMuteHook EventMuteHookFunc // contains filtered or unexported fields }
func NewProcessor ¶
func NewProcessor(rule *models.AlertRule, datasourceId int64, atertRuleCache *memsto.AlertRuleCacheType, targetCache *memsto.TargetCacheType, busiGroupCache *memsto.BusiGroupCacheType, alertMuteCache *memsto.AlertMuteCacheType, datasourceCache *memsto.DatasourceCacheType, ctx *ctx.Context, stats *astats.Stats) *Processor
func (*Processor) BuildEvent ¶
func (p *Processor) BuildEvent(anomalyPoint common.AnomalyPoint, from string, now int64) *models.AlertCurEvent
func (*Processor) DatasourceId ¶
func (*Processor) Handle ¶
func (p *Processor) Handle(anomalyPoints []common.AnomalyPoint, from string, inhibit bool)
func (*Processor) HandleRecover ¶
func (*Processor) RecoverAlertCurEventFromDb ¶
func (p *Processor) RecoverAlertCurEventFromDb()
Click to show internal directories.
Click to hide internal directories.