net

package
Version: v0.0.0-...-9a89ba0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2014 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCentosNetManager

func NewCentosNetManager(
	fs boshsys.FileSystem,
	cmdRunner boshsys.CmdRunner,
	defaultNetworkResolver DefaultNetworkResolver,
	ipResolver boship.Resolver,
	addressBroadcaster bosharp.AddressBroadcaster,
	logger boshlog.Logger,
) centosNetManager

func NewCmdRoutesSearcher

func NewCmdRoutesSearcher(runner boshsys.CmdRunner) cmdRoutesSearcher

func NewDefaultNetworkResolver

func NewDefaultNetworkResolver(
	routesSearcher RoutesSearcher,
	ipResolver boship.Resolver,
) defaultNetworkResolver

func NewUbuntuNetManager

func NewUbuntuNetManager(
	fs boshsys.FileSystem,
	cmdRunner boshsys.CmdRunner,
	defaultNetworkResolver DefaultNetworkResolver,
	ipResolver boship.Resolver,
	addressBroadcaster bosharp.AddressBroadcaster,
	logger boshlog.Logger,
) ubuntuNetManager

Types

type DefaultNetworkResolver

type DefaultNetworkResolver interface {
	// Ideally we would find a network based on a MAC address
	// but current CPI implementations do not include it
	GetDefaultNetwork() (boshsettings.Network, error)
}

type Manager

type Manager interface {
	// SetupManualNetworking configures network interfaces with a static ip.
	// If errCh is provided, nil or an error will be sent
	// upon completion of background network reconfiguration (e.g. arping).
	SetupManualNetworking(networks boshsettings.Networks, errCh chan error) error

	// SetupDhcp configures network interfaces using DHCP.
	// If errCh is provided, nil or an error will be sent
	// upon completion of background network reconfiguration (e.g. arping).
	SetupDhcp(networks boshsettings.Networks, errCh chan error) error

	DefaultNetworkResolver
}

type Route

type Route struct {
	Destination   string
	Gateway       string
	InterfaceName string
}

func (Route) IsDefault

func (r Route) IsDefault() bool

type RoutesSearcher

type RoutesSearcher interface {
	SearchRoutes() ([]Route, error)
}

Directories

Path Synopsis
arp
ip

Jump to

Keyboard shortcuts

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