query

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 36 Imported by: 0

Documentation

Index

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 CmdRunWithFile(cmd string, autoOutput bool) string

func CurrentTierPath

func CurrentTierPath(fPath string) []string

func FetchAllNamespace

func FetchAllNamespace() []*v1.Namespace

func FetchAnnotationsValue

func FetchAnnotationsValue(annos map[string]string, targetKey string) string

func FetchConfigMapWithName

func FetchConfigMapWithName(name, ns string) *v1.ConfigMap

func FetchConfigMaps

func FetchConfigMaps(ns string, labels_ ...map[string]string) []*v1.ConfigMap

func FetchDaemonSetWithName

func FetchDaemonSetWithName(name, ns string) *appsv1.DaemonSet

func FetchDaemonSets

func FetchDaemonSets(ns string, labels_ ...map[string]string) []*appsv1.DaemonSet

func FetchDeploymentWithName

func FetchDeploymentWithName(name, ns string) *appsv1.Deployment

func FetchDeployments

func FetchDeployments(ns string, labels_ ...map[string]string) []*appsv1.Deployment

func FetchEvents

func FetchEvents(uid types.UID, labels_ ...map[string]string) []*v1.Event

func FetchFirstArg

func FetchFirstArg(line string) string

func FetchJobWithName

func FetchJobWithName(name, ns string) *batchv1.Job

func FetchJobs

func FetchJobs(ns string, labels_ ...map[string]string) []*batchv1.Job

func FetchNodeWithName

func FetchNodeWithName(name string) *v1.Node

func FetchNodes

func FetchNodes(labels_ ...map[string]string) []*v1.Node

func FetchPodWithName

func FetchPodWithName(name, ns string) *v1.Pod

func FetchPods

func FetchPods(ns string, labels_ ...map[string]string) []*v1.Pod

func FetchReplicaSetWithName

func FetchReplicaSetWithName(name, ns string) *appsv1.ReplicaSet

func FetchReplicaSets

func FetchReplicaSets(ns string, labels_ ...map[string]string) []*appsv1.ReplicaSet

func FetchServiceWithName

func FetchServiceWithName(name, ns string) *v1.Service

func FetchServices

func FetchServices(ns string, labels_ ...map[string]string) []*v1.Service

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 FormatLineWithSpace(line string) []string

func FormatResourceName

func FormatResourceName(name, ns string) string

func GetLineAfterPipe

func GetLineAfterPipe(line string) string

func GetLineBeforePipe

func GetLineBeforePipe(line string) string

func GetWordAfterArgWithSpace

func GetWordAfterArgWithSpace(line string, arg string) string

func InitClient

func InitClient()

func InitInformerCache

func InitInformerCache()

func Int2String

func Int2String(d interface{}) string

func K8sCmdRun

func K8sCmdRun(line string, autoOutput bool, ns string) string

func Logger

func Logger(contents ...interface{})

func Map2Slice

func Map2Slice(m map[string]string) []string

func Map2String

func Map2String(m map[string]string) string

func MsgExpectLineWord

func MsgExpectLineWord(cnt int) string

func NewTable

func NewTable(writer io.Writer) *tablewriter.Table

func ParserLabels

func ParserLabels(labels_ []map[string]string) labels.Selector

func ParserResourceName

func ParserResourceName(fmtName string) (name, ns string)

func ParserServicePorts2String

func ParserServicePorts2String(ports []v1.ServicePort) string

func PodExec

func PodExec(pod *v1.Pod, container, cmd string) string

func Print

func Print(contents ...interface{})

func PureCmdRun

func PureCmdRun(line string, autoOutput bool) string

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 RuleHasPrefix(word string, prefix ...string) bool

func RuleJudgeLabelSelectorMatch

func RuleJudgeLabelSelectorMatch(selector, label map[string]string) bool

func RuleJudgeLastWordIsOption

func RuleJudgeLastWordIsOption(line string) bool

func RuleJudgeLineHasSpace

func RuleJudgeLineHasSpace(line string) bool

func RuleJudgeLineHasWords

func RuleJudgeLineHasWords(line string, words ...string) bool

func RuleJudgeLineWordCount

func RuleJudgeLineWordCount(line string, cnt int, cmp CompareAct) bool

func RuleJudgeWordExists

func RuleJudgeWordExists(word string, words ...string) bool

func RuntimeObject2Json

func RuntimeObject2Json(obj runtime.Object) string

func RuntimeObject2Yaml

