k8sapi

package
v3.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

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.Clientset, config *restclient.Config, podName, namespace string) (*K8sAPIExecutor, error)

func (*K8sAPIExecutor) CopyFile

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

func (*K8sAPIExecutor) GetExitCode

func (k *K8sAPIExecutor) GetExitCode(ctx context.Context, containerID string) (string, error)

func (*K8sAPIExecutor) GetFileContents

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

func (*K8sAPIExecutor) GetOutputStream

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

func (*K8sAPIExecutor) Kill

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

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

func (*K8sAPIExecutor) Wait

func (k *K8sAPIExecutor) Wait(ctx context.Context, containerID string) error

Wait for the container to complete

func (*K8sAPIExecutor) WaitInit

func (k *K8sAPIExecutor) WaitInit() error

Jump to

Keyboard shortcuts

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