Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAlert ¶
MakeAlert creates an Alert based on the type of the service (eg Pager Duty) and its corresponding API key.
func MakeMetricsEndpoint ¶
func MakeMetricsEndpoint(path string, metrics Metrics, authLevel networking.AuthLevel) (networking.Endpoint, error)
MakeMetricsEndpoint creates an Endpoint for the monitoring server with the desired auth level. The endpoint's response is always a JSON dump of the provided metrics.
Types ¶
type Metrics ¶
type Metrics interface {
UpdateMetrics(metrics map[string]interface{})
MarshalJSON() ([]byte, error)
}
Metrics is an interface that allows a client to pass in key value pairs (keys must be strings) and it can dump the metrics as JSON.
func MakeMetricsRecorder ¶
MakeMetricsRecorder makes a metrics recorder with the records map as the underlying map. If records is nil, then an empty map will be initialized for you.