portcache

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodePortData

type NodePortData struct {
	NodePort int
	PodPort  int
	PodIP    string
	Status   int
}

type PortTable

type PortTable struct {
	Table        map[int]NodePortData
	StartPort    int
	EndPort      int
	PodPortRules rules.PodPortRules
	// contains filtered or unexported fields
}

func NewPortTable

func NewPortTable(start, end int) (*PortTable, bool)

func (*PortTable) AddRule

func (pt *PortTable) AddRule(podIP string, podPort int) (int, error)

func (*PortTable) AddUpdateEntry

func (pt *PortTable) AddUpdateEntry(nodeport, podport int, podip string)

func (*PortTable) CleanupAllEntries

func (pt *PortTable) CleanupAllEntries()

func (*PortTable) DeleteEntry

func (pt *PortTable) DeleteEntry(nodeport int)

func (*PortTable) DeleteEntryByPodIP

func (pt *PortTable) DeleteEntryByPodIP(ip string)

func (*PortTable) DeleteEntryByPodIPPort

func (pt *PortTable) DeleteEntryByPodIPPort(ip string, port int)

func (*PortTable) DeleteRule

func (pt *PortTable) DeleteRule(podIP string, podPort int) error

func (*PortTable) GetDataForPodIP

func (pt *PortTable) GetDataForPodIP(ip string) []NodePortData

func (*PortTable) GetEntry

func (pt *PortTable) GetEntry(nodeport int) *NodePortData

func (*PortTable) GetEntryByPodIPPort

func (pt *PortTable) GetEntryByPodIPPort(ip string, port int) *NodePortData

func (*PortTable) RuleExists

func (pt *PortTable) RuleExists(podIP string, podPort int) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL