bridge

package
v1.4.2-0...-b7950b7 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2015 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNetworkBridge     = "docker0"
	MaxAllocatedPortAttempts = 10
)

Variables

This section is empty.

Functions

func Allocate

func Allocate(id, requestedMac, requestedIP, requestedIPv6 string) (*network.Settings, error)

Allocate a network interface

func AllocatePort

func AllocatePort(id string, port nat.Port, binding nat.PortBinding) (nat.PortBinding, error)

Allocate an external port and map it to the interface

func InitDriver

func InitDriver(config *Config) error

func LinkContainers

func LinkContainers(action, parentIP, childIP string, ports []nat.Port, ignoreErrors bool) error

TODO: should it return something more than just an error?

func Release

func Release(id string)

Release an interface for a select ip

func RequestPort

func RequestPort(ip net.IP, proto string, port int) (int, error)

Types

type Config

type Config struct {
	EnableIPv6                  bool
	EnableIptables              bool
	EnableIpForward             bool
	EnableIpMasq                bool
	DefaultIp                   net.IP
	Iface                       string
	IP                          string
	FixedCIDR                   string
	FixedCIDRv6                 string
	InterContainerCommunication bool
}

Jump to

Keyboard shortcuts

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