Documentation ¶
Index ¶
- type Dispatcher
- func (d *Dispatcher) AddAlertSource(source *alert.SourceFrom, enricher *enrich.AlertEnricher)
- func (d *Dispatcher) AddOrUpdateAlertSourceRule(source alert.SourceFrom, enricher *enrich.AlertEnricher)
- func (d *Dispatcher) DeleteAlertSource(source *alert.AlertSource)
- func (d *Dispatcher) DispatchEvents(source alert.SourceFrom, events []alert.AlertEvent) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct { // SourceID -> *AlertSourceEnricher EnricherMap sync.Map // SourceName -> *AlertSourceEnricher SourceName2EnricherMap sync.Map }
func (*Dispatcher) AddAlertSource ¶
func (d *Dispatcher) AddAlertSource( source *alert.SourceFrom, enricher *enrich.AlertEnricher, )
func (*Dispatcher) AddOrUpdateAlertSourceRule ¶
func (d *Dispatcher) AddOrUpdateAlertSourceRule( source alert.SourceFrom, enricher *enrich.AlertEnricher, )
AddOrUpdateAlertSourceRule
func (*Dispatcher) DeleteAlertSource ¶
func (d *Dispatcher) DeleteAlertSource( source *alert.AlertSource, )
func (*Dispatcher) DispatchEvents ¶
func (d *Dispatcher) DispatchEvents( source alert.SourceFrom, events []alert.AlertEvent, ) error
type Service ¶
type Service interface { CreateAlertSource(source *alert.AlertSource) (*alert.AlertSource, error) GetAlertSource(source *alert.SourceFrom) (*alert.AlertSource, error) UpdateAlertSource(source *alert.AlertSource) (*alert.AlertSource, error) DeleteAlertSource(source alert.SourceFrom) (*alert.AlertSource, error) ListAlertSource() ([]alert.AlertSource, error) UpdateAlertEnrichRule(*alert.AlerEnrichRuleConfigRequest) error GetAlertEnrichRule(sourceID string) ([]alert.AlertEnrichRuleVO, error) ProcessAlertEvents(source alert.SourceFrom, data []byte) error GetAlertEnrichRuleTags() ([]alert.TargetTag, error) CreateSchema(req *alert.CreateSchemaRequest) error DeleteSchema(schema string) error ListSchema() ([]string, error) ListSchemaColumns(schema string) ([]string, error) UpdateSchemaData(req *alert.UpdateSchemaDataRequest) error CheckSchemaIsUsed(schema string) ([]string, error) GetSchemaData(schema string) ([]string, map[int64][]string, error) CreateCluster(cluster *alert.Cluster) error ListCluster() ([]alert.Cluster, error) UpdateCluster(cluster *alert.Cluster) error DeleteCluster(cluster *alert.Cluster) error GetDefaultAlertEnrichRule(sourceType string) (string, []alert.AlertEnrichRuleVO) ClearDefaultAlertEnrichRule(sourceType string) (bool, error) SetDefaultAlertEnrichRule(sourceType string, tagEnrichRules []alert.AlertEnrichRuleVO) error }
func New ¶
func New( promRepo prometheus.Repo, dbRepo database.Repo, chRepo clickhouse.Repo, ) Service
Source Files ¶
Click to show internal directories.
Click to hide internal directories.