util

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func GetURLHost

func GetURLHost(urlStr string) (string, error)

GetURLHost returns hostname of given url

func GiBToBytes

func GiBToBytes(volumeSizeGiB int64) int64

GiBToBytes converts GiB to Bytes

func ParseEndpoint

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

func RoundUpVolumeSize

func RoundUpVolumeSize(volumeSizeBytes int64, deploymentType string, storageType string, perUnitStorageThroughput int64) int64

RoundUpVolumeSize rounds the volume size in bytes up to 1200 GiB, 2400 GiB, or multiples of 3600 GiB for DeploymentType SCRATCH_1, to 1200 GiB or multiples of 2400 GiB for DeploymentType SCRATCH_2 or for DeploymentType PERSISTENT_1 and StorageType SSD, multiples of 6000 GiB for DeploymentType PERSISTENT_1, StorageType HDD, and PerUnitStorageThroughput 12, and multiples of 1800 GiB for DeploymentType PERSISTENT_1, StorageType HDD, and PerUnitStorageThroughput 40.

Types

This section is empty.

Jump to

Keyboard shortcuts

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