Skip to content

Commit e028bea

Browse files
committed
fix variable
1 parent 1023ba7 commit e028bea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

backend/pkg/transport/network/tcp/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type ClientConfig struct {
1414
Context context.Context
1515

1616
TryReconnect bool
17-
ConnectionBackoffFunction BackoffFunction
17+
ConnectionBackoffFunction backoffFunction
1818
MaxConnectionRetries int
1919
}
2020

@@ -34,7 +34,7 @@ func NewClientConfig(laddr net.Addr) ClientConfig {
3434
}
3535
}
3636

37-
type BackoffFunction = func(int) time.Duration
37+
type backoffFunction = func(int) time.Duration
3838

3939
const (
4040
defaultBackoffMin time.Duration = 100 * time.Millisecond
@@ -45,7 +45,7 @@ const (
4545
// NewExponentialBackoff returns an exponential backoff function with the given paramenters.
4646
//
4747
// It follows this formula: delay = (min * (exp ^ n); delay < max ? delay : max
48-
func NewExponentialBackoff(min time.Duration, exp float64, max time.Duration) BackoffFunction {
48+
func NewExponentialBackoff(min time.Duration, exp float64, max time.Duration) backoffFunction {
4949
return func(n int) time.Duration {
5050
curr := time.Duration(float64(min) * math.Trunc(math.Pow(exp, float64(n))))
5151
if curr >= max {

0 commit comments

Comments
 (0)