common

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPort

func CheckPort(port int) error

func Execute

func Execute(clientset *kubernetes.Clientset, restcfg *restclient.Config, target *ExecTarget, cmd string, toStdout, toStdin bool) (string, error)

func GetPod

func GetPod(podName, containerName, namespace string, clientset *kubernetes.Clientset, restcfg *restclient.Config) (*corev1.Pod, error)

Types

type ExecTarget

type ExecTarget struct {
	Pod       *corev1.Pod
	Container string
}

type PortForwarder

type PortForwarder struct {
	Clientset  *kubernetes.Clientset
	RestConfig *restclient.Config
	Pod        *corev1.Pod
	LocalPort  int
	PodPort    int
	Streams    genericclioptions.IOStreams
	StopCh     chan struct{}
	ReadyCh    chan struct{}
	Started    bool
}

func NewPortForwarder

func NewPortForwarder(clientset *kubernetes.Clientset, restcfg *restclient.Config, pod *corev1.Pod, podPort, localPort int) *PortForwarder

func (*PortForwarder) Start

func (p *PortForwarder) Start() error

func (*PortForwarder) Stop

func (p *PortForwarder) Stop()

Jump to

Keyboard shortcuts

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