Documentation ¶
Index ¶
- Variables
- func ClearClientSet()
- type APIContext
- type Clientset
- type Cmd
- type CmdGroup
- type Cmder
- type ContainerCreationExecContext
- type ContainerExecContext
- func (c *ContainerExecContext) ExecCommand(command []string) (stdout, stderr string, err error)
- func (c *ContainerExecContext) ExecCommandStdIn(command []string, buffIn bytes.Buffer) (stdout, stderr string, err error)
- func (c *ContainerExecContext) GetClientset() *Clientset
- func (c *ContainerExecContext) GetContainerName() string
- func (c *ContainerExecContext) GetNamespace() string
- func (c *ContainerExecContext) GetPodName() string
- func (c *ContainerExecContext) Refresh() error
- type ExecContext
- type Volume
Constants ¶
This section is empty.
Variables ¶
View Source
var NewSPDYExecutor = remotecommand.NewSPDYExecutor
Functions ¶
func ClearClientSet ¶
func ClearClientSet()
Types ¶
type APIContext ¶
type Clientset ¶
type Clientset struct { RestConfig *rest.Config DynamicClient dynamic.Interface OcpClient ocpconfig.Interface K8sClient kubernetes.Interface K8sRestClient rest.Interface KubeConfigPaths []string // contains filtered or unexported fields }
A Clientset contains clients for the different k8s API groups in one place
func GetClientset ¶
GetClientset returns the singleton clientset object.
type CmdGroup ¶
type CmdGroup struct {
// contains filtered or unexported fields
}
func (*CmdGroup) AddCommand ¶
func (*CmdGroup) ExtractResult ¶
func (*CmdGroup) GetCommand ¶
type ContainerCreationExecContext ¶
type ContainerCreationExecContext struct { *ContainerExecContext // contains filtered or unexported fields }
ContainerExecContext encapsulates the context in which a command is run; the namespace, pod, and container.
func NewContainerCreationExecContext ¶
func NewContainerCreationExecContext( clientset *Clientset, namespace, podName, containerName, containerImage string, labels map[string]string, command []string, containerSecurityContext *corev1.SecurityContext, hostNetwork bool, volumes []*Volume, ) *ContainerCreationExecContext
func (*ContainerCreationExecContext) CreatePodAndWait ¶
func (c *ContainerCreationExecContext) CreatePodAndWait() error
func (*ContainerCreationExecContext) DeletePodAndWait ¶
func (c *ContainerCreationExecContext) DeletePodAndWait() error
type ContainerExecContext ¶
type ContainerExecContext struct {
// contains filtered or unexported fields
}
ContainerExecContext encapsulates the context in which a command is run; the namespace, pod, and container.
func NewContainerContext ¶
func NewContainerContext( clientset *Clientset, namespace, podNamePrefix, containerName string, ) (*ContainerExecContext, error)
func (*ContainerExecContext) ExecCommand ¶
func (c *ContainerExecContext) ExecCommand(command []string) (stdout, stderr string, err error)
ExecCommand runs command in a container and returns output buffers
func (*ContainerExecContext) ExecCommandStdIn ¶
func (*ContainerExecContext) GetClientset ¶
func (c *ContainerExecContext) GetClientset() *Clientset
func (*ContainerExecContext) GetContainerName ¶
func (c *ContainerExecContext) GetContainerName() string
func (*ContainerExecContext) GetNamespace ¶
func (c *ContainerExecContext) GetNamespace() string
func (*ContainerExecContext) GetPodName ¶
func (c *ContainerExecContext) GetPodName() string
func (*ContainerExecContext) Refresh ¶
func (c *ContainerExecContext) Refresh() error
type ExecContext ¶
Click to show internal directories.
Click to hide internal directories.