monitoring

package
v0.0.0-...-16cb735 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCheck

func NewCheck(checkName string, options map[string]interface{}) (core.Check, error)

NewCheck creates a new check for a service by name

Types

type Monitor

type Monitor struct {

	// Id is an identifier of the monitor, unique for the service
	Id string
	// Name of the monitor
	Name string
	// Description of the monitor
	Description string
	// Check is the check performed by the monitor
	Check core.Check
	// Service is the service the check is performed on
	Service *Service
	// contains filtered or unexported fields
}

Monitor is a service monitor

func (*Monitor) Stop

func (monitor *Monitor) Stop(wg *sync.WaitGroup)

Stop stops the monitor, blocking until it's stopped

func (*Monitor) Watch

func (monitor *Monitor) Watch(updates chan *MonitorStatus) error

Watch watches a monitor for changes which are published on the given channel

type MonitorStatus

type MonitorStatus struct {
	Err     error
	Status  Status
	Monitor *Monitor
}

MonitorStatus is a status update from a monitor

type Service

type Service struct {
	// Id is an identifier of the monitor, unique for all services
	Id string
	// Name of the monitor
	Name string
	// Description of the monitor
	Description string
	// Origin is the node from which this service is configured
	Origin string
}

Service is a monitored service

type Status

type Status core.Status
const (
	StatusUp Status = iota
	StatusTransitioningUp
	StatusTransitioningDown
	StatusDown
	StatusUnknown
)

func (Status) String

func (status Status) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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