health

package
v0.0.0-...-22c38b1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2018 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	OK  = "ok"
	BAD = "bad"
)

HealthCheck status

Variables

This section is empty.

Functions

func RandomStagger

func RandomStagger(intv time.Duration) time.Duration

Returns a random stagger interval between 0 and the duration

Types

type Check

type Check interface {
	Init(updateCh chan bool, dst types.Destination)
	Start()
	Stop()
	GetId() string
	GetStatus() string
}

type CheckTCP

type CheckTCP struct {
	Spec          types.CheckSpec
	DestinationID string
	Status        string
	// contains filtered or unexported fields
}

func (*CheckTCP) GetId

func (c *CheckTCP) GetId() string

func (*CheckTCP) GetStatus

func (c *CheckTCP) GetStatus() string

func (*CheckTCP) Init

func (c *CheckTCP) Init(updateCh chan bool, dst types.Destination)

Start is used to start a TCP check. The check runs until stop is called

func (*CheckTCP) Start

func (c *CheckTCP) Start()

func (*CheckTCP) Stop

func (c *CheckTCP) Stop()

type DestinationID

type DestinationID string

type FusisMonitor

type FusisMonitor struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*FusisMonitor) FilterHealthy

func (m *FusisMonitor) FilterHealthy(s state.State) state.State

func (*FusisMonitor) Start

func (m *FusisMonitor) Start(changesCh chan bool)

func (*FusisMonitor) UpdateChecks

func (m *FusisMonitor) UpdateChecks(s state.State)

type HealthMonitor

type HealthMonitor interface {
	Start(changesCh chan bool)
	UpdateChecks(s state.State)
	FilterHealthy(state state.State) state.State
}

func NewMonitor

func NewMonitor(store store.Store) HealthMonitor

type ServiceID

type ServiceID string

type Status

type Status string

Jump to

Keyboard shortcuts

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