web

package
v2.0.0-beta.3+incompat... Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2017 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertStatus added in v1.0.0

type AlertStatus struct {
	AlertingRules        []*rules.AlertingRule
	AlertStateToRowClass map[rules.AlertState]string
}

AlertStatus bundles alerting rules and the mapping of alert states to row classes.

type Handler

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

Handler serves various HTTP endpoints of the Prometheus server

func New

func New(o *Options) *Handler

New initializes a new web Handler.

func (*Handler) ApplyConfig

func (h *Handler) ApplyConfig(conf *config.Config) error

ApplyConfig updates the config field of the Handler struct

func (*Handler) Quit

func (h *Handler) Quit() <-chan struct{}

Quit returns the receive-only quit channel.

func (*Handler) Ready added in v1.8.0

func (h *Handler) Ready()

Ready sets Handler to be ready.

func (*Handler) Reload

func (h *Handler) Reload() <-chan chan error

Reload returns the receive-only channel that signals configuration reload requests.

func (*Handler) Run

func (h *Handler) Run(ctx context.Context) error

Run serves the HTTP endpoints.

type Options

type Options struct {
	Context       context.Context
	Storage       *tsdb.DB
	QueryEngine   *promql.Engine
	TargetManager *retrieval.TargetManager
	RuleManager   *rules.Manager
	Notifier      *notifier.Notifier
	Version       *PrometheusVersion
	Flags         map[string]string

	ListenAddress        string
	ReadTimeout          time.Duration
	MaxConnections       int
	ExternalURL          *url.URL
	RoutePrefix          string
	MetricsPath          string
	UseLocalAssets       bool
	UserAssetsPath       string
	ConsoleTemplatesPath string
	ConsoleLibrariesPath string
	EnableLifecycle      bool
	EnableAdminAPI       bool
}

Options for the web Handler.

type PrometheusVersion

type PrometheusVersion struct {
	Version   string `json:"version"`
	Revision  string `json:"revision"`
	Branch    string `json:"branch"`
	BuildUser string `json:"buildUser"`
	BuildDate string `json:"buildDate"`
	GoVersion string `json:"goVersion"`
}

PrometheusVersion contains build information about Prometheus.

Directories

Path Synopsis
api
v1
v2

Jump to

Keyboard shortcuts

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