pod

package
v0.0.0-...-08e63c9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exec

type Exec struct {
	RestConfig *rest.Config
	ClientSet  kubernetes.Interface
}

Exec struct for execute command on pod

func NewExec

func NewExec(config *rest.Config, client kubernetes.Interface) *Exec

NewExec create new Exec

func (*Exec) Execute

func (p *Exec) Execute(namespace, podName, containerName string, command []string) (*bytes.Buffer, *bytes.Buffer, *bytes.Buffer, error)

Execute execute command on current podName and containerName

type ExecFake

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

func NewExecFake

func NewExecFake(outFake *bytes.Buffer, errOutFake *bytes.Buffer, fakeError error) *ExecFake

func (*ExecFake) Execute

type Executor

type Executor interface {
	Execute(namespace, podName, containerName string, command []string) (*bytes.Buffer, *bytes.Buffer, *bytes.Buffer, error)
}

Executor interface for execute command on pod

Jump to

Keyboard shortcuts

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