network

package
v0.7.15 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2017 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	IPLabel               = "io.rancher.container.ip"
	LegacyManagedNetLabel = "io.rancher.container.network"
	CNILabel              = "io.rancher.cni.network"
)

Variables

This section is empty.

Functions

func EnterNS added in v0.6.3

func EnterNS(dc *client.Client, dockerID string, f func(ns.NetNS) error) error

EnterNS is used to enter the given network namespace and execute the given function in that namespace. Runs only if the container is not using host namespace or another contaienr's namespace.

func ForEachContainerNS added in v0.6.3

func ForEachContainerNS(dc *client.Client, mc metadata.Client, networkUUID string, f func(metadata.Container, ns.NetNS) error) error

ForEachContainerNS is used to run the given function inside the namespace of all containers that are running

Types

type Manager

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

func NewManager

func NewManager(c *client.Client) (*Manager, error)

func (*Manager) Evaluate

func (n *Manager) Evaluate(id string) error

Evaluate checks the state and enables networking if needed

Jump to

Keyboard shortcuts

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