项目文件夹

文件
T
Asim Aslam 563768b58a
Docker / build (push) Has been cancelled
Run tests / Test repo (push) Has been cancelled
v3 refactor (#1868)
* Move to v3

Co-authored-by: Ben Toogood <bentoogood@gmail.com>
2020-07-27 13:22:00 +01:00

15 行
320 B
Go

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