forked from TrueCloudLab/frostfs-s3-gw
[#398] Support retryer
Add two strategy for PutBucketSettings request retryer: * exponential backoff (increasing up to `max_backoff` delays with jitter) * constant backoff (always the same `max_backoff` delay between requests) Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
58850f590e
commit
bb81afc14a
12 changed files with 288 additions and 1 deletions
|
@ -47,6 +47,9 @@ type (
|
|||
BypassContentEncodingInChunks() bool
|
||||
MD5Enabled() bool
|
||||
ACLEnabled() bool
|
||||
RetryMaxAttempts() int
|
||||
RetryMaxBackoff() time.Duration
|
||||
RetryStrategy() RetryStrategy
|
||||
}
|
||||
|
||||
FrostFSID interface {
|
||||
|
@ -63,6 +66,13 @@ type (
|
|||
}
|
||||
)
|
||||
|
||||
type RetryStrategy string
|
||||
|
||||
const (
|
||||
RetryStrategyExponential = "exponential"
|
||||
RetryStrategyConstant = "constant"
|
||||
)
|
||||
|
||||
var _ api.Handler = (*handler)(nil)
|
||||
|
||||
// New creates new api.Handler using given logger and client.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue