Documentation ¶
Index ¶
- Variables
- func Modprobe(module string) error
- func ReleasePortMaps(containerip string, externalPrefix []string, maps []*PortMapping) (postExec [][]string, err error)
- func Setup(bIface, addr string, disable bool) error
- func SetupPortMaps(containerip string, externalPrefix []string, maps []*PortMapping) (preExec [][]string, err error)
- type PortMapping
- type PortRange
Constants ¶
This section is empty.
Variables ¶
View Source
var (
PortMapper = portmapper.New()
)
Functions ¶
func ReleasePortMaps ¶
func ReleasePortMaps(containerip string, externalPrefix []string, maps []*PortMapping) (postExec [][]string, err error)
func SetupPortMaps ¶
func SetupPortMaps(containerip string, externalPrefix []string, maps []*PortMapping) (preExec [][]string, err error)
Types ¶
type PortMapping ¶
func NewPortMapping ¶
func NewPortMapping(proto, from, to string) (*PortMapping, error)
NewPortMapping generate a PortMapping from three strings: proto (tcp or udp, default is tcp), and from/to port (single port or a range, see NewPortRange)
type PortRange ¶
func NewPortRange ¶
NewPortRange generate a port range from string r. the r should be a decimal number or in format begin-end, where begin and end are both decimal number. And the port range should be 0-65535, i.e. 16-bit unsigned int It returns PortRange pointer for valid input, otherwise return error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.