Help us shape the future of Go! Take the 2026 Go Developer Survey

k8s

package
v1.7.20 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PortForwarder

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

PortForwarder can manage a port forwarding session.

func NewPortForwarder

func NewPortForwarder(restConfig *rest.Config, opts PortForwardingOpts) (*PortForwarder, error)

NewPortForwarder creates a PortForwarder.

func (*PortForwarder) Address

func (p *PortForwarder) Address() string

Address returns an address for communicating with a port-forwarded pod.

func (*PortForwarder) Forward

func (p *PortForwarder) Forward(ctx context.Context) error

func (*PortForwarder) KeepAlive

func (p *PortForwarder) KeepAlive(ctx context.Context)

KeepAlive can be used to restart the port forwarding session in the background.

func (*PortForwarder) Stop

func (p *PortForwarder) Stop()

Stop terminates a port forwarding session.

type PortForwardingOpts

type PortForwardingOpts struct {
	Namespace     string
	LabelSelector string
	PodName       string
	LocalPort     int
	DestPort      int
}

Directories

Path Synopsis
swiftv2

Jump to

Keyboard shortcuts

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