network

package
v0.0.0-...-bd3f6cd Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Network

type Network struct {
	Name string
	ID   string
	// contains filtered or unexported fields
}

Network is a dockward network.

func Create

func Create(client *docker.Client) (*Network, error)

Create creates a new network with a random name.

func CreateWithName

func CreateWithName(client *docker.Client, name string) (*Network, error)

CreateWithName creates a new network using name.

func (*Network) ConnectContainer

func (n *Network) ConnectContainer(id string) error

ConnectContainer connects docker container with id to the network.

func (*Network) DisconnectContainer

func (n *Network) DisconnectContainer(id string) error

DisconnectContainer disconnects docker container with id from the network.

func (*Network) Stop

func (n *Network) Stop() error

Stop disconnects all connected docker containers from the network and removes the network.

Jump to

Keyboard shortcuts

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