func RuntimeObject2Yaml(obj runtime.Object) string

func SliceResource2SliceMetav1Obj

func SliceResource2SliceMetav1Obj(resources interface{}) []metav1.Object

func SliceResource2SliceRuntimeObj

func SliceResource2SliceRuntimeObj(resources interface{}) []runtime.Object

func SliceString2String

func SliceString2String(s []string) string

func WrapError

func WrapError(err error)

Types

type CmdResRelationshipInterface

type CmdResRelationshipInterface interface {
	// contains filtered or unexported methods
}

type CmdResSuggestionInterface

type CmdResSuggestionInterface interface {
	Helper() []prompt.Suggest
}

type CmdResourceInterface

type CmdResourceInterface interface {
	Name() string
	ShortName() string
	CanExecute(ctx *PromptCtx) bool
	Execute(ctx *PromptCtx) string
	DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest
	Suggestions(ctx *PromptCtx) []prompt.Suggest
}

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 (this *ConfigMap) CanExecute(ctx *PromptCtx) bool

func (*ConfigMap) DefaultSuggestions

func (this *ConfigMap) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest

func (*ConfigMap) Execute

func (this *ConfigMap) Execute(ctx *PromptCtx) string

func (*ConfigMap) FindResourceName

func (this *ConfigMap) FindResourceName(ctx *PromptCtx) string

func (*ConfigMap) Name

func (this *ConfigMap) Name() string

func (*ConfigMap) ShortName

func (this *ConfigMap) ShortName() string

func (*ConfigMap) Suggestions

func (this *ConfigMap) Suggestions(ctx *PromptCtx) []prompt.Suggest

type ConfigMapExecutor

type ConfigMapExecutor struct {
	Tool *cmdResourceExecutorTool
	// contains filtered or unexported fields
}

func NewConfigMapExecutor

func NewConfigMapExecutor(ctx *PromptCtx) *ConfigMapExecutor

func (ConfigMapExecutor) Events

func (this ConfigMapExecutor) Events(cm *v1.ConfigMap) string

e

func (ConfigMapExecutor) Labels

func (this ConfigMapExecutor) Labels(cm *v1.ConfigMap) string

l

func (ConfigMapExecutor) Output

func (this ConfigMapExecutor) Output(cm *v1.ConfigMap, arg string) string

o

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 (this *DaemonSets) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest

func (*DaemonSets) Execute

func (this *DaemonSets) Execute(ctx *PromptCtx) string

func (*DaemonSets) FindResourceName

func (this *DaemonSets) FindResourceName(ctx *PromptCtx) string

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 NewDeploy

func NewDeploy() *Deploy

func (*Deploy) CanExecute

func (this *Deploy) CanExecute(ctx *PromptCtx) bool

func (*Deploy) DefaultSuggestions

func (this *Deploy) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest

func (*Deploy) Execute

func (this *Deploy) Execute(ctx *PromptCtx) string

func (*Deploy) FindResourceName

func (this *Deploy) FindResourceName(ctx *PromptCtx) string

func (*Deploy) Name

func (this *Deploy) Name() string

func (*Deploy) ShortName

func (this *Deploy) ShortName() string

func (*Deploy) Suggestions

func (this *Deploy) Suggestions(ctx *PromptCtx) []prompt.Suggest

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) ArgsOutput

func (this DeploySuggestion) ArgsOutput() []prompt.Suggest

o

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 (this *Namespaces) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest

func (*Namespaces) Execute

func (this *Namespaces) Execute(ctx *PromptCtx) string

func (*Namespaces) FindResourceName

func (this *Namespaces) FindResourceName(ctx *PromptCtx) string

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 NewNodes

func NewNodes() *Nodes

func (*Nodes) CanExecute

func (this *Nodes) CanExecute(ctx *PromptCtx) bool

func (*Nodes) DefaultSuggestions

func (this *Nodes) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest

func (*Nodes) Execute

func (this *Nodes) Execute(ctx *PromptCtx) string

func (*Nodes) FindResourceName

func (this *Nodes) FindResourceName(ctx *PromptCtx) string

func (*Nodes) Name

func (this *Nodes) Name() string

func (*Nodes) ShortName

func (this *Nodes) ShortName() string

func (*Nodes) Suggestions

func (this *Nodes) Suggestions(ctx *PromptCtx) []prompt.Suggest

type NodesExecutor

