Documentation ¶
Index ¶
- Constants
- func GetProgress(total, processed int64) int
- func IsBlockSafeToDelete(blk *BlockInfo) bool
- func MergeErrorChannels(ctx context.Context, channels ...<-chan error) <-chan error
- func PopulateBlocksForFullRestore(blocks []BlockMapping, compressionMethod string) (<-chan *Block, <-chan error)
- func PopulateMappings(bsDriver backupstore.BackupStoreDriver, mappings *Mappings) (<-chan Mapping, <-chan error)
- func UpdateBlockReferenceCount(blockInfos map[string]*BlockInfo, blocks []BlockMapping, ...)
- type Block
- type BlockInfo
- type BlockMapping
- type Mapping
- type Mappings
- type MessageType
- type ProcessingBlocks
- type Progress
- type ProgressState
Constants ¶
View Source
const ( ProgressStateInProgress = ProgressState("in_progress") ProgressStateComplete = ProgressState("complete") ProgressStateError = ProgressState("error") )
View Source
const ( ProgressPercentageBackup = 95 ProgressPercentageBackupTotal = 100 )
View Source
const (
MessageTypeError = MessageType("error")
)
Variables ¶
This section is empty.
Functions ¶
func GetProgress ¶
func IsBlockSafeToDelete ¶
func MergeErrorChannels ¶
MergeErrorChannels will merge all error channels into a single error out channel. the error out channel will be closed once the ctx is done or all error channels are closed if there is an error on one of the incoming channels the error will be relayed.
func PopulateBlocksForFullRestore ¶
func PopulateBlocksForFullRestore(blocks []BlockMapping, compressionMethod string) (<-chan *Block, <-chan error)
func PopulateMappings ¶
func PopulateMappings(bsDriver backupstore.BackupStoreDriver, mappings *Mappings) (<-chan Mapping, <-chan error)
func UpdateBlockReferenceCount ¶
func UpdateBlockReferenceCount(blockInfos map[string]*BlockInfo, blocks []BlockMapping, driver backupstore.BackupStoreDriver)
Types ¶
type BlockMapping ¶
func SortBackupBlocks ¶
func SortBackupBlocks(blocks []BlockMapping, size, blockSize int64) []BlockMapping
type MessageType ¶
type MessageType string
type ProcessingBlocks ¶
type ProcessingBlocks struct { sync.Mutex Blocks map[string][]*BlockMapping }
type ProgressState ¶
type ProgressState string
Click to show internal directories.
Click to hide internal directories.