Documentation ¶
Index ¶
- Variables
- type VolumePlugin
- func (p *VolumePlugin) CreateVolume(req *volume.CreateRequest) error
- func (p *VolumePlugin) GetVolume(req *volume.GetRequest) (*volume.Volume, error)
- func (p *VolumePlugin) GetVolumePath(req *volume.PathRequest) (string, error)
- func (p *VolumePlugin) ListVolumes() ([]*volume.Volume, error)
- func (p *VolumePlugin) MountVolume(req *volume.MountRequest) (string, error)
- func (p *VolumePlugin) RemoveVolume(req *volume.RemoveRequest) error
- func (p *VolumePlugin) UnmountVolume(req *volume.UnmountRequest) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type VolumePlugin ¶
type VolumePlugin struct { // Name is the name of the volume plugin. This will be used to refer to // it. Name string // SocketPath is the unix socket at which the plugin is accessed. SocketPath string // Client is the HTTP client we use to connect to the plugin. Client *http.Client }
VolumePlugin is a single volume plugin.
func GetVolumePlugin ¶
func GetVolumePlugin(name string, path string) (*VolumePlugin, error)
GetVolumePlugin gets a single volume plugin, with the given name, at the given path.
func (*VolumePlugin) CreateVolume ¶
func (p *VolumePlugin) CreateVolume(req *volume.CreateRequest) error
CreateVolume creates a volume in the plugin.
func (*VolumePlugin) GetVolume ¶
func (p *VolumePlugin) GetVolume(req *volume.GetRequest) (*volume.Volume, error)
GetVolume gets a single volume from the plugin.
func (*VolumePlugin) GetVolumePath ¶
func (p *VolumePlugin) GetVolumePath(req *volume.PathRequest) (string, error)
GetVolumePath gets the path the given volume is mounted at.
func (*VolumePlugin) ListVolumes ¶
func (p *VolumePlugin) ListVolumes() ([]*volume.Volume, error)
ListVolumes lists volumes available in the plugin.
func (*VolumePlugin) MountVolume ¶
func (p *VolumePlugin) MountVolume(req *volume.MountRequest) (string, error)
MountVolume mounts the given volume. The ID argument is the ID of the mounting container, used for internal record-keeping by the plugin. Returns the path the volume has been mounted at.
func (*VolumePlugin) RemoveVolume ¶
func (p *VolumePlugin) RemoveVolume(req *volume.RemoveRequest) error
RemoveVolume removes a single volume from the plugin.
func (*VolumePlugin) UnmountVolume ¶
func (p *VolumePlugin) UnmountVolume(req *volume.UnmountRequest) error
UnmountVolume unmounts the given volume. The ID argument is the ID of the container that is unmounting, used for internal record-keeping by the plugin.