prometrics

package
v0.0.0-...-90deddd Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(reg prometheus.Registerer, gath prometheus.Gatherer, nodeExporterPort int) metrics.Client

NewClient returns a prometheus metrics Client that wraps the existing registry.

Types

type Client

type Client struct {
	// Namespace is given as a prefix to all prometheus metrics.
	Namespace string

	// Port is the port to serve Prometheus metrics. If zero is passed,
	// the metrics HTTP server isn't started.
	Port int

	// NodeExporterPort is the port to serve node_exporter metrics on the
	// reflowlet. If zero is passed, the node_exporter daemon isn't
	// enabled.
	NodeExporterPort int
	// contains filtered or unexported fields
}

func (*Client) Flags

func (r *Client) Flags(flags *flag.FlagSet)

Flags implements infra.Provider.

func (*Client) GetCounter

func (r *Client) GetCounter(name string, labels map[string]string) metrics.Counter

func (*Client) GetGauge

func (r *Client) GetGauge(name string, labels map[string]string) metrics.Gauge

func (*Client) GetHistogram

func (r *Client) GetHistogram(name string, labels map[string]string) metrics.Histogram

func (*Client) Help

func (r *Client) Help() string

Help implements infra.Provider.

func (*Client) Init

func (r *Client) Init() error

Init implements infra.Provider.

func (*Client) String

func (r *Client) String() string

String implements infra.Provider.

Jump to

Keyboard shortcuts

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