utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KubeConfig *rest.Config = nil

KubeConfig represents kubernetes config to connect with kube-api-server

Functions

func CheckKubeAPI

func CheckKubeAPI() bool

CheckKubeAPI checks if kubeconfig exists and is working

func HomeDir

func HomeDir() string

HomeDir provides you the path to home directory from environment variable

func InitKubeConfig

func InitKubeConfig()

InitKubeConfig returns the kube config or nil in case of error

func ParseCPU

func ParseCPU(val string) (float64, error)

ParseCPU parses the string containing cores specified in nano, milli, micro and gives the number of cores as floating point value

func ParseMemory

func ParseMemory(val string) (float64, error)

ParseMemory parses the string containing memory specified in Gi, Mi, Ki and gives the memory in bytes as floating point value

Types

This section is empty.

Jump to

Keyboard shortcuts

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