adapterprom

package
v0.0.0-...-863c642 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPMux

type HTTPMux interface {
	Handle(path string, handler http.Handler)
}

type Opts

type Opts struct {
	StoragePath string

	Logger log.Logger

	Reg prometheus.Registerer

	// engine config
	MaxSamples       int
	QueryTimeout     time.Duration
	QueryConcurrency int
	LookbackDelta    time.Duration

	// api config
	CORSOrigin *regexp.Regexp
}

Opts set options for prometheus adapter

func DefaultOpts

func DefaultOpts(storagePath string) *Opts

DefaultOpts creates default options from storage path.

func (*Opts) RegisterV1API

func (o *Opts) RegisterV1API(prefix string, mux HTTPMux) error

NewV1API creates and registers prometheus v1 api handler.

Jump to

Keyboard shortcuts

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