Documentation ¶
Overview ¶
block provides the implementation of the "block" volume type, using a Torus file as a block device.
Index ¶
- Constants
- func CreateBlockFromSnapshot(srv *torus.Server, origvol, origsnap, newvol string, progress bool) error
- func CreateBlockVolume(mds torus.MetadataService, volume string, size uint64) error
- func DeleteBlockVolume(mds torus.MetadataService, volume string) error
- func NewBlockVolGC(srv *torus.Server, inodes gc.INodeFetcher) (gc.GC, error)
- type BlockFile
- type BlockVolume
- func (s *BlockVolume) DeleteSnapshot(name string) error
- func (s *BlockVolume) GetSnapshots() ([]Snapshot, error)
- func (s *BlockVolume) OpenBlockFile() (file *BlockFile, err error)
- func (s *BlockVolume) OpenSnapshot(name string) (*BlockFile, error)
- func (s *BlockVolume) RestoreSnapshot(name string) (err error)
- func (s *BlockVolume) SaveSnapshot(name string) error
- type Snapshot
Constants ¶
View Source
const VolumeType = "block"
Variables ¶
This section is empty.
Functions ¶
func CreateBlockFromSnapshot ¶
func CreateBlockVolume ¶
func CreateBlockVolume(mds torus.MetadataService, volume string, size uint64) error
CreateBlockVolume creates volume in metadata service.
func DeleteBlockVolume ¶
func DeleteBlockVolume(mds torus.MetadataService, volume string) error
func NewBlockVolGC ¶
Types ¶
type BlockVolume ¶
type BlockVolume struct {
// contains filtered or unexported fields
}
func OpenBlockVolume ¶
func OpenBlockVolume(s *torus.Server, volume string) (*BlockVolume, error)
func (*BlockVolume) DeleteSnapshot ¶
func (s *BlockVolume) DeleteSnapshot(name string) error
func (*BlockVolume) GetSnapshots ¶
func (s *BlockVolume) GetSnapshots() ([]Snapshot, error)
func (*BlockVolume) OpenBlockFile ¶
func (s *BlockVolume) OpenBlockFile() (file *BlockFile, err error)
func (*BlockVolume) OpenSnapshot ¶
func (s *BlockVolume) OpenSnapshot(name string) (*BlockFile, error)
func (*BlockVolume) RestoreSnapshot ¶
func (s *BlockVolume) RestoreSnapshot(name string) (err error)
func (*BlockVolume) SaveSnapshot ¶
func (s *BlockVolume) SaveSnapshot(name string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.