Documentation ¶
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 SortPortMap(ports []Port, bindings PortMap)
- func SplitProtoPort(rawPort string) (string, string)
- type Port
- type PortBinding
- type PortMap
- type PortSet
Constants ¶
View Source
const ( PortSpecTemplate = "ip:hostPort:containerPort" PortSpecTemplateFormat = "ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort" )
Variables ¶
This section is empty.
Functions ¶
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 SortPortMap ¶
SortPortMap sorts the list of ports and their respected mapping. The ports will explicit HostPort will be placed first.
func SplitProtoPort ¶
Splits a port in the format of proto/port
Types ¶
type PortBinding ¶
type PortMap ¶
type PortMap map[Port][]PortBinding
Click to show internal directories.
Click to hide internal directories.