metrics

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithMetric

func WithMetric(m ApiMetric) func(http.Handler) http.Handler

Types

type ApiMetric

type ApiMetric interface {
	AddResponse(method string, responseCode int, requestSize int64, responseSize int64, responseTime float64)
}

type Config

type Config struct {
	EnableMetrics   bool
	MetricsProvider string
}

type JobMetric

type JobMetric interface {
	AddStartedJob(string, string)
	AddCompletedJob(string, string, bool)
}

type MetricProvider

type MetricProvider interface {
	NewApiMetric(handlerName string) ApiMetric
	NewJobMetric(queue string) JobMetric
	MetricsHandler() http.Handler
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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