prometheus

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package prometheus provides a prometheus exporter.

Package prometheus provides a prometheus exporter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prometheus

type Prometheus interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context)
	Exporter() *prometheus.Exporter
	NewHTTPHandler() http.Handler
}

func Exporter

func Exporter() (Prometheus, error)

func New

func New(opts ...PrometheusOption) (Prometheus, error)

type PrometheusOption

type PrometheusOption func(*prometheusOptions) error

func WithEndpoint

func WithEndpoint(ep string) PrometheusOption

func WithNamespace

func WithNamespace(ns string) PrometheusOption

func WithOnErrorFunc added in v0.0.24

func WithOnErrorFunc(f func(error)) PrometheusOption

Jump to

Keyboard shortcuts

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