Documentation ¶
Overview ¶
package numorstring is copied from libcalico-go so that we can convert felix env vars which map to felixconfiguration fields of type numorstring.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Port ¶
type Port struct { MinPort uint16 `json:"minPort,omitempty"` MaxPort uint16 `json:"maxPort,omitempty"` PortName string `json:"portName" validate:"omitempty,portName"` }
Port represents either a range of numeric ports or a named port.
- For a named port, set the PortName, leaving MinPort and MaxPort as 0.
- For a port range, set MinPort and MaxPort to the (inclusive) port numbers. Set PortName to "".
- For a single port, set MinPort = MaxPort and PortName = "".
func PortFromRange ¶
PortFromRange creates a Port struct representing a range of ports.
func PortFromString ¶
PortFromString creates a Port struct from its string representation. A port may either be single value "1234", a range of values "100:200" or a named port: "name".
func SinglePort ¶
SinglePort creates a Port struct representing a single port.
Click to show internal directories.
Click to hide internal directories.