metrics

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	// TotalRefusedRequests is the total number of refused requests.
	TotalRefusedRequest int64
	RuleGroup           string
	RuleID              string
	Action              string
}

type MetricDetails

type MetricDetails struct {
	TotalRefusedRequests int64
}

type MetricHub

type MetricHub struct {
	// TotalRefusedRequests is the total number of refused requests.
	TotalRefusedRequests *prometheus.CounterVec
	// contains filtered or unexported fields
}

Metrics defines the interface for WAF metrics.

func NewMetrics

func NewMetrics(spec *supervisor.Spec) *MetricHub

func (*MetricHub) Close

func (m *MetricHub) Close()

func (*MetricHub) GetStats

func (m *MetricHub) GetStats() []*MetricStats

func (*MetricHub) Update

func (m *MetricHub) Update(metric *Metric)

type MetricLabels

type MetricLabels struct {
	RuleGroup string
	RuleID    string
	Action    string
}

type MetricStats

type MetricStats struct {
	MetricLabels  `json:",inline"`
	MetricDetails `json:",inline"`
}

Jump to

Keyboard shortcuts

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