Documentation ¶
Index ¶
- func DefaultColor(s *string)
- func GetBinUnit(b, k, m, g bool) (int64, string)
- func GetContainerCount(pods v1.PodList) int
- func GetContainerMetrics(metrics *metricsapiv1beta1.PodMetricsList, podName, containerName string) (cpu *resource.Quantity, mem *resource.Quantity)
- func GetNodeStatus(node v1.Node, emoji bool) (string, error)
- func GetNodes(ctx context.Context, c clientv1.NodeInterface, args []string, label string) ([]v1.Node, error)
- func GetPercentage(a, b int64) int64
- func GetPodCount(pods v1.PodList) int
- func GetPodResources(pods v1.PodList) (int64, int64, int64, int64)
- func GetPodStatus(status string, nocolor, emoji bool) string
- func GetPods(ctx context.Context, c clientv1.PodInterface, nodeName string) (*v1.PodList, error)
- func GetSiUnit(b, k, m, g bool) (int64, string)
- func Green(s *string)
- func JoinTab(s []string) string
- func Red(s *string)
- func SetNodeStatusColor(status *string, nocolor bool)
- func SetPercentageColor(s *string, p, warn, crit int64)
- func ValidateThreshold(w, c int64) error
- func Yellow(s *string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBinUnit ¶
GetBinUnit defines unit for usage (Binary prefix) If multiple options are selected, returns a biggest unit
func GetContainerCount ¶
GetContainerCount returns count of containers
func GetContainerMetrics ¶
func GetContainerMetrics(metrics *metricsapiv1beta1.PodMetricsList, podName, containerName string) (cpu *resource.Quantity, mem *resource.Quantity)
GetContainerMetrics returns container metrics usage
func GetNodeStatus ¶
GetNodeStatus returns node status
func GetNodes ¶
func GetNodes(ctx context.Context, c clientv1.NodeInterface, args []string, label string) ([]v1.Node, error)
GetNodes returns node objects
func GetPodResources ¶
GetPodResources returns sum of requested/limit resources
func GetPodStatus ¶
GetPodStatus defined pod status with color
func GetSiUnit ¶
GetSiUnit defines unit for usage (SI prefix) If multiple options are selected, returns a biggest unit
func SetNodeStatusColor ¶
SetNodeStatusColor defined color of node status
func SetPercentageColor ¶
SetPercentageColor returns colored string
percentage < warn : Green
warn < percentage < crit : Yellow crit < percentage : Red
func ValidateThreshold ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.