volumes

package
v1.4.2-0...-6bb5962 Latest Latest
Warning

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

Go to latest
Published: May 5, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(configPath string, driver graphdriver.Driver) (*Repository, error)

func (*Repository) Delete

func (r *Repository) Delete(path string) error

func (*Repository) FindOrCreateVolume

func (r *Repository) FindOrCreateVolume(path string, writable bool) (*Volume, error)

func (*Repository) Get

func (r *Repository) Get(path string) *Volume

type Volume

type Volume struct {
	ID          string
	Path        string
	IsBindMount bool
	Writable    bool
	// contains filtered or unexported fields
}

func (*Volume) AddContainer

func (v *Volume) AddContainer(containerId string)

func (*Volume) Containers

func (v *Volume) Containers() []string

func (*Volume) FromDisk

func (v *Volume) FromDisk() error

func (*Volume) GetResourcePath

func (v *Volume) GetResourcePath(path string) (string, error)

Evalutes `path` in the scope of the volume's root path, with proper path sanitisation. Symlinks are all scoped to the root of the volume, as though the volume's root was `/`.

The volume's root path is the host-facing path of the root of the volume's mountpoint inside a container.

NOTE: The returned path is *only* safely scoped inside the volume's root

if no component of the returned path changes (such as a component
symlinking to a different path) between using this method and using the
path. See symlink.FollowSymlinkInScope for more details.

func (*Volume) GetRootResourcePath

func (v *Volume) GetRootResourcePath(path string) (string, error)

Evalutes `path` in the scope of the volume's config path, with proper path sanitisation. Symlinks are all scoped to the root of the config path, as though the config path was `/`.

The config path of a volume is not exposed to the container and is just used to store volume configuration options and other internal information. If in doubt, you probably want to just use v.GetResourcePath.

NOTE: The returned path is *only* safely scoped inside the volume's config

path if no component of the returned path changes (such as a component
symlinking to a different path) between using this method and using the
path. See symlink.FollowSymlinkInScope for more details.

func (*Volume) IsDir

func (v *Volume) IsDir() (bool, error)

func (*Volume) RemoveContainer

func (v *Volume) RemoveContainer(containerId string)

func (*Volume) ToDisk

func (v *Volume) ToDisk() error

Jump to

Keyboard shortcuts

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