Documentation
¶
Index ¶
Constants ¶
const ( Pods = "pods" Exec = "exec" Post = "POST" ContainerName = "containerName" PodName = "podName" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfoExec ¶
type InfoExec interface { // Spawn info exec inside container. Return error in // case fail exec creation or fail command. Start() (err error) // Get output with exec command information. GetOutput() (output string) }
InfoExec - exec to spawn some simple not shell based command which returns output with some useful information.
type InfoExecCreator ¶
type InfoExecCreator interface { // Create new info exec. Return error in case fail. CreateInfoExec(command []string, containerInfo *model.ContainerInfo) (infoExec InfoExec) }
InfoExecCreator - factory for InfoExec creation.
type KubernetesInfoExec ¶
type KubernetesInfoExec struct {
// contains filtered or unexported fields
}
Exec to get some information from container. Command for such exec should be simple(For example: "whoami", "arch", "env") and completable otherwise it will be timeout in 3 seconds. This exec is always not "tty" and doesn't provide sending input to the command.
func NewKubernetesInfoExec ¶
func NewKubernetesInfoExec( command []string, containerName string, podName string, namespace string, core v1.CoreV1Interface, config *rest.Config) *KubernetesInfoExec
Create new kubernetes exec.
func (*KubernetesInfoExec) GetOutput ¶
func (exec *KubernetesInfoExec) GetOutput() string
Get exec output content.
func (*KubernetesInfoExec) Start ¶
func (exec *KubernetesInfoExec) Start() (err error)
Start new kubernetes info exec.
type KubernetesInfoExecCreator ¶
type KubernetesInfoExecCreator struct { InfoExecCreator // contains filtered or unexported fields }
Component to creation new info execs on the kubernetes infrastructure.
func NewKubernetesInfoExecCreator ¶
func NewKubernetesInfoExecCreator( namespace string, core v1.CoreV1Interface, config *rest.Config) *KubernetesInfoExecCreator
Return new instance of the kubernetes info exec creator.
func (*KubernetesInfoExecCreator) CreateInfoExec ¶
func (creator *KubernetesInfoExecCreator) CreateInfoExec(command []string, containerInfo *model.ContainerInfo) InfoExec
Create new kubernetes info exec.