Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckGroup ¶
Group combines multiple checks together and stores the results
type ICMPCheck ¶
type ICMPCheck struct {
Host string
}
Checks the availabilty of a host using `ping`
type Printer ¶
type Printer struct {
Output io.Writer
Verbose bool
ConsecutiveFailures int
Streak map[string]*Streak
}
Printer provides snazzy result printing
type Result ¶
type Result struct {
// Time denotes the time the check completed
Done time.Time
// Took contains how long it took
Took time.Duration
// Okay is true if the check succeeded
Okay bool
// Consecutive is the number of results that came before with the same
// result, including this one (i.e., it starts at 1).
Consecutive int
// Duration since the last time the result changed to ok, or from ok.
Duration time.Duration
// Hints contains a textual representation of the result
Hints []string
// Target identifies the target this result was run on
Target *Target
}
Result contains the details of a check
type Target ¶
type Target struct {
// ID is the unique name or address of the target
ID string
// Label is an optional identifier
Label string
// Address points at the address of the host
Host string
// Check that determines whether the target is online
Check Check
}
Target points at a single host that needs to be checked for packetloss
type Watch ¶
type Watch struct {
Targets []string
NoTCP bool
NoICMP bool
Verbose bool
Timeout int
Interval int
Port int
}
func (*Watch) ParseAddress ¶
ParseAddress takes a target without label, and returns the host and the port it includes, if given.
func (*Watch) ParseTargets ¶
Click to show internal directories.
Click to hide internal directories.