Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Network ¶
type Network interface {
Destroy() error
Execute(func() error) error
Connect(iface string, masquerade bool) error
Disconnect(iface string, masquerade bool) error
}
func NewNetwork ¶
func NewNetwork(opts ...NetworkOption) (Network, error)
type NetworkConfig ¶
type NetworkOption ¶
type NetworkOption func(*NetworkConfig) error
func WithBridge ¶
func WithBridge(ip net.IP) NetworkOption
func WithGateway ¶
func WithGateway(ip net.IP) NetworkOption
func WithLinkManager ¶
func WithLinkManager(manager ifc.LinkManager) NetworkOption
func WithName ¶
func WithName(name string) NetworkOption
func WithSubnet ¶
func WithSubnet(ipNet *net.IPNet) NetworkOption
Click to show internal directories.
Click to hide internal directories.