types

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEndpointInfo

func NewEndpointInfo(baseInfo *k8sproxy.BaseEndpointInfo) k8sproxy.Endpoint

NewEndpointInfo returns a new k8sproxy.Endpoint which abstracts an endpointsInfo.

func NewGroupCounter

func NewGroupCounter(groupAllocator openflow.GroupAllocator, groupIDUpdates chan<- string) *groupCounter

func NewServiceInfo

func NewServiceInfo(port *corev1.ServicePort, service *corev1.Service, baseInfo *k8sproxy.BaseServiceInfo) k8sproxy.ServicePort

NewServiceInfo returns a new k8sproxy.ServicePort which abstracts a serviceInfo.

Types

type GroupCounter

type GroupCounter interface {
	// AllocateIfNotExist generates a global unique group ID for a Service if the group ID has not been generated, then
	// return the group ID (newly allocated or already allocated).
	AllocateIfNotExist(svcPortName k8sproxy.ServicePortName, isEndpointsLocal bool) binding.GroupIDType
	// Get gets the group ID for the Service.
	Get(svcPortName k8sproxy.ServicePortName, isEndpointsLocal bool) (binding.GroupIDType, bool)
	// Recycle removes the Service group ID mapping. The recycled group ID can be reused.
	Recycle(svcPortName k8sproxy.ServicePortName, isEndpointsLocal bool) bool
	// GetAllGroupIDs gets all group IDs related to the Service.
	GetAllGroupIDs(svcNamespacedName string) []binding.GroupIDType
}

GroupCounter generates and manages global unique group ID.

type ServiceInfo

type ServiceInfo struct {
	*k8sproxy.BaseServiceInfo
	// cache for performance
	OFProtocol openflow.Protocol
	// IsNested means the Service's Endpoints could be another Service's ClusterIP.
	// Currently it's true for Antrea Multi-cluster Service, determined by whether
	// there is an Antrea Multi-cluster specific annotation.
	IsNested bool
	// The load balancer mode specified in annotations.
	LoadBalancerMode *config.LoadBalancerMode
}

ServiceInfo is the internal struct for caching service information.

Jump to

Keyboard shortcuts

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