metricsmanager

package
v0.2.210 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL