k8sapi

package
Version: v3.3.8 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sAPIExecutor

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

func NewK8sAPIExecutor

func NewK8sAPIExecutor(clientset kubernetes.Interface, config *restclient.Config, podName, namespace string) *K8sAPIExecutor

func (*K8sAPIExecutor) CopyFile

func (k *K8sAPIExecutor) CopyFile(containerName string, sourcePath string, destPath string, compressionLevel int) error

func (*K8sAPIExecutor) GetFileContents

func (k *K8sAPIExecutor) GetFileContents(containerName string, sourcePath string) (string, error)

func (*K8sAPIExecutor) GetOutputStream

func (k *K8sAPIExecutor) GetOutputStream(ctx context.Context, containerName string, combinedOutput bool) (io.ReadCloser, error)

func (*K8sAPIExecutor) Kill

func (k *K8sAPIExecutor) Kill(ctx context.Context, containerNames []string, terminationGracePeriodDuration time.Duration) error

Kill kills a list of containers first with a SIGTERM then with a SIGKILL after a grace period

func (*K8sAPIExecutor) ListContainerNames

func (k *K8sAPIExecutor) ListContainerNames(ctx context.Context) ([]string, error)

func (*K8sAPIExecutor) Until

func (k *K8sAPIExecutor) Until(ctx context.Context, f func(pod *corev1.Pod) bool) error

func (*K8sAPIExecutor) Wait

func (k *K8sAPIExecutor) Wait(ctx context.Context, containerNames []string) error

Wait for the container to complete

Jump to

Keyboard shortcuts

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