Documentation
¶
Overview ¶
Package bsdroute implements a producer that utilizes routing information to obtain network interface IP addresses on supported BSD variants.
The package supports any version of Darwin, any version of DragonFly BSD, FreeBSD 7 and above, NetBSD 6 and above, and OpenBSD 5.6 and above.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrPlatformUnsupported = PlatformUnsupportedError{}
Functions ¶
This section is empty.
Types ¶
type PlatformUnsupportedError ¶
type PlatformUnsupportedError struct{}
PlatformUnsupportedError is returned when the platform is not supported by bsdroute.
func (PlatformUnsupportedError) Error ¶
func (PlatformUnsupportedError) Error() string
func (PlatformUnsupportedError) Is ¶
func (PlatformUnsupportedError) Is(target error) bool
type ProducerConfig ¶
type ProducerConfig struct { // Interface is the name of the network interface to monitor. Interface string `json:"interface"` // PollInterval is the interval between polling routing information for interface addresses. // If not positive, it defaults to 90 seconds. PollInterval jsonhelper.Duration `json:"poll_interval"` }
ProducerConfig contains configuration options for the bsdroute producer.
func (*ProducerConfig) NewProducer ¶
NewProducer creates a new producer.Producer that monitors the IP addresses of a network interface.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source obtains the first IPv4 and IPv6 addresses from a network interface, using routing information on supported BSD variants. It only picks the first address of each family.
Source implements producer.Source.