resolver

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	// Address is the IP address of the endpoint.
	Address string
	// Port is the port of the endpoint.
	Port int32
	// IPv6 is true if the endpoint is an IPv6 address.
	IPv6 bool
}

Endpoint is the internal representation of a Kubernetes endpoint.

type ServiceResolver

type ServiceResolver interface {
	Resolve(
		ctx context.Context,
		svcNsName types.NamespacedName,
		svcPort v1.ServicePort,
		allowedAddressType []discoveryV1.AddressType,
	) ([]Endpoint, error)
}

ServiceResolver resolves a Service's NamespacedName and ServicePort to a list of Endpoints. Returns an error if the Service or Service Port cannot be resolved.

type ServiceResolverImpl

type ServiceResolverImpl struct {
	// contains filtered or unexported fields
}

ServiceResolverImpl implements ServiceResolver.

func NewServiceResolverImpl

func NewServiceResolverImpl(c client.Client) *ServiceResolverImpl

NewServiceResolverImpl creates a new instance of a ServiceResolverImpl.

func (*ServiceResolverImpl) Resolve

func (e *ServiceResolverImpl) Resolve(
	ctx context.Context,
	svcNsName types.NamespacedName,
	svcPort v1.ServicePort,
	allowedAddressType []discoveryV1.AddressType,
) ([]Endpoint, error)

Resolve resolves a Service's NamespacedName and ServicePort to a list of Endpoints. Returns an error if the Service or ServicePort cannot be resolved.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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