storage

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create added in v0.0.4

func Create(client *occlient.Client, name string, size string, path string, componentName string, applicationName string) (string, error)

Create adds storage to given component of given application

func Delete added in v0.0.6

func Delete(client *occlient.Client, name string, applicationName string) (string, error)

Delete removes storage from the given application. Delete returns the component name, if it is mounted to a component, or "" and the error, if any

func Exists added in v0.0.6

func Exists(client *occlient.Client, storageName string, applicationName string) (bool, error)

Exists checks if the given storage exists in the given application

func GetComponentNameFromStorageName added in v0.0.6

func GetComponentNameFromStorageName(client *occlient.Client, storageName string) (string, error)

GetComponentNameFromStorageName returns the component name associated with the storageName, if any, or ""

func GetMountPath added in v0.0.6

func GetMountPath(client *occlient.Client, storageName string, componentName string, applicationName string) string

GetMountPath returns mount path for given storage

func GetStorageNameFromMountPath added in v0.0.7

func GetStorageNameFromMountPath(client *occlient.Client, path string, componentName string, applicationName string) (string, error)

Gets the storageName mounted to the given path in the given component and application GetStorageNameFromMountPath returns the name of the storage or the error

func IsMounted added in v0.0.6

func IsMounted(client *occlient.Client, storageName string, componentName string, applicationName string) (bool, error)

IsMounted checks if the given storage is mounted to the given component IsMounted returns a bool indicating the storage is mounted to the component or not

func Mount added in v0.0.6

func Mount(client *occlient.Client, path string, storageName string, componentName string, applicationName string) error

Mount mounts the given storage to the given component

func Unmount added in v0.0.6

func Unmount(client *occlient.Client, storageName string, componentName string, applicationName string, updateLabels bool) error

Unmount unmounts the given storage from the given component updateLabels is a flag to whether update Label or not, so updation of label is not required in delete call but required in unmount call this is introduced as causing unnecessary delays

Types

type StorageInfo added in v0.0.4

type StorageInfo struct {
	Name string
	Size string
	// if path is empty, it indicates that the storage is not mounted in any component
	Path string
}

func List

func List(client *occlient.Client, componentName string, applicationName string) ([]StorageInfo, error)

List lists all the mounted storage associated with the given component of the given application and the unmounted storages in the given application

func ListMounted added in v0.0.10

func ListMounted(client *occlient.Client, componentName string, applicationName string) ([]StorageInfo, error)

ListMounted lists all the mounted storage associated with the given component and application

func ListUnmounted added in v0.0.10

func ListUnmounted(client *occlient.Client, applicationName string) ([]StorageInfo, error)

ListUnmounted lists all the unmounted storage associated with the given application

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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