Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsManager ¶
type MetricsManager interface { Start() Destroy() ReportEvent(eventType utils.EventType) ReportFailedEvent() ReportRuleProcessed(ruleID string) ReportRuleAlert(ruleID string) }
MetricsManager is an interface for reporting metrics
type MetricsMock ¶
type MetricsMock struct { FailedEventCounter atomic.Int32 RuleProcessedCounter maps.SafeMap[string, int] RuleAlertCounter maps.SafeMap[string, int] EventCounter maps.SafeMap[utils.EventType, int] }
func NewMetricsMock ¶
func NewMetricsMock() *MetricsMock
func (*MetricsMock) Destroy ¶
func (m *MetricsMock) Destroy()
func (*MetricsMock) ReportEvent ¶
func (m *MetricsMock) ReportEvent(eventType utils.EventType)
func (*MetricsMock) ReportFailedEvent ¶
func (m *MetricsMock) ReportFailedEvent()
func (*MetricsMock) ReportRuleAlert ¶
func (m *MetricsMock) ReportRuleAlert(ruleID string)
func (*MetricsMock) ReportRuleProcessed ¶
func (m *MetricsMock) ReportRuleProcessed(ruleID string)
func (*MetricsMock) Start ¶
func (m *MetricsMock) Start()
Click to show internal directories.
Click to hide internal directories.