drivers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(driver Driver, volumeUUID, mountPoint, fstype, option string, needFormat bool) error

func Register

func Register(name string, initFunc InitFunc) error

func Unmount

func Unmount(driver Driver, mountPoint string) error

Types

type Driver

type Driver interface {
	Name() string
	CreateVolume(id, baseID string, size int64) error
	DeleteVolume(id string) error
	GetVolumeDevice(id string) (string, error)
	ListVolume(id string) error
	CreateSnapshot(id, volumeID string) error
	DeleteSnapshot(id, volumeID string) error
	HasSnapshot(id, volumeID string) bool
	CompareSnapshot(id, compareID, volumeID string) (*metadata.Mappings, error)
	OpenSnapshot(id, volumeID string) error
	ReadSnapshot(id, volumeID string, start int64, data []byte) error
	CloseSnapshot(id, volumeID string) error
	Info() error
}

func GetDriver

func GetDriver(name, root string, config map[string]string) (Driver, error)

type InitFunc

type InitFunc func(root string, config map[string]string) (Driver, error)

Jump to

Keyboard shortcuts

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