Source File
execution.go
Belonging Package
github.com/failsafe-go/failsafe-go/policy
package policyimport ()type ExecutionInternal[ any] interface {failsafe.Execution[]// RecordResult records an execution result, such as before a retry attempt, and returns the result or the cancel result,// if any.RecordResult(result *common.PolicyResult[]) *common.PolicyResult[]// InitializeRetry prepares a new execution retry. If the retry could not be initialized because was canceled, the associated// cancellation result is returned.InitializeRetry() *common.PolicyResult[]// Cancel cancels the execution with the result.Cancel(result *common.PolicyResult[])// IsCanceledWithResult returns whether the execution is canceled, along with the cancellation result, if any.IsCanceledWithResult() (bool, *common.PolicyResult[])// CopyWithResult returns a copy of the failsafe.Execution with the result. If the result is nil, this will preserve a// copy of the lastResult and lastError. This is useful before passing the execution to an event listener, otherwise// these may be changed if the execution is canceled.CopyWithResult(result *common.PolicyResult[]) failsafe.Execution[]// CopyForCancellable creates a cancellable child copy of the execution based on the current execution's context.CopyForCancellable() failsafe.Execution[]// CopyForHedge creates a copy of the execution marked as a hedge.CopyForHedge() failsafe.Execution[]}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |