resource

package
v0.1.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MB - MegaByte size
	MB = 1000 * 1000
	// MIB - MegaByte size
	MIB = 1024 * 1024
	// GB - GigaByte size
	GB = 1000 * 1000 * 1000
	// GIB - GibiByte size
	GIB = 1024 * 1024 * 1024
)

Variables

This section is empty.

Functions

func DecodeCpuResource

func DecodeCpuResource(value string) (int64, error)

returns microseconds

func DecodeMemoryResource

func DecodeMemoryResource(value string) (int64, error)

parseResource - parse resource size string m,mb,mib,gb,gib,kb,kib,

func EncodeCpuResource

func EncodeCpuResource(res int64) string

func EncodeMemoryResource

func EncodeMemoryResource(res int64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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