Documentation ¶
Index ¶
- Constants
- func BinIPv4Address2String(ipBin BinIPv4Address) string
- type BinIPv4Address
- type Config
- type IcmpResult
- type IcmpResultType
- type Info
- type Pinger
- func (thisPinger *Pinger) AddTarget(ipAddress string, comment string) error
- func (thisPinger *Pinger) GetChIcmpResult(cap int) <-chan IcmpResult
- func (thisPinger *Pinger) GetIcmpID() int
- func (thisPinger *Pinger) GetInfo() Info
- func (thisPinger *Pinger) GetSuccessCounts() SuccessCounts
- func (thisPinger *Pinger) Run(ctx context.Context) error
- func (thisPinger *Pinger) SetLogEnableLevel(targetLevelFlgs labelinglog.LogLevel) error
- func (thisPinger *Pinger) SetLogWriter(targetLevelFlgs labelinglog.LogLevel, writer io.Writer) error
- type SuccessCounts
Constants ¶
View Source
const ( IcmpResultUnknown = IcmpResultType(iota) IcmpResultTypeReceive IcmpResultTypeReceiveAfterTimeout IcmpResultTypeTTLExceeded IcmpResultTypeTimeout )
IcmpResultType a
Variables ¶
This section is empty.
Functions ¶
func BinIPv4Address2String ¶
func BinIPv4Address2String(ipBin BinIPv4Address) string
BinIPv4Address2String a
Types ¶
type BinIPv4Address ¶
type BinIPv4Address uint32
BinIPv4Address a
func NetIP2BinIPv4Address ¶
func NetIP2BinIPv4Address(ip net.IP) BinIPv4Address
NetIP2BinIPv4Address a
type Config ¶
type Config struct { DebugEnable bool `json:"DebugEnable"` DebugPrintIntervalSec int64 `json:"DebugPrintInterval"` SourceIPAddress string `json:"SourceIPAddress"` StartSendIcmpSmoothing bool `json:"StartSendIcmpSmoothing"` IntervalMillisec int64 `json:"IntervalMillisec"` TimeoutMillisec int64 `json:"TimeoutMillisec"` MaxWorkers int64 `json:"MaxWorkers"` StatisticsCountsNum int64 `json:"StatisticsCountsNum"` }
Config a
type IcmpResult ¶
type IcmpResult struct { ResultType IcmpResultType IcmpTargetID BinIPv4Address BinPeerIP BinIPv4Address Seq int SendTimeUnixNanosec int64 ReceiveTimeUnixNanosec int64 }
IcmpResult a
type Info ¶
type Info struct { IcmpID int Targets map[BinIPv4Address]struct { IPAddress string Comment string } TargetsOrder []BinIPv4Address StatisticsCountsNum int64 IntervalMillisec int64 TimeoutMillisec int64 TimeouterCounter int64 ResultDropCounter int64 }
Info a
type Pinger ¶
type Pinger struct {
// contains filtered or unexported fields
}
Pinger is Pinger
func (*Pinger) GetChIcmpResult ¶
func (thisPinger *Pinger) GetChIcmpResult(cap int) <-chan IcmpResult
GetChIcmpResult a
func (*Pinger) GetSuccessCounts ¶
func (thisPinger *Pinger) GetSuccessCounts() SuccessCounts
GetSuccessCounts a
func (*Pinger) SetLogEnableLevel ¶
func (thisPinger *Pinger) SetLogEnableLevel(targetLevelFlgs labelinglog.LogLevel) error
SetLogEnableLevel a
func (*Pinger) SetLogWriter ¶
func (thisPinger *Pinger) SetLogWriter(targetLevelFlgs labelinglog.LogLevel, writer io.Writer) error
SetLogWriter a
Click to show internal directories.
Click to hide internal directories.