Documentation ¶
Index ¶
- type AttemptReport
- func (self *AttemptReport) BytesSum() (expected, replicated uint64, invalidSizeEstimates bool)
- func (self *AttemptReport) FilesystemsByState() map[FilesystemState][]*FilesystemReport
- func (self *AttemptReport) FilesystemsProgress() (expected, replicated int)
- func (self *AttemptReport) IsTerminal() bool
- func (self *AttemptReport) SortFilesystems() []*FilesystemReport
- type AttemptState
- type FilesystemInfo
- type FilesystemReport
- func (self *FilesystemReport) BytesSum() (expected, replicated uint64, containsInvalidSizeEstimates bool)
- func (self *FilesystemReport) Error() *TimedError
- func (self *FilesystemReport) NextStep() *StepReport
- func (self *FilesystemReport) Running() bool
- func (self *FilesystemReport) Step() *StepReport
- type FilesystemState
- type FsBlockedOn
- type Report
- type StepInfo
- type StepReport
- type TimedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttemptReport ¶
type AttemptReport struct { State AttemptState StartAt, FinishAt time.Time PlanError *TimedError Filesystems []*FilesystemReport }
func (*AttemptReport) BytesSum ¶
func (self *AttemptReport) BytesSum() (expected, replicated uint64, invalidSizeEstimates bool, )
func (*AttemptReport) FilesystemsByState ¶
func (self *AttemptReport) FilesystemsByState() map[FilesystemState][]*FilesystemReport
func (*AttemptReport) FilesystemsProgress ¶
func (self *AttemptReport) FilesystemsProgress() (expected, replicated int)
func (*AttemptReport) IsTerminal ¶
func (self *AttemptReport) IsTerminal() bool
func (*AttemptReport) SortFilesystems ¶
func (self *AttemptReport) SortFilesystems() []*FilesystemReport
type AttemptState ¶
type AttemptState string
const ( AttemptPlanning AttemptState = "planning" AttemptPlanningError AttemptState = "planning-error" AttemptFanOutFSs AttemptState = "fan-out-filesystems" AttemptFanOutError AttemptState = "filesystem-error" AttemptDone AttemptState = "done" )
func (AttemptState) IsTerminal ¶
func (a AttemptState) IsTerminal() bool
Returns true in case the AttemptState is a terminal state(AttemptPlanningError, AttemptFanOutError, AttemptDone)
type FilesystemInfo ¶
type FilesystemInfo struct {
Name string
}
type FilesystemReport ¶
type FilesystemReport struct { Info *FilesystemInfo State FilesystemState // Always valid. BlockedOn FsBlockedOn // Valid in State = FilesystemPlanningErrored PlanError *TimedError // Valid in State = FilesystemSteppingErrored StepError *TimedError // Valid in State = FilesystemStepping CurrentStep int Steps []*StepReport }
func (*FilesystemReport) BytesSum ¶
func (self *FilesystemReport) BytesSum() (expected, replicated uint64, containsInvalidSizeEstimates bool, )
func (*FilesystemReport) Error ¶
func (self *FilesystemReport) Error() *TimedError
func (*FilesystemReport) NextStep ¶
func (self *FilesystemReport) NextStep() *StepReport
may return nil
func (*FilesystemReport) Running ¶
func (self *FilesystemReport) Running() bool
func (*FilesystemReport) Step ¶
func (self *FilesystemReport) Step() *StepReport
type FilesystemState ¶
type FilesystemState string
const ( FilesystemPlanning FilesystemState = "planning" FilesystemPlanningErrored FilesystemState = "planning-error" FilesystemStepping FilesystemState = "stepping" FilesystemSteppingErrored FilesystemState = "step-error" FilesystemDone FilesystemState = "done" )
type FsBlockedOn ¶
type FsBlockedOn string
const ( FsBlockedOnNothing FsBlockedOn = "nothing" FsBlockedOnPlanningStepQueue FsBlockedOn = "plan-queue" FsBlockedOnParentInitialRepl FsBlockedOn = "parent-initial-repl" FsBlockedOnReplStepQueue FsBlockedOn = "repl-queue" )
type Report ¶
type Report struct {
StartAt, FinishAt time.Time
WaitReconnectSince, WaitReconnectUntil time.Time
WaitReconnectError *TimedError
Attempts []*AttemptReport
}
func (*Report) GetFailedFilesystemsCountInLatestAttempt ¶
Returns, for the latest replication attempt, 0 if there have not been any replication attempts, -1 if the replication failed while enumerating file systems N if N filesystems could not not be replicated successfully
type StepReport ¶
type StepReport struct {
Info *StepInfo
}
func (*StepReport) IsIncremental ¶
func (f *StepReport) IsIncremental() bool
type TimedError ¶
func NewTimedError ¶
func NewTimedError(err string, t time.Time) *TimedError
func (*TimedError) Error ¶
func (s *TimedError) Error() string
Click to show internal directories.
Click to hide internal directories.