Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustBuildServerURL ¶
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 *rules.Manager
PathPrefix string
// contains filtered or unexported fields
}
AlertsHandler implements http.Handler.
func (*AlertsHandler) ServeHTTP ¶
func (h *AlertsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ConsolesHandler ¶
ConsolesHandler implements http.Handler.
func (*ConsolesHandler) ServeHTTP ¶
func (h *ConsolesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GraphsHandler ¶
type GraphsHandler struct {
PathPrefix string
}
GraphsHandler implements http.Handler.
func (*GraphsHandler) ServeHTTP ¶
func (h *GraphsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PrometheusStatusHandler ¶
type PrometheusStatusHandler struct {
BuildInfo map[string]string
Config string
Flags map[string]string
RuleManager *rules.Manager
TargetPools func() map[string][]*retrieval.Target
Birth time.Time
PathPrefix string
// contains filtered or unexported fields
}
PrometheusStatusHandler implements http.Handler.
func (*PrometheusStatusHandler) ApplyConfig ¶
func (h *PrometheusStatusHandler) ApplyConfig(conf *config.Config)
ApplyConfig updates the status handler's state as the new config requires.
func (*PrometheusStatusHandler) ServeHTTP ¶
func (h *PrometheusStatusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*PrometheusStatusHandler) TargetHealthToClass ¶
func (h *PrometheusStatusHandler) TargetHealthToClass() map[retrieval.TargetHealth]string
TargetHealthToClass returns a map of TargetHealth to the name of a Bootstrap CSS class.
type WebService ¶
type WebService struct {
StatusHandler *PrometheusStatusHandler
MetricsHandler *api.MetricsService
AlertsHandler *AlertsHandler
ConsolesHandler *ConsolesHandler
GraphsHandler *GraphsHandler
QuitChan chan struct{}
}
WebService handles the HTTP endpoints with the exception of /api.
func (WebService) ServeForever ¶
func (ws WebService) ServeForever(pathPrefix string)
ServeForever serves the HTTP endpoints and only returns upon errors.
Click to show internal directories.
Click to hide internal directories.