resolver

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 8 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
}

Endpoint is the internal representation of a Kubernetes endpoint.

type ServiceResolver

type ServiceResolver interface {
	Resolve(ctx context.Context, svcNsName types.NamespacedName, svcPort v1.ServicePort) ([]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(client 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,
) ([]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