Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ValidatePortName ¶
ValidatePortName checks that the port name conforms to the IANA Service Names spec and converts the port name to lower case for case-insensitive comparisons.
Types ¶
type IPv4 ¶
type IPv4 [4]byte
IPv4 is the binary representation for encoding in binary structs.
func (*IPv4) DeepCopyInto ¶
DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IPv6 ¶
type IPv6 [16]byte
IPv6 is the binary representation for encoding in binary structs.
func (*IPv6) DeepCopyInto ¶
DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MACAddr ¶
type MACAddr [6]byte
MACAddr is the binary representation for encoding in binary structs.
func (*MACAddr) DeepCopyInto ¶
DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamedPortMap ¶
NamedPortMap maps port names to port numbers and protocols.
func (NamedPortMap) AddPort ¶
func (npm NamedPortMap) AddPort(name string, port int, protocol string) error
AddPort adds a new PortProto to the NamedPortMap
func (NamedPortMap) GetNamedPort ¶
func (npm NamedPortMap) GetNamedPort(name string, proto uint8) (uint16, error)
GetNamedPort returns the port number for the named port, if any.
type NamedPortMultiMap ¶
type NamedPortMultiMap map[string]PortProtoSet
NamedPortMultiMap may have multiple entries for a name if multiple PODs define the same name with different values.
func (NamedPortMultiMap) Equal ¶
func (npm NamedPortMultiMap) Equal(other NamedPortMultiMap) bool
Equal returns true if the NamedPortMultiMaps are equal.
func (NamedPortMultiMap) GetNamedPort ¶
func (npm NamedPortMultiMap) GetNamedPort(name string, proto uint8) (uint16, error)
GetNamedPort returns the port number for the named port, if any.
type PortProto ¶
PortProto is a pair of port number and protocol and is used as the value type in named port maps.
type PortProtoSet ¶
type PortProtoSet map[PortProto]struct{}
PortProtoSet is a set of unique PortProto values.
func (PortProtoSet) Equal ¶
func (pps PortProtoSet) Equal(other PortProtoSet) bool
Equal returns true if the PortProtoSets are equal.