type NodesExecutor struct {
	Tool *cmdResourceExecutorTool
	// contains filtered or unexported fields
}

func NewNodesExecutor

func NewNodesExecutor(ctx *PromptCtx) *NodesExecutor

func (NodesExecutor) Annotations

func (this NodesExecutor) Annotations(no *v1.Node) string

e

func (NodesExecutor) Events

func (this NodesExecutor) Events(no *v1.Node) string

e

func (NodesExecutor) Labels

func (this NodesExecutor) Labels(no *v1.Node) string

l

func (NodesExecutor) Output

func (this NodesExecutor) Output(no *v1.Node, arg string) string

o

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) ArgsOutput

func (this NodesSuggestion) ArgsOutput() []prompt.Suggest

o

func (NodesSuggestion) Helper

func (this NodesSuggestion) Helper() []prompt.Suggest

type Pod

type Pod struct {
	// contains filtered or unexported fields
}

func NewPod

func NewPod() *Pod

func (*Pod) CanExecute

func (this *Pod) CanExecute(ctx *PromptCtx) bool

func (*Pod) DefaultSuggestions

func (this *Pod) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest

func (*Pod) Execute

func (this *Pod) Execute(ctx *PromptCtx) string

func (*Pod) FindResourceName

func (this *Pod) FindResourceName(ctx *PromptCtx) string

func (*Pod) Name

func (this *Pod) Name() string

func (*Pod) ShortName

func (this *Pod) ShortName() string

func (*Pod) Suggestions

func (this *Pod) Suggestions(ctx *PromptCtx) []prompt.Suggest

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) Events

func (this PodsExecutor) Events(pod *v1.Pod) string

e

func (PodsExecutor) Interactive

func (this PodsExecutor) Interactive(pod *v1.Pod, arg1, arg2 string) string

i

func (PodsExecutor) Labels

func (this PodsExecutor) Labels(pod *v1.Pod) string

l

func (PodsExecutor) Output

func (this PodsExecutor) Output(pod *v1.Pod, arg string) string

o

func (PodsExecutor) Relationship

func (this PodsExecutor) Relationship(pod *v1.Pod) string

r, search service, deployment, rs, daemonset, job

func (PodsExecutor) ServiceAccount

func (this PodsExecutor) ServiceAccount(pod *v1.Pod) string

a

func (PodsExecutor) Volumes

func (this PodsExecutor) Volumes(pod *v1.Pod) string

v

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) ArgsOutput

func (this PodsSuggestion) ArgsOutput() []prompt.Suggest

o

func (PodsSuggestion) ArgsPodName

func (this PodsSuggestion) ArgsPodName() []prompt.Suggest

func (PodsSuggestion) ArgsRelationship

func (this PodsSuggestion) ArgsRelationship() []prompt.Suggest

r

func (PodsSuggestion) ArgsShell

func (this PodsSuggestion) ArgsShell() []prompt.Suggest

s

func (PodsSuggestion) Helper

func (this PodsSuggestion) Helper() []prompt.Suggest

type PromptCtx

type PromptCtx struct {
	context.Context
	Line string
	Word string
	D    prompt.Document
}

func NewPromptCtx

func NewPromptCtx(context context.Context, line string, word string, d prompt.Document) *PromptCtx

type ResourceObjSlice

type ResourceObjSlice []metav1.Object

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 (this *Service) CanExecute(ctx *PromptCtx) bool

func (*Service) DefaultSuggestions

func (this *Service) DefaultSuggestions(ctx *PromptCtx, name, shortName string) []prompt.Suggest

func (*Service) Execute

func (this *Service) Execute(ctx *PromptCtx) string

func (*Service) FindResourceName

func (this *Service) FindResourceName(ctx *PromptCtx) string

func (*Service) Name

func (this *Service) Name() string

func (*Service) ShortName

func (this *Service) ShortName() string

func (*Service) Suggestions

func (this *Service) Suggestions(ctx *PromptCtx) []prompt.Suggest

type ServiceExecutor

type ServiceExecutor struct {
	Tool *cmdResourceExecutorTool
	// contains filtered or unexported fields
}

func NewServiceExecutor

func NewServiceExecutor(ctx *PromptCtx) *ServiceExecutor

func (ServiceExecutor) Events

func (this ServiceExecutor) Events(svc *v1.Service) string

e

func (ServiceExecutor) Labels

func (this ServiceExecutor) Labels(svc *v1.Service) string

l

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)

Jump to

Keyboard shortcuts

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