Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewNamedPortMultiMap ¶
func NewNamedPortMultiMap() *namedPortMultiMap
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 interface { // GetNamedPort returns the port number for the named port, if any. GetNamedPort(name string, proto uint8) (uint16, error) // Len returns the number of Name->PortProtoSet mappings known. Len() int }
NamedPortMultiMap may have multiple entries for a name if multiple PODs define the same name with different values.
type PortProto ¶
PortProto is a pair of port number and protocol and is used as the value type in named port maps.
type PortProtoSet ¶
PortProtoSet is a reference-counted set of unique PortProto values.
func (PortProtoSet) Add ¶
func (pps PortProtoSet) Add(pp PortProto) bool
Add increments the reference count for the specified key.
func (PortProtoSet) Delete ¶
func (pps PortProtoSet) Delete(pp PortProto) bool
Delete decrements the reference count for the specified key.
func (PortProtoSet) Equal ¶
func (pps PortProtoSet) Equal(other PortProtoSet) bool
Equal returns true if the PortProtoSets are equal.