Documentation
¶
Overview ¶
Package retry provides a way to determine when a task should be retried.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNeeded ¶
func IsNeeded(result *steps.ExecuteResponse_TaskResult) bool
IsNeeded determines if a task result indicates that the invocation needs to be retried.
Panics on unknown verdicts.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter tracks retries across tests and exposes a method to decide if a particular test can be retried any further.
func NewCounter ¶
func NewCounter(params *test_platform.Request_Params, iids map[types.InvocationID]*steps.EnumerationResponse_AutotestInvocation) Counter
NewCounter initializes a new Counter.
func (*Counter) CanRetry ¶
CanRetry determines if a retry is allowed for a test based on the count of retries so far.
CanRetry panics for an unknown types.InvocationID.
func (*Counter) NotifyRetry ¶
func (c *Counter) NotifyRetry(iid types.InvocationID)
NotifyRetry notifies retryCounter of a retry attempt for a test.
NotifyRetry panics for an unknown types.InvocationID.
func (*Counter) RetryCount ¶
func (c *Counter) RetryCount(iid types.InvocationID) int
RetryCount gives the retry attempt number identifier for a test.
RetryCount panics for an unknown types.InvocationID.