Documentation
¶
Index ¶
- type Options
- type Ping
- func (p *Ping) Run() (chan Response, error)
- func (p *Ping) RunWithContext(ctx context.Context) (chan Response, error)
- func (p *Ping) SetCount(c int)
- func (p *Ping) SetDredge(d bool)
- func (p *Ping) SetForceV4()
- func (p *Ping) SetForceV6()
- func (p *Ping) SetInterval(i string) error
- func (p *Ping) SetPacketSize(s int)
- func (p *Ping) SetPrivilegedICMP(i bool)
- func (p *Ping) SetSrcIPAddr(addr string)
- func (p *Ping) SetStartTime() error
- func (p *Ping) SetTOS(t int) error
- func (p *Ping) SetTTL(t int)
- func (p *Ping) SetTimeout(i string) error
- type Response
- type Summary
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶ added in v0.2.6
type Options struct { Sig string `json:"sig"` Host string `json:"host"` IPv int64 `json:"ipv"` Interval string `json:"interval"` PackageSize int `json:"packageSize"` Count int `json:"count"` Timeout string `json:"timeout"` }
Options struct
type Ping ¶
type Ping struct {
// contains filtered or unexported fields
}
Ping represents ping
func (*Ping) RunWithContext ¶
RunWithContext sends the ICMP message to destination / target with context
func (*Ping) SetInterval ¶
SetInterval sets wait interval between sending each packet
func (*Ping) SetPacketSize ¶
SetPacketSize sets the ICMP packet size
func (*Ping) SetPrivilegedICMP ¶
SetPrivilegedICMP sets privileged raw ICMP or non-privileged datagram-oriented ICMP
func (*Ping) SetSrcIPAddr ¶
SetSrcIPAddr sets the source ip address
func (*Ping) SetStartTime ¶ added in v0.2.6
func (*Ping) SetTimeout ¶
SetTimeout sets wait time for a reply for each packet sent
type Response ¶
type Response struct { IP string `json:"ip"` IcmpReq int `json:"icmp_req"` TTL int `json:"ttl"` Ms float64 `json:"ms"` Err error `json:"err"` }
Response represent ping response
type Summary ¶ added in v0.2.6
type Summary struct { Domain string `json:"domain"` IP string `json:"ip"` Count int `json:"count"` Transmitted int `json:"transmitted"` Received int `json:"received"` RacketlossRate int `json:"racketlossrate"` Avg float64 `json:"avg"` Min float64 `json:"min"` Max float64 `json:"max"` Mdev float64 `json:"mdev"` Timedout bool `json:"timedout"` }
Summary struct
Click to show internal directories.
Click to hide internal directories.