k8scli

package
v0.0.0-...-306ae6e Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithK8S

func WithK8S(fn ActionFunc) cli.ActionFunc

WithK8S is a wrapper for cli.ActionFunc to add kubernetes API capabilities.

Types

type ActionFunc

type ActionFunc func(ctx *Context) error

type Context

type Context struct {
	*cli.Context
	// contains filtered or unexported fields
}

func (*Context) Ctx

func (c *Context) Ctx() context.Context

func (*Context) Exec

func (c *Context) Exec(ctx context.Context, namespace, podName string, cmd ...string) error

func (*Context) KubeClient

func (c *Context) KubeClient() *kubernetes.Clientset

func (*Context) KubeConfig

func (c *Context) KubeConfig() *restclient.Config

func (*Context) Namespace

func (c *Context) Namespace() string

func (*Context) PortForward

func (c *Context) PortForward(ctx context.Context, namespace, podName, localPort, remotePort string, readyCh chan struct{}) error

Jump to

Keyboard shortcuts

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