utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiskClassNameHDD  = "HDD"
	DiskClassNameSSD  = "SSD"
	DiskClassNameNVMe = "NVMe"
)

disk class

View Source
const (
	PoolNamePrefix  = "LocalStorage_Pool"
	PoolNameForHDD  = PoolNamePrefix + DiskClassNameHDD
	PoolNameForSSD  = PoolNamePrefix + DiskClassNameSSD
	PoolNameForNVMe = PoolNamePrefix + DiskClassNameNVMe
)

consts

Variables

This section is empty.

Functions

func ConvertNodeName

func ConvertNodeName(node string) string

ConvertNodeName e.g.(10.23.10.12 => 10-23-10-12)

func GetNamespace

func GetNamespace() string

GetNamespace get Namespace from env, else it returns error

func GetNodeName

func GetNodeName() string

GetNodeName gets the node name from env, else returns an error

func GetPoolNameAccordingDiskType

func GetPoolNameAccordingDiskType(diskType string) (string, error)

func MergeLocalVolumeReplicaMap

func MergeLocalVolumeReplicaMap(localVolumeReplicaMap ...map[string][]*lsapisv1alpha1.LocalVolumeReplica) map[string][]*lsapisv1alpha1.LocalVolumeReplica

Types

This section is empty.

Jump to

Keyboard shortcuts

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