network

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNameserversToInstance added in v1.15.0

func AddNameserversToInstance(driver drivers.Driver, nameservers []string)

AddNameserversToInstance will add additional nameservers to the end of the /etc/resolv.conf file inside the instance.

func CheckInternetConnectivity added in v1.15.0

func CheckInternetConnectivity(address string) bool

CheckInternetConnectivity return false if user is not connected to internet

func ConfigureDynamicAssignment added in v1.15.0

func ConfigureDynamicAssignment(driver drivers.Driver)

ConfigureDynamicAssignment will write configuration files which will force DHCP assignment, which will be used by minishift-set-ipaddress on start of the instance.

func ConfigureNetworking

func ConfigureNetworking(machineName string, networkSettings NetworkSettings)

func ConfigureStaticAssignment added in v1.15.0

func ConfigureStaticAssignment(driver drivers.Driver)

ConfigureStaticAssignment will collect NetworkSettings from the current running instance and write this the values as configuration files, which will be used by minishift-set-ipaddress on start of the instance.

func DetermineHostIP added in v1.15.0

func DetermineHostIP(driver drivers.Driver) (string, error)

func GetIP added in v1.15.0

func GetIP(driver drivers.Driver) (string, error)

This will return the address as used by libmachine

func HasNameserverConfiguredLocally added in v1.16.0

func HasNameserverConfiguredLocally(nameserver string) (bool, error)

func HasNameserversConfigured added in v1.15.0

func HasNameserversConfigured(driver drivers.Driver) bool

HasNameserversConfigured returns true if the instance uses nameservers This is related to an issues when LCOW is used on Windows.

func HostIPs added in v1.15.0

func HostIPs() []string

HostIPs returns the IP addresses assigned to the host

func IsIPReachable added in v1.15.0

func IsIPReachable(driver drivers.Driver, ip string, printOutput bool) bool

IsIPReachable returns true is IP address is reachable from the virtual instance

func IsRetrievable added in v1.15.0

func IsRetrievable(driver drivers.Driver, url string, printOutput bool) bool

func NetworkContains added in v1.15.0

func NetworkContains(network string, ip string) bool

NetworkContains returns true if the IP address belongs to the network given

func WriteNetworkSettingsToInstance added in v1.15.0

func WriteNetworkSettingsToInstance(driver drivers.Driver, networkSettings NetworkSettings) bool

WriteNetworkSettingsToInstance takes NetworkSettings and writes the values as a configuration file to be used by minishift-set-ipaddress

Types

type NetworkSettings

type NetworkSettings struct {
	Device    string
	IPAddress string
	Netmask   string
	Gateway   string
	DNS1      string
	DNS2      string
	UseDHCP   bool
	Disabled  bool
}

func GetNetworkSettingsFromInstance added in v1.15.0

func GetNetworkSettingsFromInstance(driver drivers.Driver) NetworkSettings

GetNetworkSettingsFromInstance will collect various network settings from the running instance and will populate a NetworkSettings struct with these values

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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