kubectl

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 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 interface {
	// Run runs a kubectl command
	Run(arg ...string) error
	// Input runs a kubectl command with input
	Input(input io.Reader, arg ...string) error
	// String runs a kubectl command that outputs a string
	String(arg ...string) (string, error)
	// ErrorString runs a kubectl command that outputs an error string
	ErrorString(arg ...string) (string, error)
	// Lines runs a kubectl command that outputs multiple lines
	Lines(arg ...string) ([]string, error)
	// StartLines starts a kubectl command that
	// sends its lines of output to a callback
	StartLines(args []string, fn func(line string), end chan error) func()
	// Exec simulates replacing the current process with a kubectl command
	Exec(arg ...string) error
}

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

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