operations

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: EPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewSPDYExecutor = remotecommand.NewSPDYExecutor

NewSPDYExecutor is the function used to create a new SPDY Executor, with default value remotecommand.NewSPDYExecutor. Exposed only to enable testing code that uses the operations package.

Functions

func ExecCommandInPod

func ExecCommandInPod(client kubernetes.Interface, restconfig *rest.Config, podName, containerName, command string) (stdout, stderr *bytes.Buffer, err error)

func GetCurrentUserUID

func GetCurrentUserUID(token string, clientProvider ClientProvider) (string, error)

func GetCurrentWorkspacePod

func GetCurrentWorkspacePod(client kubernetes.Interface) (*corev1.Pod, error)

func StopDevWorkspace

func StopDevWorkspace(devworkspaceClient dynamic.Interface) error

Types

type ClientProvider

type ClientProvider interface {
	NewDevWorkspaceClient() (dynamic.Interface, *rest.Config, error)
	NewClientWithToken(token string) (kubernetes.Interface, *rest.Config, error)
	NewOpenShiftUserClient(token string) (dynamic.Interface, *rest.Config, error)
}

func DefaultClientProvider

func DefaultClientProvider() ClientProvider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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