项目文件夹

文件
T
Asim Aslam 1cd7cfaa6c
Run tests / Test repo (push) Has been cancelled
go-micro.dev/v4 (#2305)
2021-10-12 12:55:53 +01:00

15 行
307 B
Go

package client
import (
"context"
"time"
"go-micro.dev/v4/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
}