hc

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MaximumConcurrency = 2048

MaximumConcurrency of hc is used to avoid unexpected large number of hosts resulting in huge number of goroutines. Observed that number of hosts in prod env are almost all less than one thousand, we arbitrarily choose 2048 for MaximumConcurrency as the upperbound.

Variables

This section is empty.

Functions

func MinInt

func MinInt(x, y int) int

MinInt returns minimum of x and y

Types

type Monitor

type Monitor struct {
	// contains filtered or unexported fields
}

Monitor monitors the health state of hosts.

func NewMonitor

func NewMonitor(config *hc.HealthCheck, hostSet *hostpkg.Set, logger log.Logger) (*Monitor, error)

NewMonitor creates a health monitor.

func (*Monitor) ResetHealthCheck

func (m *Monitor) ResetHealthCheck(config *hc.HealthCheck) error

ResetHealthCheck resets the health check configurations.

func (*Monitor) Start

func (m *Monitor) Start()

Start starts the monitor.

func (*Monitor) Stop

func (m *Monitor) Stop()

Stop stops the monitor.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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