Skip to content

Commit

Permalink
Expose http.Client override to global configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jqueuniet committed Jan 24, 2025
1 parent fe8f520 commit dc12c69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Config struct {
ProfileTypes []ProfileType
DisableGCRuns bool // this will disable automatic runtime.GC runs between getting the heap profiles
HTTPHeaders map[string]string
HTTPClient remote.HTTPClient

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

0 comments on commit dc12c69

Please sign in to comment.