package volume
import "github.com/dotcloud/docker/volume"
Index ¶
- Constants
- func ReadWrite(mode string) bool
- func ValidMountMode(mode string) bool
- type Driver
- type Volume
Constants ¶
const DefaultDriverName string = "local"
DefaultDriverName is the driver name used for the driver implemented in the local package.
Functions ¶
func ReadWrite ¶
ReadWrite tells you if a mode string is a valid read-write mode or not.
func ValidMountMode ¶
ValidMountMode will make sure the mount mode is valid. returns if it's a valid mount mode or not.
Types ¶
type Driver ¶
type Driver interface { // Name returns the name of the volume driver. Name() string // Create makes a new volume with the given id. Create(name string, opts map[string]string) (Volume, error) // Remove deletes the volume. Remove(Volume) error }
Driver is for creating and removing volumes.
type Volume ¶
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 }
Volume is a place to store data. It is backed by a specific driver, and can be mounted.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
volume/drivers | |
volume/local | Package local provides the default implementation for volumes. |
volume/store | |
volume/testutils |
- Version
- v1.9.0-rc4
- Published
- Oct 31, 2015
- Platform
- js/wasm
- Last checked
- now –
Tools for package owners.