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:
Anand Sanmukhani 2020-09-02 12:15:10 -04:00 committed by GitHub
parent 7b4a2ca870
commit f4a1b3cef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -102,8 +102,8 @@ type ReadClient interface {
Read(ctx context.Context, query *prompb.Query) (*prompb.QueryResult, error)
}
// newReadClient creates a new client for remote read.
func newReadClient(name string, conf *ClientConfig) (ReadClient, error) {
// NewReadClient creates a new client for remote read.
func NewReadClient(name string, conf *ClientConfig) (ReadClient, error) {
httpClient, err := config_util.NewClientFromConfig(conf.HTTPClientConfig, "remote_storage_read_client", false, false)
if err != nil {
return nil, err

View File

@ -102,7 +102,7 @@ func (s *Storage) ApplyConfig(conf *config.Config) error {
name = rrConf.Name
}
c, err := newReadClient(name, &ClientConfig{
c, err := NewReadClient(name, &ClientConfig{
URL: rrConf.URL,
Timeout: rrConf.RemoteTimeout,
HTTPClientConfig: rrConf.HTTPClientConfig,