kubectl

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

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

CLI represents the kubectl CLI

func NewCLI

func NewCLI(path string, options *Options, out *output.Interface, verb output.Level) *CLI

NewCLI creates a new kubectl CLI object

func (*CLI) Apply

func (k *CLI) Apply(manifest string) error

Apply runs a kubectl apply command

func (*CLI) Exec

func (k *CLI) Exec(arg ...string) error

Exec "replaces" the current process with a kubectl command

func (*CLI) Input

func (k *CLI) Input(input io.Reader, arg ...string) error

Input runs a kubectl command with input

func (*CLI) Lines

func (k *CLI) Lines(arg ...string) ([]string, error)

Lines runs a kubectl command that outputs multiple lines

func (*CLI) Run

func (k *CLI) Run(arg ...string) error

Run runs a kubectl command

func (*CLI) StartLines

func (k *CLI) StartLines(args []string, fn func(line string), end chan error) func()

StartLines starts a long-running kubectl command that sends its lines of standard output to a callback function

func (*CLI) String

func (k *CLI) String(arg ...string) (string, error)

String runs a kubectl command that outputs a string

type Options

type Options struct {
	Kubeconfig string
	Context    string
	Namespace  string
	Verbosity  int
}

Options represents global options for the kubectl CLI

Jump to

Keyboard shortcuts

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