package volume

import "github.com/dotcloud/docker/volume"

Index

Constants

const DefaultDriverName = "local"

Functions

func ReadWrite

func ReadWrite(mode string) bool

ReadOnly tells you if a mode string is a valid read-only mode or not.

func ValidateMountMode

func ValidateMountMode(mode string) (bool, bool)

ValidateMountMode will make sure the mount mode is valid. returns if it's a valid mount mode and if it's read-write 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(string) (Volume, error)
	// Remove deletes the volume.
	Remove(Volume) error
}

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
}

Source Files

volume.go

Directories

PathSynopsis
volume/drivers
volume/local
Version
v1.8.0-rc2
Published
Aug 4, 2015
Platform
js/wasm
Last checked
59 seconds ago

Tools for package owners.