utils

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BYTE = 1.0 << (10 * iota)
	KILOBYTE
	MEGABYTE
	GIGABYTE
	TERABYTE
	PETABYTE
)
View Source
const (
	KILOBYTESUFFIX = "Ki"
	MEGABYTESUFFIX = "Mi"
	GIGABYTESUFFIX = "Gi"
	TERABYTESUFFIX = "Ti"
	PETABYTESUFFIX = "Pi"
)
View Source
const (
	ONE  = 1.0
	KILO = 1000.0
	MEGA = KILO * KILO
	GIGA = MEGA * KILO
	TERA = GIGA * KILO
	PETA = TERA * KILO
)
View Source
const (
	KILOSUFFIX = "K"
	MEGASUFFIX = "M"
	GIGASUFFIX = "G"
	TERASUFFIX = "T"
	PETASUFFIX = "P"
)
View Source
const (
	MEMORYCUTOVER    = 100
	FREQUENCYCUTOVER = 10
)
View Source
const (
	MINPODSIZE = 2 * GIGABYTE
)

Variables

This section is empty.

Functions

func CpuFrequencyToCores

func CpuFrequencyToCores(size int64, unit string) int64

func CpuFrequencyToString

func CpuFrequencyToString(size int64, unit string) string

func FrequencyToHertzFrequency

func FrequencyToHertzFrequency(size int64, unit string) int64

func MemsizeToBinaryString

func MemsizeToBinaryString(size int64, unit string) string

func MemsizeToBytesize

func MemsizeToBytesize(size int64, unit string) int64

func MemsizeToDecimalString

func MemsizeToDecimalString(size int64, unit string) string

func MemsizeToMaxPodCount

func MemsizeToMaxPodCount(size int64, unit string) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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