Rename `remote.newReadClient()` to `remote.NewReadClient()` (#7881)
This should make the `NewReadClient()` exported outside the `remote` package Signed-off-by: Anand Sanmukhani <asanmukh@redhat.com>
This commit is contained in:
parent
7b4a2ca870
commit
f4a1b3cef6
|
@ -102,8 +102,8 @@ type ReadClient interface {
|
||||||
Read(ctx context.Context, query *prompb.Query) (*prompb.QueryResult, error)
|
Read(ctx context.Context, query *prompb.Query) (*prompb.QueryResult, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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) (ReadClient, error) {
|
||||||
httpClient, err := config_util.NewClientFromConfig(conf.HTTPClientConfig, "remote_storage_read_client", false, false)
|
httpClient, err := config_util.NewClientFromConfig(conf.HTTPClientConfig, "remote_storage_read_client", false, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -102,7 +102,7 @@ func (s *Storage) ApplyConfig(conf *config.Config) error {
|
||||||
name = rrConf.Name
|
name = rrConf.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
c, err := newReadClient(name, &ClientConfig{
|
c, err := NewReadClient(name, &ClientConfig{
|
||||||
URL: rrConf.URL,
|
URL: rrConf.URL,
|
||||||
Timeout: rrConf.RemoteTimeout,
|
Timeout: rrConf.RemoteTimeout,
|
||||||
HTTPClientConfig: rrConf.HTTPClientConfig,
|
HTTPClientConfig: rrConf.HTTPClientConfig,
|
||||||
|
|
Loading…
Reference in New Issue