backend

package
v0.0.0-...-894910e Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("backend not found")

Functions

func LookupServicePort

func LookupServicePort(svc *corev1.Service, port intstr.IntOrString) (corev1.ServicePort, error)

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver(store store.Storer, k8sClient client.Client, cloud prvd.Provider, logger logr.Logger) *defaultEndpointResolver

Types

type EndpointResolver

type EndpointResolver interface {
	ResolveENIEndpoints(ctx context.Context, svcKey types.NamespacedName, port intstr.IntOrString) ([]NodePortEndpoint, bool, error)

	ResolveLocalEndpoints(ctx context.Context, svcKey types.NamespacedName, port intstr.IntOrString) ([]NodePortEndpoint, bool, error)

	ResolveClusterEndpoints(ctx context.Context, svcKey types.NamespacedName, port intstr.IntOrString) ([]NodePortEndpoint, bool, error)
}

type Manager

type Manager struct {
	EndpointResolver
	// contains filtered or unexported fields
}

func NewBackendManager

func NewBackendManager(store store.Storer, kubeClient client.Client, cloud prvd.Provider, logger logr.Logger) *Manager

func (*Manager) BuildServicePortSDKBackends

func (mgr *Manager) BuildServicePortSDKBackends(ctx context.Context, svcKey types.NamespacedName, port intstr.IntOrString) ([]alb.BackendItem, bool, error)

func (*Manager) BuildServicePortsToSDKBackends

func (mgr *Manager) BuildServicePortsToSDKBackends(ctx context.Context, svc *v1.Service) (map[int32][]alb.BackendItem, bool, error)

type NodePortEndpoint

type NodePortEndpoint alb.BackendItem

func RemoteDuplicatedBackends

func RemoteDuplicatedBackends(backends []NodePortEndpoint) []NodePortEndpoint

type PodEndpoint

type PodEndpoint struct {
	IP       string
	Port     int
	NodeName *string
	Pod      *corev1.Pod
}

Jump to

Keyboard shortcuts

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