k8s

package
v1.0.54 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubectlExecutor

type KubectlExecutor struct{}

KubectlExecutor implements the CommandExecutor interface for kubectl commands

func NewExecutor

func NewExecutor() *KubectlExecutor

NewExecutor creates a new KubectlExecutor instance

func (*KubectlExecutor) Execute

func (e *KubectlExecutor) Execute(command string) (string, error)

Execute handles general kubectl command execution (for backward compatibility)

func (*KubectlExecutor) ExecuteSpecificCommand

func (e *KubectlExecutor) ExecuteSpecificCommand(cmd string, params map[string]interface{}) (string, error)

ExecuteSpecificCommand executes a specific kubectl command with the given arguments

type ShellProcess

type ShellProcess struct {
	Command         string
	StripNewlines   bool
	ReturnErrOutput bool
	Timeout         int // in seconds
}

ShellProcess wraps a shell command execution

func NewShellProcess

func NewShellProcess(command string, timeout int) *ShellProcess

NewShellProcess creates a new ShellProcess

func (*ShellProcess) Exec

func (s *ShellProcess) Exec(commands string) (string, error)

Exec runs the commands and returns the output

func (*ShellProcess) Run

func (s *ShellProcess) Run(args string) (string, error)

Run executes the command with the given arguments

Jump to

Keyboard shortcuts

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