network

package
v3.0.3-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCNIConfPath = filepath.Join(buildcfg.SYSCONFDIR, "singularity", "network")

DefaultCNIConfPath is the default directory to CNI network configuration files

View Source
var DefaultCNIPluginPath = filepath.Join(buildcfg.LIBEXECDIR, "singularity", "cni")

DefaultCNIPluginPath is the default directory to CNI plugins executables

Functions

func AvailableNetworks

func AvailableNetworks(cniPath *CNIPath) ([]string, error)

AvailableNetworks lists configured networks in configuration path directory provided by cniPath

Types

type CNIPath

type CNIPath struct {
	Conf   string
	Plugin string
}

CNIPath contains path to CNI configuration directory and path to executable CNI plugins directory

type Setup

type Setup struct {
	// contains filtered or unexported fields
}

Setup contains network installation setup

func NewSetup

func NewSetup(networks []string, containerID string, netNS string, cniPath *CNIPath) (*Setup, error)

NewSetup creates and returns a network setup to configure, add and remove network interfaces in container

func (*Setup) AddNetworks

func (m *Setup) AddNetworks() error

AddNetworks brings up networks interface in container

func (*Setup) DelNetworks

func (m *Setup) DelNetworks() error

DelNetworks tears down networks interface in container

func (*Setup) SetArgs

func (m *Setup) SetArgs(args []string) error

SetArgs affects arguments to corresponding network plugins

Jump to

Keyboard shortcuts

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