Merge pull request #16322 from zenador/customise-newreadclient

Allow NewReadClient to take in more config options
This commit is contained in:
George Krajcsovits 2025-03-26 11:19:47 +01:00 committed by GitHub
commit 34bed4608b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,8 +145,8 @@ type ReadClient interface {
} }
// NewReadClient creates a new client for remote read. // NewReadClient creates a new client for remote read.
func NewReadClient(name string, conf *ClientConfig) (ReadClient, error) { func NewReadClient(name string, conf *ClientConfig, optFuncs ...config_util.HTTPClientOption) (ReadClient, error) {
httpClient, err := config_util.NewClientFromConfig(conf.HTTPClientConfig, "remote_storage_read_client") httpClient, err := config_util.NewClientFromConfig(conf.HTTPClientConfig, "remote_storage_read_client", optFuncs...)
if err != nil { if err != nil {
return nil, err return nil, err
} }