Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
Signed-off-by: Clément Nussbaumer <[email protected]>
  • Loading branch information
clementnuss committed Mar 11, 2024
1 parent a0b49bb commit 7aac7e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions internal/servicecheck/httptrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ func withHttptrace(registry *prometheus.Registry, next http.RoundTripper, durati

// Add tracing hooks
trace := &httptrace.ClientTrace{
GotConn: func(info httptrace.GotConnInfo) {
GotConn: func(_ httptrace.GotConnInfo) {
collectMetric("got_conn", start, r, nil)
},
DNSStart: func(info httptrace.DNSStartInfo) {
DNSStart: func(_ httptrace.DNSStartInfo) {
collectMetric("dns_start", start, r, nil)
},
DNSDone: func(info httptrace.DNSDoneInfo) {
Expand All @@ -96,7 +96,7 @@ func withHttptrace(registry *prometheus.Registry, next http.RoundTripper, durati
TLSHandshakeStart: func() {
collectMetric("tls_handshake_start", start, r, nil)
},
TLSHandshakeDone: func(_ tls.ConnectionState, err error) {
TLSHandshakeDone: func(_ tls.ConnectionState, _ error) {
collectMetric("tls_handshake_done", start, r, nil)
},
WroteRequest: func(info httptrace.WroteRequestInfo) {
Expand All @@ -118,6 +118,7 @@ func withHttptrace(registry *prometheus.Registry, next http.RoundTripper, durati
rt := next // variable pinning :) essential, to prevent always re-instrumenting the original variable
rt = promhttp.InstrumentRoundTripperCounter(httpclientReqTotal, rt)
rt = promhttp.InstrumentRoundTripperDuration(httpclientReqDuration, rt)

return rt.RoundTrip(r)
})
}
2 changes: 0 additions & 2 deletions internal/servicecheck/neighbours.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ func (c *Checker) checkNeighbours(nh []*Neighbour) {
}

for _, neighbour := range nh {
neighbour := neighbour // pin

check := func(ctx context.Context) (string, error) {
if c.UseTLS {
return c.doRequest(ctx, "https://"+neighbour.PodIP+":8443/alwayshappy")
Expand Down

0 comments on commit 7aac7e0

Please sign in to comment.