Documentation
¶
Index ¶
- type Args
- type Driver
- func (d *Driver) Capabilities() *volume.CapabilitiesResponse
- func (d *Driver) Create(req *volume.CreateRequest) error
- func (d *Driver) Get(req *volume.GetRequest) (*volume.GetResponse, error)
- func (d *Driver) List() (*volume.ListResponse, error)
- func (d *Driver) Mount(req *volume.MountRequest) (*volume.MountResponse, error)
- func (d *Driver) Path(req *volume.PathRequest) (*volume.PathResponse, error)
- func (d *Driver) Remove(req *volume.RemoveRequest) error
- func (d *Driver) Unmount(req *volume.UnmountRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver - Docker Volume driver for NS, it implements methods /VolumeDriver.*: https://docs.docker.com/v17.09/engine/extend/plugins_volume/
func (*Driver) Capabilities ¶
func (d *Driver) Capabilities() *volume.CapabilitiesResponse
Capabilities returns plugin capabilities
func (*Driver) Create ¶
func (d *Driver) Create(req *volume.CreateRequest) error
Create Docker volume, created filesystem on NS
func (*Driver) Get ¶
func (d *Driver) Get(req *volume.GetRequest) (*volume.GetResponse, error)
Get volume by its name, find out if NS has this filesystem created
func (*Driver) List ¶
func (d *Driver) List() (*volume.ListResponse, error)
List lists all shared filesystems on NS as volumes
func (*Driver) Mount ¶
func (d *Driver) Mount(req *volume.MountRequest) (*volume.MountResponse, error)
Mount mounts NS share to a Docker host, then bind-mounts this share to another folder for particular container.
Working model: NS share "S" <---> Docker host folder "H" (mount -t nfs S H) <--+--> Mount for container A (mount -o bind H A)
|--> Mount for container B (mount -o bind H B) |--> Mount for container C (mount -o bind H C) `--> Mount for container D (mount -o bind H D)
On host all 'mount' happen under: /var/lib/docker/plugins/<PLUGIN_ID>/propagated-mount/volume/<VOLUME_NAME> - mounted NS share /var/lib/docker/plugins/<PLUGIN_ID>/propagated-mount/bind/<VOLUME_NAME>-<CONTAINER_ID> - bind container(s) to share
Inside driver's container all 'mount' happen under: /mnt/nexentastor-docker-volume-plugin/volume/<VOLUME_NAME> - mounted NS share /mnt/nexentastor-docker-volume-plugin/bind/<VOLUME_NAME>-<CONTAINER_ID> - bind container(s) to share `/mnt/nexentastor-docker-volume-plugin` is a "propagatedmount" parameter in the `config.json`.
func (*Driver) Path ¶
func (d *Driver) Path(req *volume.PathRequest) (*volume.PathResponse, error)
Path returns volume mount point