resolver

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 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, svc *v1.Service, svcPort int32) ([]Endpoint, error)
}

ServiceResolver resolves a Service and Service Port 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, svc *v1.Service, port int32) ([]Endpoint, error)

Resolve resolves a Service and Port to a list of Endpoints. Returns an error if the Service or Port 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