prometheus

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Listen    string
	Namespace string
	Subsystem string
	Cert      string
	Key       string
	Cacert    string
}

Configuration the configuration for prometheus

type Prometheus

type Prometheus struct {
	Config   *Configuration
	Logger   *zap.Logger
	Registry *prom.Registry
}

Prometheus contains the prometheus registry and config

func New

func New() (*Prometheus, error)

New creates a new Prometheus component

func (*Prometheus) Handler

func (p *Prometheus) Handler() http.Handler

Handler returns the handler for the prometheus component

func (*Prometheus) Register

func (p *Prometheus) Register(collector prom.Collector) error

Register adds a metric to the component

func (*Prometheus) Unregister

func (p *Prometheus) Unregister(collector prom.Collector)

Unregister removes a metric from the component

Jump to

Keyboard shortcuts

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