vfile

package
v0.0.0-...-96d2ce7 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VolumeDriver

type VolumeDriver struct {
	utils.PluginDriver
	// contains filtered or unexported fields
}

VolumeDriver - Contains vars specific to this driver

func NewVolumeDriver

func NewVolumeDriver(cfg config.Config, mountDir string) *VolumeDriver

NewVolumeDriver creates driver instance

func (*VolumeDriver) Capabilities

func (d *VolumeDriver) Capabilities(r volume.Request) volume.Response

Capabilities - Report plugin scope to Docker

func (*VolumeDriver) Create

func (d *VolumeDriver) Create(r volume.Request) volume.Response

Create - create a volume.

func (*VolumeDriver) DetachVolume

func (d *VolumeDriver) DetachVolume(name string) error

DetachVolume - detach a volume from the VM do nothing for the vFile driver.

func (*VolumeDriver) Get

Get info about a single volume

func (*VolumeDriver) GetClientList

func (d *VolumeDriver) GetClientList(name string) []string

GetClientList - return client list which is mounted to volume

func (*VolumeDriver) GetVolume

func (d *VolumeDriver) GetVolume(name string) (map[string]interface{}, error)

GetVolume - return volume meta-data.

func (*VolumeDriver) List

List volumes known to the driver

func (*VolumeDriver) Mount

Mount - Provide a volume to docker container - called once per container start. We need to keep refcount and unmount on refcount drop to 0

The serialization of operations per volume is assured by the volume/store of the docker daemon. As long as the refCountsMap is protected is unnecessary to do any locking at this level during create/mount/umount/remove.

func (*VolumeDriver) MountVolume

func (d *VolumeDriver) MountVolume(name string, fstype string, id string, isReadOnly bool, skipAttach bool) (string, error)

MountVolume - Request attach and then mounts the volume.

func (*VolumeDriver) Path

Path - give docker a reminder of the volume mount path

func (*VolumeDriver) Remove

func (d *VolumeDriver) Remove(r volume.Request) volume.Response

Remove - removes individual volume. Docker would call it only if is not using it anymore

func (*VolumeDriver) Unmount

Unmount request from Docker. If mount refcount is drop to 0.

func (*VolumeDriver) UnmountVolume

func (d *VolumeDriver) UnmountVolume(name string) error

UnmountVolume - Request detach and then unmount the volume.

type VolumeMetadata

type VolumeMetadata struct {
	Status         kvstore.VolStatus `json:"-"` // Field won't be marshalled
	GlobalRefcount int               `json:"-"` // Field won't be marshalled
	StartTrigger   int               `json:"starttrigger,omitempty"`
	StopTrigger    int               `json:"stoptrigger,omitempty"`
	StartMarker    int               `json:"startmarker,omitempty"`
	StopMarker     int               `json:"stopmarker,omitempty"`
	Port           int               `json:"port,omitempty"`
	ServiceName    string            `json:"serviceName,omitempty"`
	Username       string            `json:"username,omitempty"`
	Password       string            `json:"password,omitempty"`
}

VolumeMetadata - Contains metadata of vFile volumes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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