Skip to content

Commit 8fd2e70

Browse files
authored
Changed Retry.Multiplier, OnError.Transition, OnError.End to pointer (#49)
* Changed Multiplier to pointer * Changed Transition & End to pointers
1 parent 7e3a7ca commit 8fd2e70

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

model/retry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Retry struct {
3030
// Static value by which the delay increases during each attempt (ISO 8601 time format)
3131
Increment string `json:"increment,omitempty"`
3232
// Numeric value, if specified the delay between retries is multiplied by this value.
33-
Multiplier floatstr.Float32OrString `json:"multiplier,omitempty" validate:"omitempty,min=0"`
33+
Multiplier *floatstr.Float32OrString `json:"multiplier,omitempty" validate:"omitempty,min=1"`
3434
// Maximum number of retry attempts.
3535
MaxAttempts intstr.IntOrString `json:"maxAttempts" validate:"required"`
3636
// If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0 and 1). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (ISO 8601 duration format)

model/workflow.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,9 @@ type OnError struct {
483483
// ErrorRefs References one or more workflow error definitions. Used if errorRef is not used
484484
ErrorRefs []string `json:"errorRefs,omitempty"`
485485
// Transition to next state to handle the error. If retryRef is defined, this transition is taken only if retries were unsuccessful.
486-
Transition Transition `json:"transition,omitempty"`
486+
Transition *Transition `json:"transition,omitempty"`
487487
// End workflow execution in case of this error. If retryRef is defined, this ends workflow only if retries were unsuccessful.
488-
End End `json:"end,omitempty"`
488+
End *End `json:"end,omitempty"`
489489
}
490490

491491
// OnEvents ...

0 commit comments

Comments
 (0)