telemetry

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeMetricName

func SanitizeMetricName(metricName string) string

Types

type PrometheusCollector

type PrometheusCollector struct {
	sync.Mutex

	Record chan WorkerStats
	// contains filtered or unexported fields
}

func InitTelemetryServer

func InitTelemetryServer(config *pkgconfig.Config, logger *logger.Logger) (*http.Server, *PrometheusCollector, chan error)

func NewPrometheusCollector

func NewPrometheusCollector(config *pkgconfig.Config) *PrometheusCollector

func (*PrometheusCollector) Collect

func (t *PrometheusCollector) Collect(ch chan<- prometheus.Metric)

func (*PrometheusCollector) Describe

func (t *PrometheusCollector) Describe(ch chan<- *prometheus.Desc)

func (*PrometheusCollector) GetWorkerStats added in v1.2.0

func (t *PrometheusCollector) GetWorkerStats(workerName string) (WorkerStats, bool)

func (*PrometheusCollector) Stop

func (t *PrometheusCollector) Stop()

func (*PrometheusCollector) UpdateStats

func (t *PrometheusCollector) UpdateStats()

type WorkerStats

type WorkerStats struct {
	Name                 string
	TotalIngress         int
	TotalEgress          int
	TotalForwardedPolicy int
	TotalDroppedPolicy   int
	TotalDiscarded       int
}

Jump to

Keyboard shortcuts

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