kubernetes

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 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 Executor

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

Executor handles the execution of Kubernetes commands

func NewExecutor

func NewExecutor() (*Executor, error)

NewExecutor creates a new Kubernetes executor

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, command string) (string, error)

Execute runs a kubectl command and returns the output

func (*Executor) GetContexts

func (e *Executor) GetContexts(ctx context.Context) ([]string, error)

GetContexts returns a list of available Kubernetes contexts

func (*Executor) GetCurrentContext

func (e *Executor) GetCurrentContext(ctx context.Context) (string, error)

GetCurrentContext returns the current Kubernetes context

func (*Executor) SetContext

func (e *Executor) SetContext(ctx context.Context, contextName string) error

SetContext changes the current Kubernetes context

Jump to

Keyboard shortcuts

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