dockerclient

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	OptDisableSnat = "DisableSNAT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client specifies a client to connect to docker.

func NewDefaultClient

func NewDefaultClient(wscli interfaceGetter) (*Client, error)

NewDefaultClient create a new docker client.

func (*Client) CreateNetwork

func (c *Client) CreateNetwork(networkName string, nicInfo *wireserver.InterfaceInfo, options map[string]interface{}) error

CreateNetwork creates a network using docker network create.

func (*Client) DeleteNetwork

func (c *Client) DeleteNetwork(networkName string) error

DeleteNetwork creates a network using docker network create.

func (*Client) NetworkExists

func (c *Client) NetworkExists(networkName string) error

NetworkExists tries to retrieve a network from docker (if it exists).

type Config

type Config struct {
	Subnet string
}

Config describes subnet/gateway for ipam.

type DockerErrorResponse

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

DockerErrorResponse defines the error response retunred by docker.

type IPAM

type IPAM struct {
	Driver string
	Config []Config
}

IPAM describes ipam details

type NetworkConfiguration

type NetworkConfiguration struct {
	Name     string
	Driver   string
	IPAM     IPAM
	Internal bool
	Options  map[string]interface{}
}

NetworkConfiguration describes configuration for docker network create.

Jump to

Keyboard shortcuts

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