portmapper

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

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

Go to latest
Published: Mar 26, 2015 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewProxy = NewProxyCommand

	DefaultPortMapper = NewWithPortAllocator(portallocator.DefaultPortAllocator)
	SetIptablesChain  = DefaultPortMapper.SetIptablesChain
	Map               = DefaultPortMapper.Map
	Unmap             = DefaultPortMapper.Unmap
)
View Source
var (
	ErrUnknownBackendAddressType = errors.New("unknown container address type not supported")
	ErrPortMappedForIP           = errors.New("port is already mapped to ip")
	ErrPortNotMapped             = errors.New("port is not mapped")
)

Functions

This section is empty.

Types

type PortMapper

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

func New

func New() *PortMapper

func NewWithPortAllocator

func NewWithPortAllocator(allocator *portallocator.PortAllocator) *PortMapper

func (*PortMapper) Map

func (pm *PortMapper) Map(container net.Addr, hostIP net.IP, hostPort int) (host net.Addr, err error)

func (*PortMapper) SetIptablesChain

func (pm *PortMapper) SetIptablesChain(c *iptables.Chain)

func (*PortMapper) Unmap

func (pm *PortMapper) Unmap(host net.Addr) error

type UserlandProxy

type UserlandProxy interface {
	Start() error
	Stop() error
}

func NewMockProxyCommand

func NewMockProxyCommand(proto string, hostIP net.IP, hostPort int, containerIP net.IP, containerPort int) UserlandProxy

func NewProxyCommand

func NewProxyCommand(proto string, hostIP net.IP, hostPort int, containerIP net.IP, containerPort int) UserlandProxy

Jump to

Keyboard shortcuts

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