Documentation ¶
Index ¶
- Constants
- func GenerateDeltaFileName(name string) string
- func GenerateExpansionSnapshotLabels(size int64) map[string]string
- func GenerateExpansionSnapshotName(size int64) string
- func GenerateSnapTempFileName(fileName string) string
- func GenerateSnapshotDiskMetaName(diskName string) string
- func GenerateSnapshotDiskName(name string) string
- func GetSnapshotNameFromDiskName(diskName string) (string, error)
- func GetSnapshotNameFromTempFileName(tmpFileName string) (string, error)
- func IsHeadDisk(diskName string) bool
- type BackingFile
- type BackupStatus
- func (rb *BackupStatus) CloseSnapshot(snapID, volumeID string) error
- func (rb *BackupStatus) CompareSnapshot(snapID, compareSnapID, volumeID string) (*backupstore.Mappings, error)
- func (rb *BackupStatus) HasSnapshot(snapID, volumeID string) bool
- func (rb *BackupStatus) OpenSnapshot(snapID, volumeID string) error
- func (rb *BackupStatus) ReadSnapshot(snapID, volumeID string, start int64, data []byte) error
- func (rb *BackupStatus) UpdateBackupStatus(snapID, volumeID string, progress int, url string, errString string) error
- type DiskInfo
- type Info
- type PrepareRemoveAction
- type ProgressState
- type Replica
- func (r *Replica) Chain() ([]string, error)
- func (r *Replica) Close() error
- func (r *Replica) Delete() error
- func (r *Replica) DisplayChain() ([]string, error)
- func (r *Replica) Expand(size int64) error
- func (r *Replica) GetRemainSnapshotCounts() int
- func (r *Replica) GetRevisionCounter() int64
- func (r *Replica) Info() Info
- func (r *Replica) ListDisks() map[string]DiskInfo
- func (r *Replica) MarkDiskAsRemoved(name string) error
- func (r *Replica) PrepareRemoveDisk(name string) ([]PrepareRemoveAction, error)
- func (r *Replica) ReadAt(buf []byte, offset int64) (int, error)
- func (r *Replica) Reload() (*Replica, error)
- func (r *Replica) RemoveDiffDisk(name string, force bool) error
- func (r *Replica) ReplaceDisk(target, source string) error
- func (r *Replica) Revert(name, created string) (*Replica, error)
- func (r *Replica) SetRebuilding(rebuilding bool) error
- func (r *Replica) SetRevisionCounter(counter int64) error
- func (r *Replica) Snapshot(name string, userCreated bool, created string, labels map[string]string) error
- func (r *Replica) WriteAt(buf []byte, offset int64) (int, error)
- type RestoreStatus
- type Server
- func (s *Server) Close() error
- func (s *Server) Create(size int64) error
- func (s *Server) Delete() error
- func (s *Server) Expand(size int64) error
- func (s *Server) MarkDiskAsRemoved(name string) error
- func (s *Server) Open() error
- func (s *Server) PingResponse() error
- func (s *Server) PrepareRemoveDisk(name string) ([]PrepareRemoveAction, error)
- func (s *Server) ReadAt(buf []byte, offset int64) (int, error)
- func (s *Server) Reload() error
- func (s *Server) RemoveDiffDisk(name string, force bool) error
- func (s *Server) ReplaceDisk(target, source string) error
- func (s *Server) Replica() *Replica
- func (s *Server) Revert(name, created string) error
- func (s *Server) SetRebuilding(rebuilding bool) error
- func (s *Server) SetRevisionCounter(counter int64) error
- func (s *Server) Snapshot(name string, userCreated bool, createdTime string, labels map[string]string) error
- func (s *Server) Status() (State, Info)
- func (s *Server) WriteAt(buf []byte, offset int64) (int, error)
- type State
- type UsedGenerator
Constants ¶
View Source
const ( ProgressStateInProgress = ProgressState("in_progress") ProgressStateComplete = ProgressState("complete") ProgressStateError = ProgressState("error") )
View Source
const ( OpCoalesce = "coalesce" // Source is parent, target is child OpRemove = "remove" OpReplace = "replace" )
Variables ¶
This section is empty.
Functions ¶
func GenerateDeltaFileName ¶
func IsHeadDisk ¶
Types ¶
type BackingFile ¶
type BackupStatus ¶
type BackupStatus struct { SnapshotID string Error string Progress int BackupURL string State ProgressState IsIncremental bool // contains filtered or unexported fields }
func NewBackup ¶
func NewBackup(backingFile *BackingFile) *BackupStatus
func (*BackupStatus) CloseSnapshot ¶
func (rb *BackupStatus) CloseSnapshot(snapID, volumeID string) error
func (*BackupStatus) CompareSnapshot ¶
func (rb *BackupStatus) CompareSnapshot(snapID, compareSnapID, volumeID string) (*backupstore.Mappings, error)
func (*BackupStatus) HasSnapshot ¶
func (rb *BackupStatus) HasSnapshot(snapID, volumeID string) bool
func (*BackupStatus) OpenSnapshot ¶
func (rb *BackupStatus) OpenSnapshot(snapID, volumeID string) error
func (*BackupStatus) ReadSnapshot ¶
func (rb *BackupStatus) ReadSnapshot(snapID, volumeID string, start int64, data []byte) error
func (*BackupStatus) UpdateBackupStatus ¶
type Info ¶
type PrepareRemoveAction ¶
type ProgressState ¶
type ProgressState string
type Replica ¶
func NewReadOnly ¶
func NewReadOnly(dir, head string, backingFile *BackingFile) (*Replica, error)
func (*Replica) DisplayChain ¶
func (*Replica) GetRemainSnapshotCounts ¶
func (*Replica) GetRevisionCounter ¶
func (*Replica) MarkDiskAsRemoved ¶
func (*Replica) PrepareRemoveDisk ¶
func (r *Replica) PrepareRemoveDisk(name string) ([]PrepareRemoveAction, error)
func (*Replica) ReplaceDisk ¶
func (*Replica) SetRebuilding ¶
func (*Replica) SetRevisionCounter ¶
type RestoreStatus ¶
type RestoreStatus struct { sync.Mutex SnapshotName string //This will be deltaFileName in case of Incremental Restore Progress int Error string BackupURL string State ProgressState //Incremental Restore fields LastRestored string SnapshotDiskName string // contains filtered or unexported fields }
func NewRestore ¶
func NewRestore(snapshotName, replicaAddress string) *RestoreStatus
func (*RestoreStatus) FinishRestore ¶
func (rr *RestoreStatus) FinishRestore()
func (*RestoreStatus) UpdateRestoreStatus ¶
func (rr *RestoreStatus) UpdateRestoreStatus(snapshot string, rp int, re error)
type Server ¶
func (*Server) MarkDiskAsRemoved ¶
func (*Server) PingResponse ¶
func (*Server) PrepareRemoveDisk ¶
func (s *Server) PrepareRemoveDisk(name string) ([]PrepareRemoveAction, error)
func (*Server) ReplaceDisk ¶
func (*Server) SetRebuilding ¶
func (*Server) SetRevisionCounter ¶
type UsedGenerator ¶
type UsedGenerator struct {
// contains filtered or unexported fields
}
func (*UsedGenerator) Err ¶
func (u *UsedGenerator) Err() error
func (*UsedGenerator) Generate ¶
func (u *UsedGenerator) Generate() <-chan int64
Source Files ¶
Click to show internal directories.
Click to hide internal directories.