Documentation ¶
Index ¶
- Constants
- Variables
- func ClearConsole() error
- func CmdRunWithFile(cmd string, autoOutput bool) string
- func CurrentTierPath(fPath string) []string
- func FetchAllNamespace() []*v1.Namespace
- func FetchAnnotationsValue(annos map[string]string, targetKey string) string
- func FetchConfigMapWithName(name, ns string) *v1.ConfigMap
- func FetchConfigMaps(ns string, labels_ ...map[string]string) []*v1.ConfigMap
- func FetchDaemonSetWithName(name, ns string) *appsv1.DaemonSet
- func FetchDaemonSets(ns string, labels_ ...map[string]string) []*appsv1.DaemonSet
- func FetchDeploymentWithName(name, ns string) *appsv1.Deployment
- func FetchDeployments(ns string, labels_ ...map[string]string) []*appsv1.Deployment
- func FetchEvents(uid types.UID, labels_ ...map[string]string) []*v1.Event
- func FetchFirstArg(line string) string
- func FetchJobWithName(name, ns string) *batchv1.Job
- func FetchJobs(ns string, labels_ ...map[string]string) []*batchv1.Job
- func FetchNodeWithName(name string) *v1.Node
- func FetchNodes(labels_ ...map[string]string) []*v1.Node
- func FetchPodWithName(name, ns string) *v1.Pod
- func FetchPods(ns string, labels_ ...map[string]string) []*v1.Pod
- func FetchReplicaSetWithName(name, ns string) *appsv1.ReplicaSet
- func FetchReplicaSets(ns string, labels_ ...map[string]string) []*appsv1.ReplicaSet
- func FetchServiceWithName(name, ns string) *v1.Service
- func FetchServices(ns string, labels_ ...map[string]string) []*v1.Service
- func FetchStatefulSetWithName(name, ns string) *appsv1.StatefulSet
- func FetchStatefulSets(ns string, labels_ ...map[string]string) []*appsv1.StatefulSet
- func FilePathComplete(p string) []prompt.Suggest
- func FormatLineWithSpace(line string) []string
- func FormatResourceName(name, ns string) string
- func GetLineAfterPipe(line string) string
- func GetLineBeforePipe(line string) string
- func GetWordAfterArgWithSpace(line string, arg string) string
- func InitClient()
- func InitInformerCache()
- func Int2String(d interface{}) string
- func K8sCmdRun(line string, autoOutput bool, ns string) string
- func Logger(contents ...interface{})
- func Map2Slice(m map[string]string) []string
- func Map2String(m map[string]string) string
- func MsgExpectLineWord(cnt int) string
- func NewTable(writer io.Writer) *tablewriter.Table
- func ParserLabels(labels_ []map[string]string) labels.Selector
- func ParserResourceName(fmtName string) (name, ns string)
- func ParserServicePorts2String(ports []v1.ServicePort) string
- func PodExec(pod *v1.Pod, container, cmd string) string
- func Print(contents ...interface{})
- func PureCmdRun(line string, autoOutput bool) string
- func RegisterCmdResources(resource CmdResourceInterface)
- func RuleCanRemind(d prompt.Document) bool
- func RuleCanRemindHelper(d prompt.Document) bool
- func RuleHasPrefix(word string, prefix ...string) bool
- func RuleJudgeLabelSelectorMatch(selector, label map[string]string) bool
- func RuleJudgeLastWordIsOption(line string) bool
- func RuleJudgeLineHasSpace(line string) bool
- func RuleJudgeLineHasWords(line string, words ...string) bool
- func RuleJudgeLineWordCount(line string, cnt int, cmp CompareAct) bool
- func RuleJudgeWordExists(word string, words ...string) bool
- func RuntimeObject2Json(obj runtime.Object) string
- func RuntimeObject2Yaml(obj runtime.Object) string
- func SliceResource2SliceMetav1Obj(resources interface{}) []metav1.Object
- func SliceResource2SliceRuntimeObj(resources interface{}) []runtime.Object
- func SliceString2String(s []string) string
- func WrapError(err error)
- type CmdResRelationshipInterface
- type CmdResSuggestionInterface
- type CmdResourceInterface
- type CompareAct
- type ConfigMap
- func (this *ConfigMap) CanExecute(ctx *PromptCtx) bool
- func (this *ConfigMap) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest
- func (this *ConfigMap) Execute(ctx *PromptCtx) string
- func (this *ConfigMap) FindResourceName(ctx *PromptCtx) string
- func (this *ConfigMap) Name() string
- func (this *ConfigMap) ShortName() string
- func (this *ConfigMap) Suggestions(ctx *PromptCtx) []prompt.Suggest
- type ConfigMapExecutor
- type ConfigMapSuggestion
- type DaemonSetRelationship
- type DaemonSets
- func (this *DaemonSets) CanExecute(ctx *PromptCtx) bool
- func (this *DaemonSets) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest
- func (this *DaemonSets) Execute(ctx *PromptCtx) string
- func (this *DaemonSets) FindResourceName(ctx *PromptCtx) string
- func (this *DaemonSets) Name() string
- func (this *DaemonSets) ShortName() string
- func (this *DaemonSets) Suggestions(ctx *PromptCtx) []prompt.Suggest
- type DaemonSetsExecutor
- type DaemonSetsSuggestion
- type Deploy
- func (this *Deploy) CanExecute(ctx *PromptCtx) bool
- func (this *Deploy) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest
- func (this *Deploy) Execute(ctx *PromptCtx) string
- func (this *Deploy) FindResourceName(ctx *PromptCtx) string
- func (this *Deploy) Name() string
- func (this *Deploy) ShortName() string
- func (this *Deploy) Suggestions(ctx *PromptCtx) []prompt.Suggest
- type DeployExecutor
- func (this *DeployExecutor) Event(deploy *appv1.Deployment) string
- func (this *DeployExecutor) Label(deploy *appv1.Deployment) string
- func (this *DeployExecutor) Output(deploy *appv1.Deployment, arg string) string
- func (this *DeployExecutor) Relationship(deploy *appv1.Deployment) string
- func (this *DeployExecutor) Volume(deploy *appv1.Deployment) string
- type DeployRelationship
- type DeploySuggestion
- type GenericHandler
- type Namespaces
- func (this *Namespaces) CanExecute(ctx *PromptCtx) bool
- func (this *Namespaces) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest
- func (this *Namespaces) Execute(ctx *PromptCtx) string
- func (this *Namespaces) FindResourceName(ctx *PromptCtx) string
- func (this *Namespaces) Name() string
- func (this *Namespaces) ShortName() string
- func (this *Namespaces) Suggestions(ctx *PromptCtx) []prompt.Suggest
- type NamespacesSuggestion
- type Nodes
- func (this *Nodes) CanExecute(ctx *PromptCtx) bool
- func (this *Nodes) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest
- func (this *Nodes) Execute(ctx *PromptCtx) string
- func (this *Nodes) FindResourceName(ctx *PromptCtx) string
- func (this *Nodes) Name() string
- func (this *Nodes) ShortName() string
- func (this *Nodes) Suggestions(ctx *PromptCtx) []prompt.Suggest
- type NodesExecutor
- type NodesSuggestion
- type Pod
- func (this *Pod) CanExecute(ctx *PromptCtx) bool
- func (this *Pod) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest
- func (this *Pod) Execute(ctx *PromptCtx) string
- func (this *Pod) FindResourceName(ctx *PromptCtx) string
- func (this *Pod) Name() string
- func (this *Pod) ShortName() string
- func (this *Pod) Suggestions(ctx *PromptCtx) []prompt.Suggest
- type PodRelationship
- type PodsExecutor
- func (this PodsExecutor) Events(pod *v1.Pod) string
- func (this PodsExecutor) Interactive(pod *v1.Pod, arg1, arg2 string) string
- func (this PodsExecutor) Labels(pod *v1.Pod) string
- func (this PodsExecutor) Output(pod *v1.Pod, arg string) string
- func (this PodsExecutor) Relationship(pod *v1.Pod) string
- func (this PodsExecutor) ServiceAccount(pod *v1.Pod) string
- func (this PodsExecutor) Volumes(pod *v1.Pod) string
- type PodsSuggestion
- func (this PodsSuggestion) ArgsInteractive() []prompt.Suggest
- func (this PodsSuggestion) ArgsOutput() []prompt.Suggest
- func (this PodsSuggestion) ArgsPodName() []prompt.Suggest
- func (this PodsSuggestion) ArgsRelationship() []prompt.Suggest
- func (this PodsSuggestion) ArgsShell() []prompt.Suggest
- func (this PodsSuggestion) Helper() []prompt.Suggest
- type PromptCtx
- type ResourceObjSlice
- type Service
- func (this *Service) CanExecute(ctx *PromptCtx) bool
- func (this *Service) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest
- func (this *Service) Execute(ctx *PromptCtx) string
- func (this *Service) FindResourceName(ctx *PromptCtx) string
- func (this *Service) Name() string
- func (this *Service) ShortName() string
- func (this *Service) Suggestions(ctx *PromptCtx) []prompt.Suggest
- type ServiceExecutor
- type ServiceRelationship
- type ServicesSuggestion
- type StringSlice
- type SuggestSlice
Constants ¶
View Source
const ( KubeQueryHelp = `` /* 815-byte string literal not displayed */ KubePromptHelp = `` /* 2870-byte string literal not displayed */ )
View Source
const ( Empty = "" Space = " " // desc K8sShortcutDesc = "k8s resource shortcut query." // all namespace AllNamespace = "all" // k8s resource kind KindDaemonSet = "DaemonSet" KindDeployment = "Deployment" KindReplicaSet = "ReplicaSet" KindStatefulSet = "StatefulSet" KindPod = "Pod" KindNode = "Node" KindService = "Service" KindJob = "Job" )
Variables ¶
View Source
var ( RestCliConfig *rest.Config ClientSet *kubernetes.Clientset InfoFact informers.SharedInformerFactory ReloadInfoFactChan chan bool )
View Source
var ( ArgOutput = prompt.Suggest{Text: "-o", Description: "output one of mode: [yaml|desc|json]. default: desc."} ArgRelationship = prompt.Suggest{Text: "-r", Description: "relationship, display resource label relationship."} ArgLabel = prompt.Suggest{Text: "-l", Description: "label, display labels."} ArgServiceAccount = prompt.Suggest{Text: "-a", Description: "account (service), display service account."} ArgVolumes = prompt.Suggest{Text: "-v", Description: "volumes, display volumes & volume mounts."} ArgEvents = prompt.Suggest{Text: "-e", Description: "events, display events."} ArgInteractive = prompt.Suggest{Text: "-i", Description: "interactive, interactive with container. default: the first container."} ArgShell = prompt.Suggest{Text: "-s", Description: "shell command, specify shell command like: sh, /bin/bash. [default: sh]"} ArgAnnotaions = prompt.Suggest{Text: "--anno", Description: "show annotations."} // output mode ModeYAML = prompt.Suggest{Text: "yaml", Description: "Output for yaml mode."} ModeDesc = prompt.Suggest{Text: "desc", Description: "Output for desc mode."} ModeJson = prompt.Suggest{Text: "json", Description: "Output for json mode."} )
View Source
var ( // config Debug bool ResourcesList []CmdResourceInterface ConsoleStdoutWriter prompt.ConsoleWriter // use namespace GlobalNamespace = "default" )
View Source
var (
CmdHelpInfo = KubeQueryHelp + "\n" + "---" + "\n" + KubePromptHelp
)
Functions ¶
func ClearConsole ¶
func ClearConsole() error
func CmdRunWithFile ¶
func CurrentTierPath ¶
func FetchAllNamespace ¶
func FetchAnnotationsValue ¶
func FetchConfigMapWithName ¶
func FetchConfigMaps ¶
func FetchDaemonSetWithName ¶
func FetchDaemonSets ¶
func FetchDeploymentWithName ¶
func FetchDeploymentWithName(name, ns string) *appsv1.Deployment
func FetchDeployments ¶
func FetchDeployments(ns string, labels_ ...map[string]string) []*appsv1.Deployment
func FetchFirstArg ¶
func FetchJobWithName ¶
func FetchNodeWithName ¶
func FetchPodWithName ¶
func FetchReplicaSetWithName ¶
func FetchReplicaSetWithName(name, ns string) *appsv1.ReplicaSet
func FetchReplicaSets ¶
func FetchReplicaSets(ns string, labels_ ...map[string]string) []*appsv1.ReplicaSet
func FetchServiceWithName ¶
func FetchStatefulSetWithName ¶
func FetchStatefulSetWithName(name, ns string) *appsv1.StatefulSet
func FetchStatefulSets ¶
func FetchStatefulSets(ns string, labels_ ...map[string]string) []*appsv1.StatefulSet
func FilePathComplete ¶
func FilePathComplete(p string) []prompt.Suggest
func FormatLineWithSpace ¶
func FormatResourceName ¶
func GetLineAfterPipe ¶
func GetLineBeforePipe ¶
func InitClient ¶
func InitClient()
func InitInformerCache ¶
func InitInformerCache()
func Int2String ¶
func Int2String(d interface{}) string
func Map2String ¶
func MsgExpectLineWord ¶
func ParserResourceName ¶
func ParserServicePorts2String ¶
func ParserServicePorts2String(ports []v1.ServicePort) string
func PureCmdRun ¶
func RegisterCmdResources ¶
func RegisterCmdResources(resource CmdResourceInterface)
func RuleCanRemind ¶
func RuleCanRemind(d prompt.Document) bool
func RuleCanRemindHelper ¶
func RuleCanRemindHelper(d prompt.Document) bool
func RuleHasPrefix ¶
func RuleJudgeLineHasSpace ¶
func RuleJudgeLineHasWords ¶
func RuleJudgeLineWordCount ¶
func RuleJudgeLineWordCount(line string, cnt int, cmp CompareAct) bool
func RuleJudgeWordExists ¶
func RuntimeObject2Json ¶
func RuntimeObject2Yaml ¶
func SliceString2String ¶
Types ¶
type CmdResRelationshipInterface ¶
type CmdResRelationshipInterface interface {
// contains filtered or unexported methods
}
type CmdResSuggestionInterface ¶
type CmdResSuggestionInterface interface {
Helper() []prompt.Suggest
}
type CmdResourceInterface ¶
type CompareAct ¶
type CompareAct string
var ( Equal CompareAct = "==" GreaterEqual CompareAct = ">=" LessEqual CompareAct = "<=" Greater CompareAct = ">" Less CompareAct = "<" )
type ConfigMap ¶
type ConfigMap struct {
// contains filtered or unexported fields
}
func NewConfigMap ¶
func NewConfigMap() *ConfigMap
func (*ConfigMap) CanExecute ¶
func (*ConfigMap) DefaultSuggestions ¶
func (*ConfigMap) FindResourceName ¶
func (*ConfigMap) Suggestions ¶
type ConfigMapExecutor ¶
type ConfigMapExecutor struct { Tool *cmdResourceExecutorTool // contains filtered or unexported fields }
func NewConfigMapExecutor ¶
func NewConfigMapExecutor(ctx *PromptCtx) *ConfigMapExecutor
type ConfigMapSuggestion ¶
type ConfigMapSuggestion struct {
// contains filtered or unexported fields
}
func NewConfigMapSuggestion ¶
func NewConfigMapSuggestion(ctx *PromptCtx) *ConfigMapSuggestion
func (ConfigMapSuggestion) ArgCmName ¶
func (this ConfigMapSuggestion) ArgCmName() []prompt.Suggest
func (ConfigMapSuggestion) ArgsOutput ¶
func (this ConfigMapSuggestion) ArgsOutput() []prompt.Suggest
o
func (ConfigMapSuggestion) Helper ¶
func (this ConfigMapSuggestion) Helper() []prompt.Suggest
type DaemonSetRelationship ¶
type DaemonSetRelationship struct { Tool *cmdResourceRelaTool // contains filtered or unexported fields }
func NewDaemonSetRelationship ¶
func NewDaemonSetRelationship(ds *appsv1.DaemonSet) *DaemonSetRelationship
func (*DaemonSetRelationship) Pod ¶
func (this *DaemonSetRelationship) Pod() string
func (*DaemonSetRelationship) Service ¶
func (this *DaemonSetRelationship) Service() string
type DaemonSets ¶
type DaemonSets struct {
// contains filtered or unexported fields
}
func NewDaemonSets ¶
func NewDaemonSets() *DaemonSets
func (*DaemonSets) CanExecute ¶
func (this *DaemonSets) CanExecute(ctx *PromptCtx) bool
func (*DaemonSets) DefaultSuggestions ¶
func (*DaemonSets) Execute ¶
func (this *DaemonSets) Execute(ctx *PromptCtx) string
func (*DaemonSets) FindResourceName ¶
func (*DaemonSets) Name ¶
func (this *DaemonSets) Name() string
func (*DaemonSets) ShortName ¶
func (this *DaemonSets) ShortName() string
func (*DaemonSets) Suggestions ¶
func (this *DaemonSets) Suggestions(ctx *PromptCtx) []prompt.Suggest
type DaemonSetsExecutor ¶
type DaemonSetsExecutor struct { Tool *cmdResourceExecutorTool // contains filtered or unexported fields }
func NewDaemonSetsExecutor ¶
func NewDaemonSetsExecutor(ctx *PromptCtx) *DaemonSetsExecutor
func (DaemonSetsExecutor) Events ¶
func (this DaemonSetsExecutor) Events(ds *appsv1.DaemonSet) string
e
func (DaemonSetsExecutor) Labels ¶
func (this DaemonSetsExecutor) Labels(ds *appsv1.DaemonSet) string
l
func (DaemonSetsExecutor) Output ¶
func (this DaemonSetsExecutor) Output(ds *appsv1.DaemonSet, arg string) string
o
func (*DaemonSetsExecutor) Relationship ¶
func (this *DaemonSetsExecutor) Relationship(ds *appsv1.DaemonSet) string
type DaemonSetsSuggestion ¶
type DaemonSetsSuggestion struct {
// contains filtered or unexported fields
}
func NewDaemonSetsSuggestion ¶
func NewDaemonSetsSuggestion(ctx *PromptCtx) *DaemonSetsSuggestion
func (DaemonSetsSuggestion) ArgDsName ¶
func (this DaemonSetsSuggestion) ArgDsName() []prompt.Suggest
func (DaemonSetsSuggestion) ArgsOutput ¶
func (this DaemonSetsSuggestion) ArgsOutput() []prompt.Suggest
o
func (DaemonSetsSuggestion) Helper ¶
func (this DaemonSetsSuggestion) Helper() []prompt.Suggest
type Deploy ¶
type Deploy struct {
// contains filtered or unexported fields
}
func (*Deploy) CanExecute ¶
func (*Deploy) DefaultSuggestions ¶
func (*Deploy) FindResourceName ¶
func (*Deploy) Suggestions ¶
type DeployExecutor ¶
type DeployExecutor struct { Tool *cmdResourceExecutorTool // contains filtered or unexported fields }
func NewDeployExecutor ¶
func NewDeployExecutor(ctx *PromptCtx) *DeployExecutor
func (*DeployExecutor) Event ¶
func (this *DeployExecutor) Event(deploy *appv1.Deployment) string
func (*DeployExecutor) Label ¶
func (this *DeployExecutor) Label(deploy *appv1.Deployment) string
func (*DeployExecutor) Output ¶
func (this *DeployExecutor) Output(deploy *appv1.Deployment, arg string) string
func (*DeployExecutor) Relationship ¶
func (this *DeployExecutor) Relationship(deploy *appv1.Deployment) string
func (*DeployExecutor) Volume ¶
func (this *DeployExecutor) Volume(deploy *appv1.Deployment) string
type DeployRelationship ¶
type DeployRelationship struct { Tool *cmdResourceRelaTool // contains filtered or unexported fields }
func NewDeployRelationship ¶
func NewDeployRelationship(deploy *appv1.Deployment) *DeployRelationship
func (*DeployRelationship) Pod ¶
func (this *DeployRelationship) Pod() string
func (*DeployRelationship) ReplicaSet ¶
func (this *DeployRelationship) ReplicaSet() string
func (*DeployRelationship) Service ¶
func (this *DeployRelationship) Service() string
type DeploySuggestion ¶
type DeploySuggestion struct {
// contains filtered or unexported fields
}
func NewDeploySuggestion ¶
func NewDeploySuggestion(ctx *PromptCtx) *DeploySuggestion
func (DeploySuggestion) ArgDeployName ¶
func (this DeploySuggestion) ArgDeployName() []prompt.Suggest
func (DeploySuggestion) Helper ¶
func (this DeploySuggestion) Helper() []prompt.Suggest
type GenericHandler ¶
type GenericHandler struct { }
func (*GenericHandler) OnAdd ¶
func (this *GenericHandler) OnAdd(obj interface{})
func (*GenericHandler) OnDelete ¶
func (this *GenericHandler) OnDelete(obj interface{})
func (*GenericHandler) OnUpdate ¶
func (this *GenericHandler) OnUpdate(oldObj, newObj interface{})
type Namespaces ¶
type Namespaces struct {
// contains filtered or unexported fields
}
func NewNamespaces ¶
func NewNamespaces() *Namespaces
func (*Namespaces) CanExecute ¶
func (this *Namespaces) CanExecute(ctx *PromptCtx) bool
func (*Namespaces) DefaultSuggestions ¶
func (*Namespaces) Execute ¶
func (this *Namespaces) Execute(ctx *PromptCtx) string
func (*Namespaces) FindResourceName ¶
func (*Namespaces) Name ¶
func (this *Namespaces) Name() string
func (*Namespaces) ShortName ¶
func (this *Namespaces) ShortName() string
func (*Namespaces) Suggestions ¶
func (this *Namespaces) Suggestions(ctx *PromptCtx) []prompt.Suggest
type NamespacesSuggestion ¶
type NamespacesSuggestion struct {
// contains filtered or unexported fields
}
func NewNamespacesSuggestion ¶
func NewNamespacesSuggestion(ctx *PromptCtx) *NamespacesSuggestion
func (*NamespacesSuggestion) Helper ¶
func (this *NamespacesSuggestion) Helper() []prompt.Suggest
type Nodes ¶
type Nodes struct {
// contains filtered or unexported fields
}
func (*Nodes) CanExecute ¶
func (*Nodes) DefaultSuggestions ¶
func (*Nodes) FindResourceName ¶
func (*Nodes) Suggestions ¶
type NodesExecutor ¶
type NodesExecutor struct { Tool *cmdResourceExecutorTool // contains filtered or unexported fields }
func NewNodesExecutor ¶
func NewNodesExecutor(ctx *PromptCtx) *NodesExecutor
type NodesSuggestion ¶
type NodesSuggestion struct {
// contains filtered or unexported fields
}
func NewNodesSuggestion ¶
func NewNodesSuggestion(ctx *PromptCtx) *NodesSuggestion
func (NodesSuggestion) ArgCmName ¶
func (this NodesSuggestion) ArgCmName() []prompt.Suggest
func (NodesSuggestion) Helper ¶
func (this NodesSuggestion) Helper() []prompt.Suggest
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
func (*Pod) CanExecute ¶
func (*Pod) DefaultSuggestions ¶
func (*Pod) FindResourceName ¶
func (*Pod) Suggestions ¶
type PodRelationship ¶
type PodRelationship struct { Tool *cmdResourceRelaTool // contains filtered or unexported fields }
func NewPodRelationship ¶
func NewPodRelationship(pod *v1.Pod) *PodRelationship
func (*PodRelationship) DaemonSet ¶
func (this *PodRelationship) DaemonSet() string
func (*PodRelationship) Deployment ¶
func (this *PodRelationship) Deployment() string
func (*PodRelationship) Job ¶
func (this *PodRelationship) Job() string
func (*PodRelationship) ReplicaSet ¶
func (this *PodRelationship) ReplicaSet() string
func (*PodRelationship) Service ¶
func (this *PodRelationship) Service() string
func (*PodRelationship) StatefulSet ¶
func (this *PodRelationship) StatefulSet() string
type PodsExecutor ¶
type PodsExecutor struct { Tool *cmdResourceExecutorTool // contains filtered or unexported fields }
func NewPodsExecutor ¶
func NewPodsExecutor(ctx *PromptCtx) *PodsExecutor
func (PodsExecutor) Interactive ¶
func (this PodsExecutor) Interactive(pod *v1.Pod, arg1, arg2 string) string
i
func (PodsExecutor) Relationship ¶
func (this PodsExecutor) Relationship(pod *v1.Pod) string
r, search service, deployment, rs, daemonset, job
type PodsSuggestion ¶
type PodsSuggestion struct {
// contains filtered or unexported fields
}
func NewPodsSuggestion ¶
func NewPodsSuggestion(ctx *PromptCtx) *PodsSuggestion
func (PodsSuggestion) ArgsInteractive ¶
func (this PodsSuggestion) ArgsInteractive() []prompt.Suggest
i
func (PodsSuggestion) ArgsPodName ¶
func (this PodsSuggestion) ArgsPodName() []prompt.Suggest
func (PodsSuggestion) ArgsRelationship ¶
func (this PodsSuggestion) ArgsRelationship() []prompt.Suggest
r
func (PodsSuggestion) Helper ¶
func (this PodsSuggestion) Helper() []prompt.Suggest
type ResourceObjSlice ¶
sort
func (ResourceObjSlice) Len ¶
func (this ResourceObjSlice) Len() int
func (ResourceObjSlice) Less ¶
func (this ResourceObjSlice) Less(i, j int) bool
func (ResourceObjSlice) Swap ¶
func (this ResourceObjSlice) Swap(i, j int)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService() *Service
func (*Service) CanExecute ¶
func (*Service) DefaultSuggestions ¶
func (*Service) FindResourceName ¶
func (*Service) Suggestions ¶
type ServiceExecutor ¶
type ServiceExecutor struct { Tool *cmdResourceExecutorTool // contains filtered or unexported fields }
func NewServiceExecutor ¶
func NewServiceExecutor(ctx *PromptCtx) *ServiceExecutor
func (ServiceExecutor) Output ¶
func (this ServiceExecutor) Output(svc *v1.Service, arg string) string
o
func (ServiceExecutor) Relationship ¶
func (this ServiceExecutor) Relationship(svc *v1.Service) string
r, pods
type ServiceRelationship ¶
type ServiceRelationship struct { Tool *cmdResourceRelaTool // contains filtered or unexported fields }
func NewServiceRelationship ¶
func NewServiceRelationship(svc *v1.Service) *ServiceRelationship
func (*ServiceRelationship) Pods ¶
func (this *ServiceRelationship) Pods() string
type ServicesSuggestion ¶
type ServicesSuggestion struct {
// contains filtered or unexported fields
}
func NewServicesSuggestion ¶
func NewServicesSuggestion(ctx *PromptCtx) *ServicesSuggestion
func (ServicesSuggestion) ArgSvcName ¶
func (this ServicesSuggestion) ArgSvcName() []prompt.Suggest
func (ServicesSuggestion) ArgsOutput ¶
func (this ServicesSuggestion) ArgsOutput() []prompt.Suggest
o
func (ServicesSuggestion) Helper ¶
func (this ServicesSuggestion) Helper() []prompt.Suggest
type StringSlice ¶
type StringSlice []string
func (StringSlice) Len ¶
func (this StringSlice) Len() int
func (StringSlice) Less ¶
func (this StringSlice) Less(i, j int) bool
func (StringSlice) Swap ¶
func (this StringSlice) Swap(i, j int)
type SuggestSlice ¶
type SuggestSlice []prompt.Suggest
func (SuggestSlice) Len ¶
func (this SuggestSlice) Len() int
func (SuggestSlice) Less ¶
func (this SuggestSlice) Less(i, j int) bool
func (SuggestSlice) Swap ¶
func (this SuggestSlice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.