check

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(checks ...Check)

Execute execute the given checks

Types

type BaseCheck

type BaseCheck struct {
	MessageOK      string
	MessageNOK     string
	StateMetric    *prometheus.GaugeVec
	DurationMetric *prometheus.GaugeVec
	// contains filtered or unexported fields
}

BaseCheck basic check functionality

func (*BaseCheck) ReportResults

func (c *BaseCheck) ReportResults(result []interface{}, err error, duration float64, values ...string)

ReportResults report the check results

func (*BaseCheck) Setup

func (c *BaseCheck) Setup(ok string, nok string, metricName string, metricHelp string, labels ...string)

Setup setup the check

func (*BaseCheck) ToResult

func (c *BaseCheck) ToResult(values ...interface{}) []interface{}

ToResult maps to interface array

type Check

type Check interface {
	Execute() ([]interface{}, error)
	Report(result []interface{}, err error, duration float64)
}

Check interface for checks

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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