Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster implements ClusterInterface.
func NewCluster ¶
func NewCluster( clusterBindPort int, localNodeIP net.IP, nodeName string, nodeInformer coreinformers.NodeInformer, externalIPPoolInformer crdinformers.ExternalIPPoolInformer, ) (*Cluster, error)
NewCluster returns a new *Cluster.
func (*Cluster) AddClusterEventHandler ¶
func (c *Cluster) AddClusterEventHandler(handler clusterNodeEventHandler)
AddClusterEventHandler adds a clusterNodeEventHandler, which will run when consistentHashMap is updated, due to an ExternalIPPool or Node event.
func (*Cluster) Run ¶
func (c *Cluster) Run(stopCh <-chan struct{})
Run will join all the other K8s Nodes in a memberlist cluster and will create defaultWorkers workers (go routines) which will process the ExternalIPPool or Node events from the work queue.
func (*Cluster) ShouldSelectEgress ¶
ShouldSelectEgress returns true if the local Node selected as the owner Node of the Egress, the local Node in the cluster holds the same consistent hash ring for each ExternalIPPool, consistentHash.Get gets the closest item (Node name) in the hash to the provided key(egressIP), if the name of the local Node is equal to the name of the selected Node, returns true.