kubernetes

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForwardPort

func ForwardPort(ctx context.Context, cmd *PortForwardCommand) error

ForwardPort forwards a port until context is canceled

Types

type PortForwardCommand

type PortForwardCommand struct {
	Namespace     string
	PodName       string
	Config        *restclient.Config
	Client        restclient.Interface
	PodClient     corev1client.PodsGetter
	Ports         []string
	Address       []string
	Out, ErrOut   *bytes.Buffer
	PortForwarder *portforward.PortForwarder
	StopChannel   chan struct{}
	ReadyChannel  chan struct{}
}

func BuildPortForwardCommand

func BuildPortForwardCommand(ctx context.Context, kubeConfigPath string, opts PortForwardOptions) (*PortForwardCommand, error)

type PortForwardOptions

type PortForwardOptions struct {
	Namespace  string
	Deployment string
	Ports      []string
	Context    string
}

Jump to

Keyboard shortcuts

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