volume

package
v0.0.0-...-88aa921 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDir

func IsDir(dirName string) (dir bool, err error)

IsDir() checks if the given dir is a directory. If any error is encoutered it is returned and directory is set to false.

func Register

func Register(name string, driver Driver)

Types

type Driver

type Driver interface {
	Mount(volumeName, root string) (Volume, error)
	List(root string) []string
}

func Registered

func Registered(name string) (Driver, bool)

type FileInfoSlice

type FileInfoSlice []os.FileInfo

func (FileInfoSlice) Labels

func (p FileInfoSlice) Labels() []string

func (FileInfoSlice) Len

func (p FileInfoSlice) Len() int

func (FileInfoSlice) Less

func (p FileInfoSlice) Less(i, j int) bool

func (FileInfoSlice) Swap

func (p FileInfoSlice) Swap(i, j int)

type Volume

type Volume interface {
	Name() string
	Path() string
	SnapshotPath(label string) string
	Snapshot(label string) (err error)
	Snapshots() ([]string, error)
	RemoveSnapshot(label string) error
	Rollback(label string) error
	Unmount() error
	Export(label, parent, filename string) error
	Import(label, filename string) error
}

func Mount

func Mount(driverName, volumeName, rootDir string) (Volume, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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