Documentation
¶
Overview ¶
Package ipaddr provides an ip address polling test utilizing the `ip` Unix command.
Index ¶
- Constants
- type IPAddr
- func (i *IPAddr) Args() []string
- func (i *IPAddr) GetIPv4Address() string
- func (i *IPAddr) GetIdentifier() identifier.Identifier
- func (i *IPAddr) ReelEOF()
- func (i *IPAddr) ReelFirst() *reel.Step
- func (i *IPAddr) ReelMatch(pattern, _, match string) *reel.Step
- func (i *IPAddr) ReelTimeout() *reel.Step
- func (i *IPAddr) Result() int
- func (i *IPAddr) Timeout() time.Duration
Constants ¶
View Source
const ( // DeviceDoesNotExistRegex matches `ip addr` output when the given device does not exist. DeviceDoesNotExistRegex = `(?m)Device \"(\w+)\" does not exist.$` // SuccessfulOutputRegex matches `ip addr` output for a given device, and provides grouping to extract the associated Ipv4 address. SuccessfulOutputRegex = `` /* 173-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPAddr ¶
type IPAddr struct {
// contains filtered or unexported fields
}
IPAddr provides an ip addr test implemented using command line tool `ip addr`.
func (*IPAddr) GetIPv4Address ¶
GetIPv4Address returns the extracted IPv4 address for the given device (interface).
func (*IPAddr) GetIdentifier ¶
func (i *IPAddr) GetIdentifier() identifier.Identifier
GetIdentifier returns the tnf.Test specific identifier.
func (*IPAddr) ReelEOF ¶
func (i *IPAddr) ReelEOF()
ReelEOF does nothing; no intervention is needed for `ip addr` EOF.
func (*IPAddr) ReelFirst ¶
ReelFirst returns a step which expects an ip summary for the given device.
func (*IPAddr) ReelMatch ¶
ReelMatch parses the ip addr output and set the test result on match. Returns no step; the test is complete.
func (*IPAddr) ReelTimeout ¶
ReelTimeout does nothing; no intervention is needed for `ip addr` timeout.
Click to show internal directories.
Click to hide internal directories.