Skip to content

Commit dc12c69

Browse files
committed
Expose http.Client override to global configuration
1 parent fe8f520 commit dc12c69

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

api.go

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type Config struct {
2222
ProfileTypes []ProfileType
2323
DisableGCRuns bool // this will disable automatic runtime.GC runs between getting the heap profiles
2424
HTTPHeaders map[string]string
25+
HTTPClient remote.HTTPClient
2526

2627
// Deprecated: the field will be removed in future releases.
2728
// Use BasicAuthUser and BasicAuthPassword instead.
@@ -63,6 +64,7 @@ func Start(cfg Config) (*Profiler, error) {
6364
BasicAuthUser: cfg.BasicAuthUser,
6465
BasicAuthPassword: cfg.BasicAuthPassword,
6566
HTTPHeaders: cfg.HTTPHeaders,
67+
HTTPClient: cfg.HTTPClient,
6668
Address: cfg.ServerAddress,
6769
Threads: 5, // per each profile type upload
6870
Timeout: 30 * time.Second,

0 commit comments

Comments
 (0)