interpoller

package module
v0.0.0-...-ada9e78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

README

InterPoller

I library to poll a host system's network interfaces and detect changes.

Features

After intialization return a event channel which will notify callers when changes to the Interfaces occur.

Example:

cmd/expose/main.go will build an example usage writing all interfaces and their corresponding IP addresses to stdout.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressesOnInterface

func AddressesOnInterface(iface *net.Interface) (*[]net.Addr, error)

func GetAddrs

func GetAddrs() (*[]net.Addr, error)

func HostInterfaces

func HostInterfaces() (*[]net.Interface, error)

Types

type ActiveInterfaces

type ActiveInterfaces struct {
	Addresses []net.Addr
	// contains filtered or unexported fields
}

func NewActiveInterfaces

func NewActiveInterfaces(addrs *[]net.Addr) *ActiveInterfaces

type IfaceError

type IfaceError struct {
	Name   string
	Addrs  []net.Addr
	ErrStr string
}

func (IfaceError) Error

func (ife IfaceError) Error() string

Directories

Path Synopsis
Godeps
_workspace/src/github.com/Sirupsen/logrus
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL