Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TimeoutFailureTypePrefix is the prefix for timeout failure types // used in retry policy // the actual failure type will be prefix + enums.TimeoutType.String() // e.g. "TemporalTimeout:StartToClose" or "TemporalTimeout:Heartbeat" TimeoutFailureTypePrefix = "TemporalTimeout:" )
Variables ¶
View Source
var DefaultDefaultRetrySettings = DefaultRetrySettings{ InitialInterval: time.Second, MaximumIntervalCoefficient: 100.0, BackoffCoefficient: 2.0, MaximumAttempts: 0, }
Functions ¶
func EnsureDefaults ¶
func EnsureDefaults(originalPolicy *commonpb.RetryPolicy, defaultSettings DefaultRetrySettings)
EnsureDefaults ensures the policy subfields, if not explicitly set, are set to the specified defaults
func IsRetryableFailure ¶
IsRetryableFailure reports whether a failure permits a retry under the given non-retryable error types. Canceled, terminated, and schedule-to-start or schedule-to-close timeout failures are not retryable. Nil, wrapper, and unrecognized failures are retryable by default.
Types ¶
type DefaultRetrySettings ¶
type DefaultRetrySettings struct {
InitialInterval time.Duration `mapstructure:"InitialIntervalInSeconds"`
MaximumIntervalCoefficient float64
BackoffCoefficient float64
MaximumAttempts int32
}
DefaultRetrySettings indicates what the "default" retry settings are if it is not specified on an Activity or for any unset fields if a policy is explicitly set on a workflow
Click to show internal directories.
Click to hide internal directories.