Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageStruct ¶
type MessageStruct struct {
MessagePositive, MessageNegative string
SkipReachableMessageOut, SkipUnreachableMessageOut bool
}
MessageStruct - holds all relevant information about passed message details.
type Target ¶
type Target struct {
Address, Filepath string
Count, TTL, Size int
Timeout, Interval time.Duration
Privileged, Stdout bool
PacketLossThreshold float64
Message MessageStruct
}
Target - holds pro-bing ("github.com/prometheus-community/pro-bing") parameters enriched with Message details and other.
func (Target) IsTargetReachable ¶
IsTargetReachable - returns true or false based if the PacketLossThreshold has been breached.
func (Target) Out ¶
Out - determines if and what message should be printed, either to standard output or to the file specified in the filepath.
func (Target) PingIt ¶
func (t Target) PingIt() (stats *probing.Statistics, err error)
PingIt - creates a NawPinger, sets various parameters for it and returns statistics gathered. Writes ping details to standard output.
func (*Target) SetExtendedDefaults ¶
func (t *Target) SetExtendedDefaults()
SetExtendedDefaults - extends default MessagePositive and MessageNegative with Address if no custom message value was specified.