Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Saswata Mukherjee <[email protected]>
  • Loading branch information
saswatamcode committed Oct 21, 2024
1 parent 629dc95 commit 251d2b0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions metrics/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ import (
"time"

"github.com/prometheus-community/avalanche/pkg/errors"
"gopkg.in/alecthomas/kingpin.v2"

"github.com/gogo/protobuf/proto"
"github.com/golang/snappy"
"github.com/prometheus/client_golang/prometheus"
dto "github.com/prometheus/client_model/go"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/prompb"
"gopkg.in/alecthomas/kingpin.v2"
)

const maxErrMsgLen = 256
Expand Down Expand Up @@ -109,20 +109,20 @@ type Client struct {

// SendRemoteWrite initializes a http client and
// sends metrics to a prometheus compatible remote endpoint.
func (config *ConfigWrite) SendRemoteWrite(ctx context.Context, gatherer prometheus.Gatherer) error {
func (c *ConfigWrite) SendRemoteWrite(ctx context.Context, gatherer prometheus.Gatherer) error {
var rt http.RoundTripper = &http.Transport{
TLSClientConfig: &config.TLSClientConfig,
TLSClientConfig: &c.TLSClientConfig,
}
rt = &tenantRoundTripper{tenant: config.Tenant, tenantHeader: config.TenantHeader, rt: rt}
rt = &tenantRoundTripper{tenant: c.Tenant, tenantHeader: c.TenantHeader, rt: rt}
httpClient := &http.Client{Transport: rt}

c := Client{
client := Client{
client: httpClient,
timeout: time.Minute,
config: config,
config: c,
gatherer: gatherer,
}
return c.write(ctx)
return client.write(ctx)
}

// Add the tenant ID header
Expand Down

0 comments on commit 251d2b0

Please sign in to comment.