Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
spinillos committed Apr 22, 2024
1 parent 9675c1d commit 6e091e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pkg/mimir/client/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Client struct {
config *config.MimirConfig
}

func NewHttpClient(config *config.MimirConfig) Mimir {
func NewHTTPClient(config *config.MimirConfig) Mimir {
return &Client{config: config}
}

Expand Down Expand Up @@ -91,10 +91,10 @@ func (c *Client) doRequest(method string, url string, body []byte) ([]byte, erro
if c.config.APIKey != "" {
req.SetBasicAuth(c.config.TenantID, c.config.APIKey)
} else {
req.Header.Set("X-Scope-OrgID", fmt.Sprintf("%s", c.config.TenantID))
req.Header.Set("X-Scope-OrgID", c.config.TenantID)
}

client, err := createHttpClient()
client, err := createHTTPClient()
if err != nil {
return nil, err
}
Expand All @@ -116,7 +116,7 @@ func (c *Client) doRequest(method string, url string, body []byte) ([]byte, erro
return b, nil
}

func createHttpClient() (*http.Client, error) {
func createHTTPClient() (*http.Client, error) {
timeout := 10 * time.Second
// TODO: Move this configuration to the global configuration
if timeoutStr := os.Getenv("GRIZZLY_HTTP_TIMEOUT"); timeoutStr != "" {
Expand Down
6 changes: 1 addition & 5 deletions pkg/mimir/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import (
"github.com/grafana/grizzly/pkg/mimir/client"
)

const (
Http string = "http"
)

// Provider is a grizzly.Provider implementation for Grafana.
type Provider struct {
config *config.MimirConfig
Expand All @@ -21,7 +17,7 @@ type Provider struct {

// NewProvider instantiates a new Provider.
func NewProvider(config *config.MimirConfig) (*Provider, error) {
clientTool := client.NewHttpClient(config)
clientTool := client.NewHTTPClient(config)
if config.Address == "" {
return nil, fmt.Errorf("mimir address is not set")
}
Expand Down

0 comments on commit 6e091e3

Please sign in to comment.