results

package
v0.0.0-...-fa55b32 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const StatusFailed = 0

StatusFailed indicates that the monitor ran, but the conditions of the monitor indicate a failure

View Source
const StatusFatal = -1

StatusFatal means there was a serious problem in running the monitor

View Source
const StatusOK = 1

StatusOK indicates that the monitor ran, and the conditions were OK

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Status    int
	Timestamp int64
	Metrics   map[string]interface{}
	Errors    []string
}

Result of a monitor run

func NewResult

func NewResult() Result

NewResult creates a new Result struct

func (*Result) AddError

func (r *Result) AddError(err string)

AddError is a convenience method for adding errors to the result

func (*Result) AddFloat

func (r *Result) AddFloat(name string, value float64)

AddMetric is a convenience method for adding metrics to the result

func (*Result) Fail

func (r *Result) Fail(err string)

Fail is a convenience method for failing this result

func (*Result) Fatal

func (r *Result) Fatal(err string)

Fatal is a convenience method for setting this result as fatal

Jump to

Keyboard shortcuts

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