Documentation
¶
Index ¶
Constants ¶
View Source
const TaskName = "ICMP_TASK"
Variables ¶
This section is empty.
Functions ¶
func NewTaskFromBytes ¶
NewTaskFromBytes used in sensor for building the task from the received bytes
func NewTaskFromModel ¶
NewTaskFromModel used in scheduler for building the task from the db model task
Types ¶
type IcmpPingResult ¶
type IcmpPingResult struct { IPAddr net.IP Sequence int BytesWritten int BytesRead int RTT time.Duration Error error }
IcmpPingResult represents a single completed ping
type IcmpPingStats ¶
type IcmpPingStats struct { IPAddr net.IP PacketsSent int PacketsReceived int BytesWritten int BytesRead int TotalRTT time.Duration MinRTT time.Duration MaxRTT time.Duration AverageRTT time.Duration Loss float64 FailureMessages []string }
IcmpPingResult represents a completed ping with stats FailureMessages represents all errors that occurred during the ICMP task. TODO add mdev
type Opts ¶
type Opts struct { // TargetDomain is not required TargetDomain string `json:"TargetDomain"` TargetIPs []net.IP `json:"TargetIPs"` Count int `json:"Count"` Payload []byte `json:"Payload"` }
Opts defines the parameter payload to call PingHost Since we have pointer parameters, the struct should be also passed by pointer to avoid nasty bugs due to struct value copy
Click to show internal directories.
Click to hide internal directories.