import "github.com/docker/docker/vendor/github.com/docker/go-connections/nat"
Package nat is a convenience package for manipulation of strings describing network ports.
ParsePort parses the port number string and returns an int
ParsePortRange parses and validates the specified string as a port-range (8000-9000)
ParsePortRangeToInt parses the port range string and returns start/end ints
ParsePortSpecs receives port specs in the format of ip:public:private/proto and parses these in to the internal types
PartParser parses and validates the specified string (data) using the specified template e.g. ip:public:private -> 192.168.0.1:80:8000 DEPRECATED: do not use, this function may be removed in a future version
Sort sorts a list of ports using the provided predicate This function should compare `i` and `j`, returning true if `i` is considered to be less than `j`
SortPortMap sorts the list of ports and their respected mapping. The ports will explicit HostPort will be placed first.
SplitProtoPort splits a port in the format of proto/port
Port is a string containing port number and protocol in the format "80/tcp"
NewPort creates a new instance of a Port given a protocol and port number or port range
Int returns the port number of a Port as an int
Port returns the port number of a Port
Proto returns the protocol of a Port
Range returns the start/end port numbers of a Port range as ints
type PortBinding struct { // HostIP is the host IP Address HostIP string `json:"HostIp"` // HostPort is the host port number HostPort string }
PortBinding represents a binding between a Host IP address and a Host Port
type PortMap map[Port][]PortBinding
PortMap is a collection of PortBinding indexed by Port
type PortMapping struct { Port Port Binding PortBinding }
PortMapping is a data object mapping a Port to a PortBinding
func ParsePortSpec(rawPort string) ([]PortMapping, error)
ParsePortSpec parses a port specification string into a slice of PortMappings
PortSet is a collection of structs indexed by Port
Package nat imports 5 packages (graph). Updated 2018-02-25. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).