xhealth

package
v0.0.0-...-89edfd8 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pinger

type Pinger struct {
	Running  bool
	Monitors map[string]*monitor
}

func New

func New() *Pinger

func (*Pinger) ActiveCount

func (p *Pinger) ActiveCount() int

func (*Pinger) AverageDuration

func (p *Pinger) AverageDuration(name string) time.Duration

func (*Pinger) Callback

func (p *Pinger) Callback(name string, callback func(name string, check int64, status bool, response string))

func (*Pinger) ChangedCallback

func (p *Pinger) ChangedCallback(name string, callback func(name string, check int64, status bool, response string))

func (*Pinger) Count

func (p *Pinger) Count() int

func (*Pinger) GetMonitorNames

func (p *Pinger) GetMonitorNames() []string

func (*Pinger) LastCheck

func (p *Pinger) LastCheck(name string) int64

func (*Pinger) LastDuration

func (p *Pinger) LastDuration(name string) time.Duration

func (*Pinger) LastStatus

func (p *Pinger) LastStatus(name string) bool

func (*Pinger) NewPingMonitor

func (p *Pinger) NewPingMonitor(name, url string, frequency int)

func (*Pinger) NewURLMonitor

func (p *Pinger) NewURLMonitor(name, url string, frequency int)

func (*Pinger) ResolveHost

func (p *Pinger) ResolveHost(name string) (net.IP, error)

func (*Pinger) StartMonitors

func (p *Pinger) StartMonitors()

func (*Pinger) StopMonitors

func (p *Pinger) StopMonitors()

func (*Pinger) TotalChecks

func (p *Pinger) TotalChecks(name string) uint64

func (*Pinger) TotalFails

func (p *Pinger) TotalFails(name string) uint64

func (*Pinger) TotalSuccess

func (p *Pinger) TotalSuccess(name string) uint64

type Type

type Type uint8
const (
	URL Type = 1 + iota
	PING
	CURL
	POST
	CONTENT
)

Jump to

Keyboard shortcuts

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