portforward

package
v2.21.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	K8sPFScheme = "k8spf"
)
View Source
const ProtocolV1Name = "portforward.k8s.io"

Variables

This section is empty.

Functions

func Dialer

func Dialer(ctx context.Context) func(ctx context.Context, address string) (net.Conn, error)

func NewResolver

func NewResolver(ctx context.Context) resolver.Builder

func WithRestConfig

func WithRestConfig(ctx context.Context, restConfig *rest.Config) context.Context

Types

type PodConnection

type PodConnection interface {
	httpstream.Connection
	Dial(ctx context.Context, remotePort uint16) (net.Conn, error)
}

PodConnection represents a port agnostic stream connection to a pod. This connection can then be used when creating a port-specific connection to the connected pod.

type PodDialer

type PodDialer interface {
	Connect(cacheDelete func()) (PodConnection, error)
}

PodDialer can dial a pod to establish a PodConnection.

func NewPodDialer

func NewPodDialer(ctx context.Context, config *rest.Config, podName, namespace string, forceSPDY bool) (PodDialer, error)

Jump to

Keyboard shortcuts

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