monitor

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

Monitor is the empty structure to be used for starting up the monitor health check and prometheus metrics http endpoints.

func NewMonitor

func NewMonitor() *Monitor

NewMonitor returns a Monitor structure which is used to bring up the monitor health check and prometheus metrics http endpoints.

func (*Monitor) MonitorHandler

func (m *Monitor) MonitorHandler(w http.ResponseWriter, r *http.Request)

MonitorHandler is the handler function for the /health-check monitor endpoint. It displays the JSON Marshal'd output of all the various configuration options that buter gets started with, and some run time information

func (*Monitor) Start

func (m *Monitor) Start()

Start turns up the http server for monitoring butler.

func (*Monitor) Stop

func (m *Monitor) Stop() error

func (*Monitor) Update

func (m *Monitor) Update(bc *config.ButlerConfig)

func (*Monitor) WithOpts

func (m *Monitor) WithOpts(opts *MonitorOpts) *Monitor

type MonitorOpts

type MonitorOpts struct {
	Version string
	Config  *config.ButlerConfig
}

type MonitorOutput

type MonitorOutput struct {
	ConfigPath       string                `json:"config-path"`
	ConfigScheme     string                `json:"config-scheme"`
	RetrieveInterval int                   `json:"retrieve-interval"`
	LogLevel         log.Level             `json:"log-level"`
	ConfigSettings   config.ConfigSettings `json:"config-settings"`
	Version          string                `json:"version"`
}

MonitorOutput is the structure which holds the formatting which is output to the health check monitor. When /health-check is hit, it returns this structure, which is then Marshal'd to json and provided back to the end user

Jump to

Keyboard shortcuts

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