local

package
v1.4.2-0...-5276655 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package local provides the default implementation for volumes. It is used to mount data volume containers and directories local to the host server.

Index

Constants

View Source
const (
	VolumeDataPathName = "_data"
)

VolumeDataPathName is the name of the directory where the volume data is stored. It uses a very distintive name to avoid collisions migrating data between Docker versions.

Variables

This section is empty.

Functions

This section is empty.

Types

type Root

type Root struct {
	// contains filtered or unexported fields
}

Root implements the Driver interface for the volume package and manages the creation/removal of volumes. It uses only standard vfs commands to create/remove dirs within its provided scope.

func New

func New(scope string) (*Root, error)

New instantiates a new Root instance with the provided scope. Scope is the base path that the Root instance uses to store its volumes. The base path is created here if it does not exist.

func (*Root) Create

func (r *Root) Create(name string) (volume.Volume, error)

Create creates a new volume.Volume with the provided name, creating the underlying directory tree required for this volume in the process.

func (*Root) DataPath

func (r *Root) DataPath(volumeName string) string

DataPath returns the constructed path of this volume.

func (*Root) Name

func (r *Root) Name() string

Name returns the name of Root, defined in the volume package in the DefaultDriverName constant.

func (*Root) Remove

func (r *Root) Remove(v volume.Volume) error

Remove removes the specified volume and all underlying data. If the given volume does not belong to this driver and an error is returned. The volume is reference counted, if all references are not released then the volume is not removed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL