Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithHandler ¶ added in v2.3.0
ContextWithHandler return a ctx contains handler
Types ¶
type AtServiceTask ¶
AtServiceTask is the root task for service only task.
func NewAtServiceTask ¶
func NewAtServiceTask(poolSize int) *AtServiceTask
NewAtServiceTask will create a new between storage task.
type AtStorageTask ¶
AtStorageTask is the root task for single storage task.
func NewAtStorageTask ¶
func NewAtStorageTask(poolSize int) *AtStorageTask
NewAtStorageTask will create a new between storage task.
type BetweenStorageTask ¶
type BetweenStorageTask struct { navvy.Task types.Pool types.Fault types.SourcePath types.SourceStorage types.SourceType types.DestinationPath types.DestinationStorage types.DestinationType }
BetweenStorageTask is the root task for tasks operate between two storager.
func NewBetweenStorageTask ¶
func NewBetweenStorageTask(poolSize int) *BetweenStorageTask
NewBetweenStorageTask will create a new between storage task.
type ClearFunc ¶ added in v2.3.0
type ClearFunc func()
ClearFunc is the alias of func to clear PbHandler
type PbHandler ¶ added in v2.3.0
type PbHandler struct {
// contains filtered or unexported fields
}
PbHandler is used to handle progress bar
func HandlerFromContext ¶ added in v2.3.0
HandlerFromContext get handler from ctx, if not exist, return nil
func (*PbHandler) StartProgress ¶ added in v2.3.0
StartProgress start to get state from state center. d is the duration time between two data, Start a ticker to get data from noah periodically. The data from noah is a map with taskID as key and its state as value. So we range the data and update relevant bar's progress.
func (*PbHandler) WaitProgress ¶ added in v2.3.0
func (h *PbHandler) WaitProgress()
WaitProgress wait the progress bar to complete