package nat
import "github.com/docker/docker/nat"
Index ¶
- Constants
- func ParsePort(rawPort string) (int, error)
- func ParsePortSpecs(ports []string) (map[Port]struct{}, map[Port][]PortBinding, error)
- func Sort(ports []Port, predicate func(i, j Port) bool)
- func SplitProtoPort(rawPort string) (string, string)
- type Port
- func NewPort(proto, port string) Port
- func (p Port) Int() int
- func (p Port) Port() string
- func (p Port) Proto() string
- type PortBinding
- type PortMap
- type PortSet
Constants ¶
const ( PortSpecTemplate = "ip:hostPort:containerPort" PortSpecTemplateFormat = "ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort" )
Functions ¶
func ParsePort ¶
func ParsePortSpecs ¶
func ParsePortSpecs(ports []string) (map[Port]struct{}, map[Port][]PortBinding, error)
We will receive port specs in the format of ip:public:private/proto and these need to be parsed in the internal types
func Sort ¶
func SplitProtoPort ¶
Splits a port in the format of proto/port
Types ¶
type Port ¶
type Port string
80/tcp
func NewPort ¶
func (Port) Int ¶
func (Port) Port ¶
func (Port) Proto ¶
type PortBinding ¶
type PortMap ¶
type PortMap map[Port][]PortBinding
type PortSet ¶
type PortSet map[Port]struct{}
Source Files ¶
- Version
- v1.6.0-rc6
- Published
- Apr 13, 2015
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 53 minutes ago –
Tools for package owners.