Skip to content

Commit be15291

Browse files
committed
bugfixes
1 parent bf269f6 commit be15291

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

httpclient/client.go

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ type Client struct {
3535

3636
// Options/Variables for Client
3737
type ClientConfig struct {
38-
Integration APIIntegration
39-
HideSensitiveData bool
40-
CustomCookies []*http.Cookie
41-
MaxRetryAttempts int
42-
MaxConcurrentRequests int
43-
EnableDynamicRateLimiting bool
44-
CustomTimeout time.Duration
45-
TokenRefreshBufferPeriod time.Duration
46-
TotalRetryDuration time.Duration // TODO do we need this now it's in the integration?
47-
MandatoryRequestDelay time.Duration
48-
FollowRedirects bool
49-
MaxRedirects int
50-
ConcurrencyManagementEnabled bool
51-
RetryEligiableRequests bool
38+
Integration APIIntegration
39+
HideSensitiveData bool `json:"hide_sensitive_data"`
40+
CustomCookies []*http.Cookie
41+
MaxRetryAttempts int `json:"max_retry_attempts"`
42+
MaxConcurrentRequests int `json:"max_concurrent_requests"`
43+
EnableDynamicRateLimiting bool `json:"enable_dynamic_rate_limiting"`
44+
CustomTimeout time.Duration
45+
TokenRefreshBufferPeriod time.Duration
46+
TotalRetryDuration time.Duration
47+
FollowRedirects bool `json:"follow_redirects"`
48+
MaxRedirects int `json:"max_redirects"`
49+
EnableConcurrencyManagement bool `json:"enable_concurrency_management"`
50+
MandatoryRequestDelay time.Duration
51+
RetryEligiableRequests bool `json:"retry_eligiable_requests"`
5252
}
5353

5454
// BuildClient creates a new HTTP client with the provided configuration.
@@ -71,7 +71,7 @@ func BuildClient(config ClientConfig, populateDefaultValues bool, log logger.Log
7171
}
7272

7373
var concurrencyHandler *concurrency.ConcurrencyHandler
74-
if config.ConcurrencyManagementEnabled {
74+
if config.EnableConcurrencyManagement {
7575
concurrencyMetrics := &concurrency.ConcurrencyMetrics{}
7676
concurrencyHandler = concurrency.NewConcurrencyHandler(
7777
config.MaxConcurrentRequests,
@@ -105,6 +105,7 @@ func BuildClient(config ClientConfig, populateDefaultValues bool, log logger.Log
105105
zap.Duration("Token Refresh Buffer Period", config.TokenRefreshBufferPeriod),
106106
zap.Duration("Total Retry Duration", config.TotalRetryDuration),
107107
zap.Duration("Custom Timeout", config.CustomTimeout),
108+
zap.Bool("Enable Concurrency Management", config.EnableConcurrencyManagement),
108109
)
109110

110111
return client, nil

0 commit comments

Comments
 (0)