Vasiliy Tolstov
06136312bb
* regen files with never protoc * rewrite import path Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
15 lines
324 B
Go
15 lines
324 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/unistack-org/micro/v3/util/backoff"
|
|
)
|
|
|
|
type BackoffFunc func(ctx context.Context, req Request, attempts int) (time.Duration, error)
|
|
|
|
func exponentialBackoff(ctx context.Context, req Request, attempts int) (time.Duration, error) {
|
|
return backoff.Do(attempts), nil
|
|
}
|