forwarder

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forwarder

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

Forwarder manages port forwarding for a single pod.

func New

func New(loc locator.Locator, configuration config.PortForwardConfiguration, client kubernetes.Interface, restCfg *rest.Config) (*Forwarder, error)

New creates a new forwarder for the given pod and configuration. Each forwarder gets its own SPDY transport and upgrader to avoid data races when multiple forwarders run concurrently.

func (*Forwarder) Config added in v0.0.2

Config returns the port forward configuration for this forwarder.

func (*Forwarder) Start

func (f *Forwarder) Start(ctx context.Context)

Start begins the port forwarding loop, attempting to locate and forward to the pod. It runs until the context is cancelled.

type RetryConfig

type RetryConfig struct {
	InitialDelay time.Duration
	MaxDelay     time.Duration
	Multiplier   float64
	Jitter       bool
}

RetryConfig defines exponential backoff retry strategy.

func DefaultRetryConfig

func DefaultRetryConfig() RetryConfig

DefaultRetryConfig returns sensible defaults for retry strategy.

Jump to

Keyboard shortcuts

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