Skip to content

Commit 385a16f

Browse files
Use base.SetupHttpClient()
1 parent 5369539 commit 385a16f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/vitess/api_client.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"strings"
99
"time"
1010

11+
"github.com/github/freno/pkg/base"
1112
"vitess.io/vitess/go/vt/proto/topodata"
1213
)
1314

@@ -25,15 +26,13 @@ func (t Tablet) IsValidReplica() bool {
2526

2627
// Manager gathers info from Vitess
2728
type Manager struct {
28-
client http.Client
29+
client *http.Client
2930
}
3031

3132
// NewManager returns a new manager for Vitess
3233
func NewManager(apiTimeout time.Duration) *Manager {
3334
return &Manager{
34-
client: http.Client{
35-
Timeout: apiTimeout,
36-
},
35+
client: base.SetupHttpClient(apiTimeout),
3736
}
3837
}
3938

0 commit comments

Comments
 (0)