util

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorImageTag

func ColorImageTag(image *string)

ColorImageTag is colorize image tag

func GetBinUnit

func GetBinUnit(b, k, m, g bool) (int64, string)

GetBinUnit defines unit for usage (Binary prefix) If multiple options are selected, returns a biggest unit

func GetImageUsage added in v0.1.1

func GetImageUsage(images []v1.ContainerImage) (int64, int)

GetImageUsage returns total image size and count

func GetSiUnit

func GetSiUnit(b, k, m, g bool) (int64, string)

GetSiUnit defines unit for usage (SI prefix) If multiple options are selected, returns a biggest unit

func JoinTab

func JoinTab(s []string) string

JoinTab joins string slice with tab

func SetPercentageColor

func SetPercentageColor(s *string, p, warn, crit int64)

SetPercentageColor returns colored string

percentage < warn : Green

warn < percentage < crit : Yellow crit < percentage : Red

Types

This section is empty.

Jump to

Keyboard shortcuts

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