utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildInClusterClientset

func BuildInClusterClientset() *kubernetes.Clientset

BuildInClusterClientset builds a kubernetes in-cluster clientset

func CapacityRoundUp

func CapacityRoundUp(originSize int64) int64

func Checksum

func Checksum(fpath string) (string, error)

func ConvertBytesToIEC

func ConvertBytesToIEC(bytes uint64) string

ConvertBytesToIEC converts bytes to IEC units (Ki, Mi, Gi, etc.) and rounds up

func ConvertBytesToStr

func ConvertBytesToStr(size int64) string

ConvertBytesToStr convert size into string

func IsStringInSet

func IsStringInSet(str string, strArray []string) bool

func Mkdir

func Mkdir(dirpath string) error

func ParseBytes

func ParseBytes(sizeStr string) (int64, error)

ParseBytes parse size from string into bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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