net

package
v0.0.0-...-8605621 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2015 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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