k8s

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 13 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, logger logger, 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

Jump to

Keyboard shortcuts

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