Documentation ¶
Index ¶
Constants ¶
View Source
const ( VoidValue = "*" CSVStringTerminator = "\"" )
add constants for repetitive strings
View Source
const ( //TableOutput is the constant value for output type table TableOutput string = "table" //CSVOutput is the constant value for output type csv CSVOutput string = "csv" //TSVOutput is the constant value for output type csv TSVOutput string = "tsv" //JSONOutput is the constant value for output type JSON JSONOutput string = "json" //YAMLOutput is the constant value for output type YAML YAMLOutput string = "yaml" )
View Source
const Mebibyte = 1024 * 1024
Mebibyte represents the number of bytes in a mebibyte.
Variables ¶
View Source
var SupportedSortAttributes = [...]string{
"cpu.util",
"cpu.request",
"cpu.limit",
"mem.util",
"mem.request",
"mem.limit",
"cpu.util.percentage",
"cpu.request.percentage",
"cpu.limit.percentage",
"mem.util.percentage",
"mem.request.percentage",
"mem.limit.percentage",
"name",
}
SupportedSortAttributes lists the valid sorting options
Functions ¶
func FetchAndPrint ¶
func FetchAndPrint(opts Options)
FetchAndPrint gathers cluster resource data and outputs it
func SupportedOutputs ¶
func SupportedOutputs() []string
SupportedOutputs returns a string list of output formats supposed by this package
Types ¶
type Options ¶
type Options struct { ShowContainers bool ShowPods bool ShowUtil bool ShowPodCount bool PodLabels string NodeLabels string NodeTaints string ExcludeTainted bool NamespaceLabels string Namespace string KubeContext string KubeConfig string OutputFormat string SortBy string AvailableFormat bool ImpersonateUser string ImpersonateGroup string }
Options is a struct containing the command line options FetchAndPrint depends on
Click to show internal directories.
Click to hide internal directories.