capacity

package
v0.0.0-...-de7e090 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

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

Jump to

Keyboard shortcuts

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