Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InterfaceAddress ¶
type InterfaceAddress interface { GetInterfaceName() string // GetIP gets the exposed internet protocol address of the above interface GetIP() (string, error) }
func NewResolvingInterfaceAddress ¶
func NewResolvingInterfaceAddress( interfaceName string, ipResolver Resolver, ) InterfaceAddress
func NewSimpleInterfaceAddress ¶
func NewSimpleInterfaceAddress(interfaceName string, ip string) InterfaceAddress
type InterfaceAddressesProvider ¶
type InterfaceAddressesProvider interface {
Get() ([]InterfaceAddress, error)
}
func NewSystemInterfaceAddressesProvider ¶
func NewSystemInterfaceAddressesProvider() InterfaceAddressesProvider
type InterfaceAddressesValidator ¶
type InterfaceAddressesValidator interface {
Validate(desiredInterfaceAddresses []InterfaceAddress) error
}
func NewInterfaceAddressesValidator ¶
func NewInterfaceAddressesValidator(interfaceAddrsProvider InterfaceAddressesProvider) InterfaceAddressesValidator
type Resolver ¶
type Resolver interface { // GetPrimaryIPv4 always returns error unless IPNet is found for given interface GetPrimaryIPv4(interfaceName string) (*gonet.IPNet, error) }
func NewResolver ¶
func NewResolver(ifaceToAddrsFunc InterfaceToAddrsFunc) Resolver
Source Files ¶
Click to show internal directories.
Click to hide internal directories.