util

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0, MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BucketCapacity

func BucketCapacity(attrs *storage.BucketAttrs) (int64, error)

func BucketExists

func BucketExists(ctx context.Context, bucket *storage.BucketHandle) (exists bool, err error)

func BucketName

func BucketName(volumeId string) string

func CleanupKey

func CleanupKey(keyFile string, keyStoragePath string)

func CreateDir

func CreateDir(d string) error

func CreateFile

func CreateFile(path, contents string) (string, error)

func DeletePod

func DeletePod(ctx context.Context, namespace string, name string) (err error)

func DriverReadyLabel added in v0.8.0

func DriverReadyLabel(driverName string) string

DriverReadyLabel returns the driver-ready label according to the driver name.

func DriverReadyLabelJSONPatchEscaped added in v0.8.0

func DriverReadyLabelJSONPatchEscaped(driverName string) string

DriverReadyLabelJSONPatchEscaped returns the driver-ready label according to the driver name but espcaed to be used in a JSONPatch path.

func GetKey

func GetKey(secrets map[string]string, keyStoragePath string) (string, error)

func GetPvcAnnotations

func GetPvcAnnotations(ctx context.Context, pvcName string, pvcNamespace string) (annotations map[string]string, err error)

func GetRegisteredMounts

func GetRegisteredMounts(ctx context.Context, node string) (list *v1beta1.PublishedVolumeList, err error)

func ParseEndpoint

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

func RegisterMount

func RegisterMount(ctx context.Context, volumeID string, targetPath string, node string, podNamespace string, podName string, options map[string]string) (err error)

func SetBucketCapacity

func SetBucketCapacity(ctx context.Context, bucket *storage.BucketHandle, capacity int64) (attrs *storage.BucketAttrs, err error)

func SetDriverReadyLabel added in v0.8.0

func SetDriverReadyLabel(ctx context.Context, driverName string, nodeName string, isReady bool) (err error)

SetDriverReadyLabel set the label <driver name>/driver-ready=<isReady> on the given node.

func UnregisterMount

func UnregisterMount(ctx context.Context, volumeID string, targetPath string, node string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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