network

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildDriver

type ChildDriver interface {
	// ConfigureNetworkChild is executed in the child's namespaces, excluding detached-netns.
	//
	// netmsg MAY be modified.
	// devName is like "tap" or "eth0"
	ConfigureNetworkChild(netmsg *messages.ParentInitNetworkDriverCompleted, detachedNetNSPath string) (devName string, err error)

	ChildDriverInfo() (*ChildDriverInfo, error)
}

ChildDriver is called from the child namespace

type ChildDriverInfo added in v2.3.0

type ChildDriverInfo struct {
	ConfiguresInterface bool // Driver configures own namespace interface
}

type ParentDriver

type ParentDriver interface {
	Info(ctx context.Context) (*api.NetworkDriverInfo, error)
	// MTU returns MTU
	MTU() int
	// ConfigureNetwork sets up Slirp, updates msg, and returns destructor function.
	// detachedNetNSPath is set only for the detach-netns mode.
	ConfigureNetwork(childPID int, stateDir, detachedNetNSPath string) (netmsg *messages.ParentInitNetworkDriverCompleted, cleanup func() error, err error)
}

ParentDriver is called from the parent namespace

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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