File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -5,18 +5,18 @@ import (
5
5
)
6
6
7
7
type BackoffStrategy struct {
8
- InitialInterval time.Duration // Initial retry interval
9
- MaxInterval time.Duration // Maximum interval between retries
10
- Multiplier float64 // Multiplier to apply to the interval after each failure
8
+ InitialInterval time.Duration `json:"initialInterval"`
9
+ MaxInterval time.Duration `json:"maxInterval"`
10
+ Multiplier float64 `json:"multiplier"`
11
11
}
12
12
13
13
type TaskOptions struct {
14
- Timeout time.Duration // Maximum time allowed for the task to complete
15
- Retries int // Number of times to retry the task upon failure
16
- RetryOnFail bool // Whether to retry the task automatically on failure
17
- BackoffStrategy BackoffStrategy // Backoff strategy for handling retries
18
- PartitionKey string
19
- TenantId string
14
+ Timeout time.Duration `json:"timeout"`
15
+ Retries int `json:"retries"`
16
+ RetryOnFail bool `json:"retryOnFail"`
17
+ BackoffStrategy BackoffStrategy `json:"backoffStrategy"`
18
+ PartitionKey string `json:"partitionKey"`
19
+ TenantId string `json:"tenantId"`
20
20
}
21
21
22
22
func (t TaskOptions ) WithPartitionKey (partitionKey string ) TaskOptions {
You can’t perform that action at this time.
0 commit comments