retrypolicy

package
v1.25.0-115.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 8 Imported by: 0

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 Validate

func Validate(policy *commonpb.RetryPolicy) error

Validate validates a retry policy

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL