Documentation ¶
Overview ¶
portcache maintains the state about all current NodePortLocal port mappings for this Node and takes care of configuring the host accordingly.
Index ¶
- Constants
- func GetPortTableKey(obj interface{}) (string, error)
- func NodePortIndexFunc(obj interface{}) ([]string, error)
- func NodePortProtoFormat(nodeport int, protocol string) string
- func PodEndpointIndexFunc(obj interface{}) ([]string, error)
- func PodIPIndexFunc(obj interface{}) ([]string, error)
- type LocalPortOpener
- type NodePortData
- type PortTable
- func (pt *PortTable) AddRule(podIP string, podPort int, protocol string) (int, error)
- func (pt *PortTable) CleanupAllEntries()
- func (pt *PortTable) DeleteRule(podIP string, podPort int, protocol string) error
- func (pt *PortTable) DeleteRulesForPod(podIP string) error
- func (pt *PortTable) GetDataForPodIP(ip string) []*NodePortData
- func (pt *PortTable) GetEntry(ip string, port int, protocol string) *NodePortData
- func (pt *PortTable) RestoreRules(allNPLPorts []rules.PodNodePort, synced chan<- struct{}) error
- func (pt *PortTable) RuleExists(podIP string, podPort int, protocol string) bool
- type ProtocolSocketData
Constants ¶
View Source
const ( NodePortIndex = "nodePortIndex" PodEndpointIndex = "podEndpointIndex" PodIPIndex = "podIPIndex" )
Variables ¶
This section is empty.
Functions ¶
func GetPortTableKey ¶ added in v1.8.0
func NodePortIndexFunc ¶ added in v1.8.0
func NodePortProtoFormat ¶ added in v1.7.0
nodePortProtoFormat formats the nodeport, protocol to string port:protocol.
func PodEndpointIndexFunc ¶ added in v1.8.0
func PodIPIndexFunc ¶ added in v1.8.0
Types ¶
type LocalPortOpener ¶ added in v1.2.0
type NodePortData ¶
type NodePortData struct { NodePort int PodPort int PodIP string Protocol ProtocolSocketData // contains filtered or unexported fields }
func (*NodePortData) Defunct ¶ added in v1.15.2
func (d *NodePortData) Defunct() bool
type PortTable ¶
type PortTable struct { PortTableCache cache.Indexer StartPort int EndPort int PortSearchStart int PodPortRules rules.PodPortRules LocalPortOpener LocalPortOpener // contains filtered or unexported fields }
func NewPortTable ¶
func (*PortTable) CleanupAllEntries ¶
func (pt *PortTable) CleanupAllEntries()
func (*PortTable) DeleteRule ¶
func (*PortTable) DeleteRulesForPod ¶ added in v1.4.0
func (*PortTable) GetDataForPodIP ¶
func (pt *PortTable) GetDataForPodIP(ip string) []*NodePortData
func (*PortTable) GetEntry ¶
func (pt *PortTable) GetEntry(ip string, port int, protocol string) *NodePortData
func (*PortTable) RestoreRules ¶ added in v1.2.2
func (pt *PortTable) RestoreRules(allNPLPorts []rules.PodNodePort, synced chan<- struct{}) error
RestoreRules should be called at Antrea Agent startup to restore a set of NPL rules. It is non-blocking but takes a channel parameter - synced, which will be closed when the necessary rules have been restored successfully. No other operations should be performed on the PortTable until the channel is closed.
type ProtocolSocketData ¶ added in v1.4.0
type ProtocolSocketData struct { Protocol string // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.