configurer

package
v0.0.0-...-211d904 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BridgeCreator

type BridgeCreator interface {
	Create(name string, ip net.IP, subnet *net.IPNet) (*net.Interface, error)
	Attach(bridge, hostVeth *net.Interface) error
}

type Container

type Container struct {
	NetnsExecer *netns.Execer
}

func NewContainerConfigurer

func NewContainerConfigurer(netnsExecer *netns.Execer) *Container

func (*Container) Apply

func (c *Container) Apply(netConfig netsetgo.NetworkConfig, pid int) error

type Host

type Host struct {
	BridgeCreator BridgeCreator
	VethCreator   VethCreator
}

func NewHostConfigurer

func NewHostConfigurer(bridgeCreator BridgeCreator, vethCreator VethCreator) *Host

func (*Host) Apply

func (h *Host) Apply(netConfig netsetgo.NetworkConfig, pid int) error

type VethCreator

type VethCreator interface {
	Create(vethNamePrefix string) (*net.Interface, *net.Interface, error)
	MoveToNetworkNamespace(containerVeth *net.Interface, pid int) error
}

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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