exporter

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultServer

func NewDefaultServer(x *Exporter) *http.Server

Types

type Config

type Config struct {
	StartFile        string
	EndFile          string
	Listen           string
	PromEndpoint     string
	HealthEndpoint   string
	LivenessEndpoint string
	HealthTimeout    time.Duration
	LivenessTimeout  time.Duration
	Welpenschutz     time.Duration
	DirectoryTimeout time.Duration
	Namespace        string
	Subsystem        string
	LogJSON          bool
	Debug            bool
}

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

func NewExporter

func NewExporter(c *Config) *Exporter

func NewExporterWithLogger

func NewExporterWithLogger(c *Config, logger Logger) *Exporter

func (*Exporter) PromHandler

func (x *Exporter) PromHandler(w http.ResponseWriter, r *http.Request)

PromHandler updates update_age just before handling scrape

func (*Exporter) WrapPromHandler

func (x *Exporter) WrapPromHandler(handler http.Handler)

type Logger

type Logger interface {
	Fatalf(format string, args ...interface{})
	Fatal(v ...interface{})
	Fatalln(v ...interface{})
	Printf(format string, args ...interface{})
}

Jump to

Keyboard shortcuts

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