Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
niontive committed Jul 25, 2023
1 parent 703c212 commit 2f9001a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkg/frontend/middleware/maintenance.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
package middleware

// Copyright (c) Microsoft Corporation.
// Licensed under the Apache License 2.0.

import (
"context"
"net/http"
"path/filepath"
"strings"
"time"

"github.com/Azure/ARO-RP/pkg/metrics"
)

type MaintenanceMiddleware struct {
metrics.Emitter
}
Expand All @@ -12,7 +25,7 @@ func (mm MaintenanceMiddleware) EmitUnplannedMaintenanceSignal(h http.Handler) h

resourceID := strings.TrimPrefix(filepath.Dir(r.URL.Path), "/admin")

go func(ctx context.Contetxt, resourceID string) {
go func(ctx context.Context, resourceID string) {
for {
mm.EmitGauge("frontend.maintenance.unplanned", 1, map[string]string{
"resourceID": resourceID,
Expand Down

0 comments on commit 2f9001a

Please sign in to comment.