common

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2018 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// Keys for Storage Class Parameters
	ParameterKeyType            = "type"
	ParameterKeyReplicationType = "replication-type"

	// Keys for Topology. This key will be shared amonst drivers from GCP
	TopologyKeyZone = "topology.gke.io/zone"

	// VolumeAttributes for Partition
	VolumeAttributePartition = "partition"

	UnspecifiedValue = "UNSPECIFIED"
)

Variables

This section is empty.

Functions

func BytesToGb

func BytesToGb(bytes int64) int64

func CreateNodeID

func CreateNodeID(project, zone, name string) string

func GbToBytes

func GbToBytes(Gb int64) int64

func GenerateUnderspecifiedVolumeID

func GenerateUnderspecifiedVolumeID(diskName string, isZonal bool) string

func GetDeviceName

func GetDeviceName(volKey *meta.Key) (string, error)

func GetRegionFromZones

func GetRegionFromZones(zones []string) (string, error)

func NodeIDToZoneAndName

func NodeIDToZoneAndName(id string) (string, string, error)

func SnapshotIDToKey

func SnapshotIDToKey(id string) (string, error)

func VolumeIDToKey

func VolumeIDToKey(id string) (*meta.Key, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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