Documentation ¶
Index ¶
- type ActionsAPI
- type Option
- func Count(count int) Option
- func DestinationHostNameA(hostname string) Option
- func DestinationHostNameAAAA(hostname string) Option
- func DestinationIP(ipAddr net.IP) Option
- func InstanceName(instanceName string) Option
- func Interval(interval time.Duration) Option
- func Size(size int) Option
- func SourceIP(ipAddress net.IP) Option
- func SourceInterface(name string) Option
- func TTL(ttl int) Option
- type Ping
- func (p *Ping) Count() int
- func (p *Ping) DestinationHostNameA() string
- func (p *Ping) DestinationHostNameAAAA() string
- func (p *Ping) DestinationIP() net.IP
- func (p *Ping) Interval() time.Duration
- func (p *Ping) Size() int
- func (p *Ping) SourceIP() net.IP
- func (p *Ping) SourceInterface() string
- func (p *Ping) TTL() int
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionsAPI ¶
type ActionsAPI interface {
Ping(ctx context.Context, localVarOptionals *state.ActionsApiPingOpts) (state.PingStatus, *http.Response, error)
}
type Option ¶
Option applies a ping command argument
func DestinationHostNameA ¶
DestinationHostNameA sets the destination hostname that shall be translated to an IPv4 address (DNS A record)
func DestinationHostNameAAAA ¶
DestinationHostNameAAAA sets the destination hostname that shall be translated to an IPv6 address (DNS AAAA record)
func DestinationIP ¶
DestinationIP sets the ping destination IP address. Override destination host name settings, if any.
func InstanceName ¶
InstanceName sets the routing instance name to run the ping command.
func Interval ¶
Interval sets the interval between two pings. The accepted interval range is between 1ms and 10 seconds.
func Size ¶ added in v1.1.0
Size sets the ping packet size in bytes. The size must be between 8 and 32768 bytes.
func SourceInterface ¶
SourceInterface sets the ping source interface name. Source interface and source IP are mutual exclusive!
type Ping ¶
type Ping struct {
// contains filtered or unexported fields
}
Ping contains all arguments to ping a destination IP address or hostname
func (*Ping) DestinationHostNameA ¶
func (*Ping) DestinationHostNameAAAA ¶
func (*Ping) DestinationIP ¶
func (*Ping) SourceInterface ¶
type Service ¶
type Service interface { // Run executes the given ping. Run(rbfs.RbfsContext, *Ping) (state.PingStatus, error) // RunAll runs all given pings in parallel go routines. RunAll(rbfs.RbfsContext, ...*Ping) ([]state.PingStatus, error) }
Service pings given destinations.
func NewPingService ¶
NewPingService creates a new ping defaultService.