monitoring

package
v3.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(cfg config.Configuration, cc *api.Client)

Start allows to instantiate a default Monitoring Manager and to start monitoring checks

func Stop

func Stop()

Stop allows to stop managing monitoring checks

Types

type Check

type Check struct {
	ID           string
	TCPAddress   string
	TimeInterval time.Duration
	Report       CheckReport
	// contains filtered or unexported fields
}

Check represents a registered check

func NewCheck

func NewCheck(deploymentID, nodeName, instance string) *Check

NewCheck allows to instantiate a Check

func NewCheckFromID

func NewCheckFromID(checkID string) (*Check, error)

NewCheckFromID allows to instantiate a new Check from an pre-existing ID

func (*Check) Start

func (c *Check) Start()

Start allows to start running a TCP check

func (*Check) Stop

func (c *Check) Stop()

Stop allows to stop a TCP check

type CheckFilterFunc

type CheckFilterFunc func(CheckReport) bool

CheckFilterFunc defines a filter function for CheckReport

type CheckReport

type CheckReport struct {
	DeploymentID string
	NodeName     string
	Instance     string
	Status       CheckStatus
}

CheckReport represents a node check report including its status

type CheckStatus

type CheckStatus int

CheckStatus x ENUM( PASSING, CRITICAL )

const (
	// PASSING is the status of a passing check
	PASSING CheckStatus = iota
	// CRITICAL is the status of a critical check
	CRITICAL
)
const (
	// CheckStatusPASSING is a CheckStatus of type PASSING
	CheckStatusPASSING CheckStatus = iota
	// CheckStatusCRITICAL is a CheckStatus of type CRITICAL
	CheckStatusCRITICAL
)

func ParseCheckStatus

func ParseCheckStatus(name string) (CheckStatus, error)

ParseCheckStatus attempts to convert a string to a CheckStatus

func (CheckStatus) String

func (x CheckStatus) String() string

String implements the Stringer interface.

Jump to

Keyboard shortcuts

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