Skip to content

Commit ffd73d9

Browse files
sagikazarmarkmeiliang86
authored andcommitted
Expose WithRetryPolicy in workflow package (#974)
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com> Co-authored-by: Liang Mei <meiliang86@gmail.com>
1 parent ecb64cf commit ffd73d9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

workflow/activity_options.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ type ActivityOptions = internal.ActivityOptions
3232
// LocalActivityOptions doc
3333
type LocalActivityOptions = internal.LocalActivityOptions
3434

35+
// RetryPolicy specify how to retry activity if error happens.
36+
type RetryPolicy = internal.RetryPolicy
37+
3538
// WithActivityOptions adds all options to the copy of the context.
3639
func WithActivityOptions(ctx Context, options ActivityOptions) Context {
3740
return internal.WithActivityOptions(ctx, options)
@@ -67,7 +70,12 @@ func WithHeartbeatTimeout(ctx Context, d time.Duration) Context {
6770
return internal.WithHeartbeatTimeout(ctx, d)
6871
}
6972

70-
// WithWaitForCancellation adds wait for the cacellation to the copy of the context.
73+
// WithWaitForCancellation adds wait for the cancellation to the copy of the context.
7174
func WithWaitForCancellation(ctx Context, wait bool) Context {
7275
return internal.WithWaitForCancellation(ctx, wait)
7376
}
77+
78+
// WithRetryPolicy adds retry policy to the copy of the context.
79+
func WithRetryPolicy(ctx Context, retryPolicy RetryPolicy) Context {
80+
return internal.WithRetryPolicy(ctx, retryPolicy)
81+
}

0 commit comments

Comments
 (0)