Documentation ¶
Index ¶
- func Create(Client *lclient.Client, name, componentName, dockerVolName string) (*types.Volume, error)
- func CreateComponentStorage(Client *lclient.Client, storages []common.Storage, componentName string) (err error)
- func GenerateVolName(volName, componentName string) (string, error)
- func GetExistingVolume(Client *lclient.Client, volumeName, componentName string) (string, error)
- func New(adapterContext common.AdapterContext, client lclient.Client) common.StorageAdapter
- func ProcessVolumes(client *lclient.Client, componentName string, ...) ([]common.Storage, map[string]string, error)
- type Adapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(Client *lclient.Client, name, componentName, dockerVolName string) (*types.Volume, error)
Create creates the Docker volume for the given volume name and component name
func CreateComponentStorage ¶
func CreateComponentStorage(Client *lclient.Client, storages []common.Storage, componentName string) (err error)
CreateComponentStorage creates a Docker volume with the given list of storages if it does not exist, else it uses the existing volume
func GenerateVolName ¶ added in v1.2.1
GenerateVolName generates a Docker volume name from the Devfile volume name and component name
func GetExistingVolume ¶
GetExistingVolume checks if a Docker volume is present and return the name if it exists
func New ¶
func New(adapterContext common.AdapterContext, client lclient.Client) common.StorageAdapter
New instantiantes a storage adapter
func ProcessVolumes ¶
func ProcessVolumes(client *lclient.Client, componentName string, containerNameToVolumes map[string][]common.DevfileVolume) ([]common.Storage, map[string]string, error)
ProcessVolumes takes in a list of component volumes and for each unique volume in the devfile, creates a Docker volume name for it It returns a list of unique volumes, a mapping of devfile volume names to docker volume names, and an error if applicable