cmd

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute runs the root command

func Output

func Output(resourceType, resourceName string, out OutputData)

Types

type ContainerInfo

type ContainerInfo struct {
	Name  string `json:"name"`
	Image string `json:"image"`
}

type EventInfo

type EventInfo struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Reason      string `json:"reason"`
	Message     string `json:"message"`
	InvolvedObj string `json:"involvedObj"`
}

type OutputData

type OutputData struct {
	ResourceType string      `json:"resourceType"`
	ResourceName string      `json:"resourceName"`
	Namespace    string      `json:"namespace"`
	Pods         []PodInfo   `json:"pods"`
	Events       []EventInfo `json:"events,omitempty"`    // Resource-level events
	PodEvents    []EventInfo `json:"podEvents,omitempty"` // Pod-level events
}

OutputData is your final struct holding everything fetched.

type PodInfo

type PodInfo struct {
	PodName      string              `json:"podName"`
	Containers   []ContainerInfo     `json:"containers"`
	ContainerLog []kube.ContainerLog `json:"logs,omitempty"`
}

Jump to

Keyboard shortcuts

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