storage

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 GenerateVolNameFromDevfileVol

func GenerateVolNameFromDevfileVol(volName, componentName string) (string, error)

GenerateVolNameFromDevfileVol generates a Docker volume name from the Devfile volume name and component name

func GetExistingVolume

func GetExistingVolume(Client *lclient.Client, volumeName, componentName string) (string, error)

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, componentAliasToVolumes 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

Types

type Adapter

type Adapter struct {
	Client lclient.Client
	common.AdapterContext
}

Adapter is a storage adapter implementation for Kubernetes

func (*Adapter) Create

func (a *Adapter) Create(storages []common.Storage) (err error)

Create creates the component pvc storage if it does not exist

Jump to

Keyboard shortcuts

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