container

package
v0.0.0-...-92a250d Latest Latest
Warning

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

Go to latest
Published: May 12, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NameSandboxLink(containerID string) string

Types

type CommandBuilder

type CommandBuilder struct {
	MissWatcher   watcher.MissWatcher
	HostNamespace namespace.Namespace
}

func (*CommandBuilder) AddRoutes

func (b *CommandBuilder) AddRoutes(interfaceName string, ipConfig *types.IPConfig) executor.Command

func (*CommandBuilder) IdempotentlyCreateSandbox

func (b *CommandBuilder) IdempotentlyCreateSandbox(sandboxName, vxlanName string, vni int, dnsAddress string) executor.Command

func (*CommandBuilder) IdempotentlyCreateVxlan

func (b *CommandBuilder) IdempotentlyCreateVxlan(
	vxlanName string,
	sandboxName string,
	sandboxNS namespace.Namespace,
) executor.Command

func (*CommandBuilder) IdempotentlySetupBridge

func (b *CommandBuilder) IdempotentlySetupBridge(
	vxlanName, sandboxLinkName, bridgeName string,
	sandboxNS namespace.Namespace,
	ipamResult *types.Result,
) executor.Command

func (*CommandBuilder) SetupVeth

func (b *CommandBuilder) SetupVeth(
	containerNS namespace.Namespace,
	sandboxLinkName string,
	containerLinkName string,
	address net.IPNet,
	sandboxName string,
	routeCommand executor.Command,
) executor.Command

type Creator

type Creator struct {
	Executor        executor.Executor
	SandboxRepo     sandboxRepository
	Watcher         watcher.MissWatcher
	CommandBuilder  commandBuilder
	DNSAddress      string
	HostIP          net.IP
	NamespaceOpener namespace.Opener
}

func (*Creator) Setup

func (c *Creator) Setup(config CreatorConfig) (models.Container, error)

type CreatorConfig

type CreatorConfig struct {
	NetworkID       string
	App             string
	ContainerNsPath string
	ContainerID     string
	InterfaceName   string
	VNI             int
	IPAMResult      *types.Result
}

type Deletor

type Deletor struct {
	Executor        executor.Executor
	NamespaceOpener namespace.Opener
}

func (*Deletor) Delete

func (d *Deletor) Delete(
	interfaceName string,
	containerNSPath string,
	sandboxName string,
	vxlanDeviceName string,
) error

Jump to

Keyboard shortcuts

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