Skip to content

Commit 823daf3

Browse files
committed
passthrough http client
1 parent b9e8b85 commit 823daf3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/manager/manager.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ type Options struct {
129129
// By default, the client will use the cache for reads and direct calls for writes.
130130
Client client.Options
131131

132+
// HTTPClient is the http client that will be used to create the default
133+
// Cache and Client. If not set the rest.HTTPClientFor function will be used
134+
// to create the http client.
135+
HTTPClient *http.Client
136+
132137
// NewClient is the func that creates the client to be used by the manager.
133138
// If not set this will create a Client backed by a Cache for read operations
134139
// and a direct Client for write operations.
@@ -403,6 +408,7 @@ func New(config *rest.Config, options Options) (Manager, error) {
403408
clusterOptions.NewClient = options.NewClient
404409
clusterOptions.Cache = options.Cache
405410
clusterOptions.Client = options.Client
411+
clusterOptions.HTTPClient = options.HTTPClient
406412
clusterOptions.Namespace = options.Namespace //nolint:staticcheck
407413
clusterOptions.ClientDisableCacheFor = options.ClientDisableCacheFor //nolint:staticcheck
408414
clusterOptions.DryRunClient = options.DryRunClient //nolint:staticcheck

0 commit comments

Comments
 (0)