Documentation ¶
Index ¶
- Constants
- Variables
- func AddCommonFlags(command *cobra.Command, params *CommonFlags)
- func ExecPod(client *kubernetes.Clientset, node string, podCmd string, cmdStdout io.Writer, ...) error
- func ExecPodCapture(client *kubernetes.Clientset, node string, podCmd string) (string, string, error)
- func ExecPodSimple(client *kubernetes.Clientset, node string, podCmd string) string
- func FlagInit(rootCmd *cobra.Command)
- func GenericTraceCommand(subCommand string, params *CommonFlags, args []string, outputMode string, ...)
- func GetNamespace() string
- type CommonFlags
- type PostProcess
Constants ¶
View Source
const (
GADGET_OPERATION = "gadget.kinvolk.io/operation"
)
Variables ¶
View Source
var (
KubernetesConfigFlags = genericclioptions.NewConfigFlags(false)
)
Functions ¶
func AddCommonFlags ¶
func AddCommonFlags(command *cobra.Command, params *CommonFlags)
func ExecPodCapture ¶
func ExecPodSimple ¶
func ExecPodSimple(client *kubernetes.Clientset, node string, podCmd string) string
func GenericTraceCommand ¶
func GetNamespace ¶
func GetNamespace() string
GetNamespace returns the namespace specified by '-n' or the default namespace configured in the kubeconfig file.
Types ¶
type CommonFlags ¶
type CommonFlags struct { // Label allows to filter containers with a label selector in the // following format: key1=value1,key2=value2 Label string // Node allows to filter containers by node name Node string // AllNamespaces disables the container filtering by namespace AllNamespaces bool // Podname allows to filter containers by the pod name Podname string // Containername allows to filter containers by name Containername string // JsonOutput returns the results in json JsonOutput bool // Verbose prints additional information Verbose bool }
CommonFlags contains CLI flags common to several gadgets
type PostProcess ¶
type PostProcess struct { OutStreams []*postProcessSingle ErrStreams []*postProcessSingle // contains filtered or unexported fields }
func NewPostProcess ¶
func NewPostProcess(n int, outStream io.Writer, errStream io.Writer, params *CommonFlags, transform func(string) string) *PostProcess
Click to show internal directories.
Click to hide internal directories.