Documentation ¶
Index ¶
- type VolumeDriver
- func (d *VolumeDriver) Capabilities(r volume.Request) volume.Response
- func (d *VolumeDriver) Create(r volume.Request) volume.Response
- func (d *VolumeDriver) DetachVolume(name string) error
- func (d *VolumeDriver) Get(r volume.Request) volume.Response
- func (d *VolumeDriver) GetClientList(name string) []string
- func (d *VolumeDriver) GetVolume(name string) (map[string]interface{}, error)
- func (d *VolumeDriver) List(r volume.Request) volume.Response
- func (d *VolumeDriver) Mount(r volume.MountRequest) volume.Response
- func (d *VolumeDriver) MountVolume(name string, fstype string, id string, isReadOnly bool, skipAttach bool) (string, error)
- func (d *VolumeDriver) Path(r volume.Request) volume.Response
- func (d *VolumeDriver) Remove(r volume.Request) volume.Response
- func (d *VolumeDriver) Unmount(r volume.UnmountRequest) volume.Response
- func (d *VolumeDriver) UnmountVolume(name string) error
- type VolumeMetadata
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 ¶
func (d *VolumeDriver) Get(r volume.Request) volume.Response
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 ¶
func (d *VolumeDriver) List(r volume.Request) volume.Response
List volumes known to the driver
func (*VolumeDriver) Mount ¶
func (d *VolumeDriver) Mount(r volume.MountRequest) volume.Response
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 ¶
func (d *VolumeDriver) Path(r volume.Request) volume.Response
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 ¶
func (d *VolumeDriver) Unmount(r volume.UnmountRequest) volume.Response
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