Documentation ¶
Index ¶
Constants ¶
const ( StartedPercent = "0" CompletedPercent = "100" )
Variables ¶
This section is empty.
Functions ¶
func SetActionSetPercentCompleted ¶
func SetActionSetPercentCompleted(actionSet *crv1alpha1.ActionSet) error
SetActionSetPercentCompleted calculate and set percent completion of the action. The action completion percentage is calculated by taking an average of all the involved phases.
func UpdateActionSetsProgress ¶
func UpdateActionSetsProgress( ctx context.Context, aIDX int, client versioned.Interface, actionSetName string, namespace string, p *kanister.Phase, ) error
UpdateActionSetsProgress tries to assess the progress of an actionSet by watching the states of all the phases in its actions. It starts an infinite loop, using a ticker to determine when to assess the phases. The function returns when the provided context is either done or cancelled. Caller should invoke this function in a non-main goroutine, to avoid introducing any latencies on Kanister critical path. If an error happens while attempting to update the actionSet, the failed iteration will be skipped with no further retries, until the next tick.
Types ¶
This section is empty.