mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
81fa9feb0c
Signed by all authors: Signed-off-by: Michael Crosby <crosbymichael@gmail.com> Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com> Signed-off-by: David Calavera <david.calavera@gmail.com> Signed-off-by: Jeff Lindsay <progrium@gmail.com> Signed-off-by: Alexander Morozov <lk4d4@docker.com> Signed-off-by: Luke Marsden <luke@clusterhq.com> Signed-off-by: David Calavera <david.calavera@gmail.com>
26 lines
706 B
Go
26 lines
706 B
Go
package volume
|
|
|
|
const DefaultDriverName = "local"
|
|
|
|
type Driver interface {
|
|
// Name returns the name of the volume driver.
|
|
Name() string
|
|
// Create makes a new volume with the given id.
|
|
Create(string) (Volume, error)
|
|
// Remove deletes the volume.
|
|
Remove(Volume) error
|
|
}
|
|
|
|
type Volume interface {
|
|
// Name returns the name of the volume
|
|
Name() string
|
|
// DriverName returns the name of the driver which owns this volume.
|
|
DriverName() string
|
|
// Path returns the absolute path to the volume.
|
|
Path() string
|
|
// Mount mounts the volume and returns the absolute path to
|
|
// where it can be consumed.
|
|
Mount() (string, error)
|
|
// Unmount unmounts the volume when it is no longer in use.
|
|
Unmount() error
|
|
}
|