resolver

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Overview

Package resolver provides resolving a pod and container port.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Factory

type Factory struct {
	Logger logger.Interface
}

Factory creates a Resolver.

func (*Factory) New

func (f *Factory) New(config *rest.Config) (Interface, error)

New returns a Resolver.

type FactoryInterface

type FactoryInterface interface {
	New(config *rest.Config) (Interface, error)
}

type Interface

type Interface interface {
	FindPodByServiceName(ctx context.Context, namespace, serviceName string) (*v1.Pod, int, error)
	FindPodByName(ctx context.Context, namespace, podName string) (*v1.Pod, int, error)
}

type Resolver

type Resolver struct {
	Logger logger.Interface
	CoreV1 corev1.CoreV1Interface
}

Resolver provides resolving a pod and container port.

func (*Resolver) FindPodByName added in v1.1.0

func (r *Resolver) FindPodByName(ctx context.Context, namespace, podName string) (*v1.Pod, int, error)

FindPodByName finds a pod and container port by name.

func (*Resolver) FindPodByServiceName added in v1.1.0

func (r *Resolver) FindPodByServiceName(ctx context.Context, namespace, serviceName string) (*v1.Pod, int, error)

FindPodByServiceName returns a pod and container port associated with the service.

Directories

Path Synopsis
Package mock_resolver is a generated GoMock package.
Package mock_resolver is a generated GoMock package.

Jump to

Keyboard shortcuts

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