networks

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect added in v0.6.0

func Connect(opts NetworkConnect) error

Connect connects a container to a network.

func Create

func Create(opts CreateOptions) (types.Network, error)

Create creates a new pod.

func DefaultNetworkDriver

func DefaultNetworkDriver() string

DefaultNetworkDriver returns default network driver name.

func Disconnect added in v0.6.0

func Disconnect(networkName string, containerID string) error

Disconnect disconnects a container from a network.

func Inspect

func Inspect(id string) (string, error)

Inspect inspects the specified network.

func List

func List() ([][]string, error)

List returns list of podman networks.

func Prune

func Prune() error

Prune removes all unused network.

func Remove

func Remove(name string) error

Remove removes the network.

Types

type CreateOptions

type CreateOptions struct {
	Name           string
	Labels         map[string]string
	Internal       bool
	Drivers        string
	DriversOptions map[string]string
	IPv6           bool
	Gateways       []string
	IPRanges       []string
	Subnets        []string
	DisableDNS     bool
}

CreateOptions implements network create options.

type NetworkConnect added in v0.6.0

type NetworkConnect struct {
	Container  string
	Network    string
	IPv4       string
	IPv6       string
	MacAddress string
	Aliases    []string
}

NetworkConnect networks connect options.

Jump to

Keyboard shortcuts

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