metrics

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusOption

type PrometheusOption func(*prometheusServer)

PrometheusOption defines a functional option type for the Prometheus webserver config.

func PrometheusPath

func PrometheusPath(path string) PrometheusOption

PrometheusPath is a functional option for setting the Prometheus webserver metrics path. Defaults to "/metrics".

func PrometheusPort

func PrometheusPort(port int) PrometheusOption

PrometheusPort is a functional option for setting the Prometheus webserver listening port. Default to 9990.

type Server

type Server interface {
	Run() error
	Stop(context.Context) error
}

func NewPrometheusServer

func NewPrometheusServer(opts ...PrometheusOption) Server

NewPrometheusServer returns a metrics.Server that, when run, exposes an endpoint with Prometheus-specific metrics.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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