resolver

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2025 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) (*corev1.Pod, int, error)
	FindPodByName(ctx context.Context, namespace, podName string) (*corev1.Pod, int, error)
}

type Resolver

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

Resolver provides resolving a pod and container port.

func (*Resolver) FindPodByName

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

FindPodByName finds a pod and container port by name.

func (*Resolver) FindPodByServiceName

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

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

Jump to

Keyboard shortcuts

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