Documentation ¶
Index ¶
- Constants
- Variables
- func CheckContainerDir(containerDir string) error
- func MountProc(containerName string) error
- func PivotRoot(containerName string) error
- func PrepareRootFs(imagePath, destRootFsDir string) error
- func SetNetwork(configInput *NetworkConfigInput) error
- func WaitForNetwork() error
- type Bridge
- type BridgeCreator
- type Configurer
- type Container
- type Host
- type Netset
- type NetworkConfig
- type NetworkConfigInput
- type Veth
- type VethCreator
Constants ¶
View Source
const ( ContainerDir = "/var/tmp/containers" RootFsDir = "rootfs" ImageDir = "images" BaseImage = "busybox.tar" )
Variables ¶
View Source
var Logger *zap.Logger
Functions ¶
func CheckContainerDir ¶
func PrepareRootFs ¶
func SetNetwork ¶
func SetNetwork(configInput *NetworkConfigInput) error
func WaitForNetwork ¶
func WaitForNetwork() error
Types ¶
type BridgeCreator ¶
type Configurer ¶
type Configurer interface {
Apply(netConfig NetworkConfig, pid int) error
}
type Container ¶
func NewContainerConfigurer ¶
type Host ¶
type Host struct { BridgeCreator BridgeCreator VethCreator VethCreator }
func NewHostConfigurer ¶
func NewHostConfigurer(bridgeCreator BridgeCreator, vethCreator VethCreator) *Host
type Netset ¶
type Netset struct { HostConfigurer Configurer ContainerConfigurer Configurer }
func New ¶
func New(hostConfigurer, containerConfigurer Configurer) *Netset
type NetworkConfig ¶
type NetworkConfigInput ¶
Click to show internal directories.
Click to hide internal directories.