web

package
v0.0.0-...-f2052c9 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2014 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustBuildServerURL

func MustBuildServerURL() string

MustBuildServerURL returns the server URL and panics in case an error occurs.

Types

type AlertStatus

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 AlertsHandler

type AlertsHandler struct {
	RuleManager manager.RuleManager
	// contains filtered or unexported fields
}

AlertsHandler implements http.Handler.

func (*AlertsHandler) ServeHTTP

func (h *AlertsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ConsolesHandler

type ConsolesHandler struct {
	Storage local.Storage
}

ConsolesHandler implements http.Handler.

func (*ConsolesHandler) ServeHTTP

func (h *ConsolesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PrometheusStatusHandler

type PrometheusStatusHandler struct {
	BuildInfo   map[string]string
	Config      string
	Flags       map[string]string
	RuleManager manager.RuleManager
	TargetPools map[string]*retrieval.TargetPool

	Birth time.Time
	// contains filtered or unexported fields
}

PrometheusStatusHandler implements http.Handler.

func (*PrometheusStatusHandler) ServeHTTP

type WebService

type WebService struct {
	StatusHandler   *PrometheusStatusHandler
	MetricsHandler  *api.MetricsService
	AlertsHandler   *AlertsHandler
	ConsolesHandler *ConsolesHandler

	QuitDelegate func()
}

WebService handles the HTTP endpoints with the exception of /api.

func (WebService) ServeForever

func (ws WebService) ServeForever() error

ServeForever serves the HTTP endpoints and only returns upon errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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