network

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NATType        = "nat"
	NATNetworkType = "natnetwork"
	HostOnlyType   = "hostonly"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HostOnly

type HostOnly struct {
	// contains filtered or unexported fields
}

func (HostOnly) Description

func (n HostOnly) Description() string

func (HostOnly) Enable added in v0.0.8

func (n HostOnly) Enable() error

func (HostOnly) EnabledDescription added in v0.0.8

func (n HostOnly) EnabledDescription() string

func (HostOnly) IPNet

func (n HostOnly) IPNet() *net.IPNet

func (HostOnly) IsDHCPEnabled

func (n HostOnly) IsDHCPEnabled() bool

func (HostOnly) IsEnabled

func (n HostOnly) IsEnabled() bool

func (HostOnly) Name

func (n HostOnly) Name() string

type NATNetwork

type NATNetwork struct {
	// contains filtered or unexported fields
}

func (NATNetwork) Description

func (n NATNetwork) Description() string

func (NATNetwork) Enable added in v0.0.8

func (n NATNetwork) Enable() error

func (NATNetwork) EnabledDescription added in v0.0.8

func (n NATNetwork) EnabledDescription() string

func (NATNetwork) IPNet

func (n NATNetwork) IPNet() *net.IPNet

func (NATNetwork) IsDHCPEnabled

func (n NATNetwork) IsDHCPEnabled() bool

func (NATNetwork) IsEnabled

func (n NATNetwork) IsEnabled() bool

func (NATNetwork) Name

func (n NATNetwork) Name() string

type Network

type Network interface {
	Name() string
	Description() string

	IsEnabled() bool
	EnabledDescription() string
	Enable() error

	IsDHCPEnabled() bool

	IPNet() *net.IPNet
}

type Networks

type Networks struct {
	// contains filtered or unexported fields
}

func NewNetworks

func NewNetworks(driver driver.Driver, logger boshlog.Logger) Networks

func (Networks) AddHostOnly

func (n Networks) AddHostOnly(name, gateway, netmask string) (bool, error)

func (Networks) AddNATNetwork

func (n Networks) AddNATNetwork(name string) error

func (Networks) HostOnlys

func (n Networks) HostOnlys() ([]Network, error)

func (Networks) NATNetworks

func (n Networks) NATNetworks() ([]Network, error)

Jump to

Keyboard shortcuts

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