Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProgress ¶ added in v0.9.5
func NewProgress() *progress
Types ¶
type PeriodicReport ¶
type PeriodicReport struct {
CronSpec string
State State
// valid in states Planning and Snapshotting
StartedAt time.Time
// valid in state SyncUp and Waiting
SleepUntil time.Time
// valid in state Err
Error string
// valid in state Snapshotting
Progress []*ReportFilesystem
}
func (*PeriodicReport) CompletionProgress ¶
func (self *PeriodicReport) CompletionProgress() (expected, completed uint64)
func (*PeriodicReport) IsTerminal ¶
func (self *PeriodicReport) IsTerminal() bool
func (*PeriodicReport) SortProgress ¶
func (self *PeriodicReport) SortProgress() []*ReportFilesystem
type Report ¶
type Report struct {
Type Type
Periodic *PeriodicReport
Manual *struct{}
}
func (*Report) SleepingUntil ¶
type ReportFilesystem ¶
type Snapper ¶
type Snapper interface {
Cron() string
Periodic() bool
Runnable() bool
Run(ctx context.Context)
Report() Report
Running() (time.Duration, bool)
}
func FromConfig ¶
func FromConfig(g *config.Global, fsf *filters.DatasetFilter, in config.SnapshottingEnum, ) (Snapper, error)
Click to show internal directories.
Click to hide internal directories.