mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
9af963aba0
- comments on exported values - constant string replaced by constant reference - unexport implementation details of VolumeDriver 'local' - add fixed packages to linter list Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
25 lines
899 B
Go
25 lines
899 B
Go
//go:generate pluginrpc-gen -i $GOFILE -o proxy.go -type VolumeDriver -name VolumeDriver
|
|
|
|
package volumedrivers
|
|
|
|
import "github.com/docker/docker/volume"
|
|
|
|
// NewVolumeDriver returns a driver has the given name mapped on the given client.
|
|
func NewVolumeDriver(name string, c client) volume.Driver {
|
|
proxy := &volumeDriverProxy{c}
|
|
return &volumeDriverAdapter{name, proxy}
|
|
}
|
|
|
|
// VolumeDriver defines the available functions that volume plugins must implement.
|
|
type VolumeDriver interface {
|
|
// Create a volume with the given name
|
|
Create(name string) (err error)
|
|
// Remove the volume with the given name
|
|
Remove(name string) (err error)
|
|
// Get the mountpoint of the given volume
|
|
Path(name string) (mountpoint string, err error)
|
|
// Mount the given volume and return the mountpoint
|
|
Mount(name string) (mountpoint string, err error)
|
|
// Unmount the given volume
|
|
Unmount(name string) (err error)
|
|
}
|