util

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	GiB = 1024 * 1024 * 1024
)

Variables

This section is empty.

Functions

func BytesToGiB

func BytesToGiB(volumeSizeBytes int64) int64

BytesToGiB converts Bytes to GiB

func GetAccessModes added in v0.7.0

func GetAccessModes(caps []*csi.VolumeCapability) *[]string

GetAccessModes returns a slice containing all of the access modes defined in the passed in VolumeCapabilities.

func GiBToBytes

func GiBToBytes(volumeSizeGiB int64) int64

GiBToBytes converts GiB to Bytes

func IsSBE added in v1.11.0

func IsSBE(region string) bool

func ParseEndpoint

func ParseEndpoint(endpoint string) (string, string, error)

func RoundUpBytes

func RoundUpBytes(volumeSizeBytes int64) int64

RoundUpBytes rounds up the volume size in bytes upto multiplications of GiB in the unit of Bytes

func RoundUpGiB

func RoundUpGiB(volumeSizeBytes int64) int64

RoundUpGiB rounds up the volume size in bytes upto multiplications of GiB in the unit of GiB

func StringIsAlphanumeric added in v1.24.0

func StringIsAlphanumeric(s string) bool

StringIsAlphanumeric returns true if a given string contains only English letters or numbers

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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