Documentation
¶
Index ¶
Constants ¶
const DefaultContainerQuestion = "Select a container"
DefaultContainerQuestion defines the default question for selecting a container
const DefaultPodQuestion = "Select a pod"
DefaultPodQuestion defines the default question for selecting a pod
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CmdParameter ¶
type CmdParameter struct {
LabelSelector string
Namespace string
ContainerName string
PodName string
Pick *bool
Interactive bool
}
CmdParameter holds the parameter we receive from the command
type ConfigParameter ¶
type ConfigParameter struct {
LabelSelector map[string]string
Namespace string
ContainerName string
}
ConfigParameter holds the parameter we receive from the config
type SelectorParameter ¶
type SelectorParameter struct {
ConfigParameter ConfigParameter
CmdParameter CmdParameter
}
SelectorParameter holds the information from the config and the command overrides
func (*SelectorParameter) GetContainerName ¶
func (t *SelectorParameter) GetContainerName() string
GetContainerName retrieves the container name from the parameters
func (*SelectorParameter) GetLabelSelector ¶
func (t *SelectorParameter) GetLabelSelector(config *latest.Config) (string, error)
GetLabelSelector retrieves the label selector of the target
func (*SelectorParameter) GetNamespace ¶
func (t *SelectorParameter) GetNamespace(config *latest.Config, kubeClient kubectl.Client) (string, error)
GetNamespace retrieves the target namespace
func (*SelectorParameter) GetPodName ¶
func (t *SelectorParameter) GetPodName() string
GetPodName retrieves the pod name from the parameters
type TargetSelector ¶
type TargetSelector struct {
PodQuestion *string
ContainerQuestion *string
AllowNonRunning bool
SkipWait bool
// contains filtered or unexported fields
}
TargetSelector is the struct that will select a target
func NewTargetSelector ¶
func NewTargetSelector(config *latest.Config, kubeClient kubectl.Client, sp *SelectorParameter, allowPick bool, imageSelector []string) (*TargetSelector, error)
NewTargetSelector creates a new target selector for selecting a target pod or container