Documentation ¶
Index ¶
- Constants
- func AddVolume(root, id, volumeID, base string, size int64) error
- func BackupSnapshot(root, snapshotID, volumeID, blockstoreID string, sDriver drivers.Driver) error
- func Deregister(root, id string) error
- func List(root, blockstoreID, volumeID string) error
- func Register(root, kind string, config map[string]string) (string, int64, error)
- func RegisterDriver(kind string, initFunc InitFunc) error
- func RemoveSnapshot(root, snapshotID, volumeID, blockstoreID string) error
- func RemoveVolume(root, id, volumeID string) error
- func RestoreSnapshot(root, srcSnapshotID, srcVolumeID, dstVolumeID, blockstoreID string, ...) error
- type BlockMapping
- type BlockStore
- type BlockStoreDriver
- type InitFunc
- type SnapshotMap
- type Volume
Constants ¶
View Source
const ( BLOCKSTORE_BASE = "rancher-blockstore" BLOCKSTORE_CONFIG_FILE = "blockstore.cfg" VOLUME_DIRECTORY = "volumes" VOLUME_CONFIG_FILE = "volume.cfg" VOLUME_SEPARATE_LAYER1 = 2 VOLUME_SEPARATE_LAYER2 = 4 SNAPSHOTS_DIRECTORY = "snapshots" SNAPSHOT_CONFIG_PREFIX = "snapshot_" BLOCKS_DIRECTORY = "blocks" BLOCK_SEPARATE_LAYER1 = 2 BLOCK_SEPARATE_LAYER2 = 4 DEFAULT_BLOCK_SIZE = 2097152 )
Variables ¶
This section is empty.
Functions ¶
func BackupSnapshot ¶
func Deregister ¶
func RegisterDriver ¶
func RemoveSnapshot ¶
func RemoveVolume ¶
Types ¶
type BlockMapping ¶
type BlockStore ¶
type BlockStoreDriver ¶
type BlockStoreDriver interface { Kind() string FinalizeInit(configFile, id string) error FileExists(path, fileName string) bool FileSize(path, fileName string) int64 MkDirAll(dirName string) error RemoveAll(name string) error Read(srcPath, srcFileName string, data []byte) error Write(data []byte, dstPath, dstFileName string) error List(path string) ([]string, error) CopyToPath(srcFileName string, path string) error }
func GetBlockStoreDriver ¶
func GetBlockStoreDriver(kind, configFile string, config map[string]string) (BlockStoreDriver, error)
type InitFunc ¶
type InitFunc func(configFile string, config map[string]string) (BlockStoreDriver, error)
type SnapshotMap ¶
type SnapshotMap struct { ID string Blocks []BlockMapping }
Click to show internal directories.
Click to hide internal directories.