Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
moh-osman3 committed Oct 19, 2022
1 parent ce68e6b commit 16d733b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions cmd/otel-allocator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (
"github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config"
lbdiscovery "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/discovery"
"github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/prehook"
"github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/targetscommon"
"github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target"
allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher"
)

Expand Down Expand Up @@ -241,9 +241,9 @@ func (s *server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) {
}

func (s *server) JobHandler(w http.ResponseWriter, r *http.Request) {
displayData := make(map[string]targetscommon.LinkJSON)
displayData := make(map[string]target.LinkJSON)
for _, v := range s.allocator.TargetItems() {
displayData[v.JobName] = targetscommon.LinkJSON{Link: v.Link.Link}
displayData[v.JobName] = target.LinkJSON{Link: v.Link.Link}
}
s.jsonHandler(w, displayData)
}
Expand All @@ -262,7 +262,7 @@ func (s *server) PrometheusMiddleware(next http.Handler) http.Handler {
func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) {
q := r.URL.Query()["collector_id"]

var compareMap = make(map[string][]targetscommon.TargetItem) // CollectorName+jobName -> TargetItem
var compareMap = make(map[string][]target.Item) // CollectorName+jobName -> TargetItem
for _, v := range s.allocator.TargetItems() {
compareMap[v.CollectorName+v.JobName] = append(compareMap[v.CollectorName+v.JobName], *v)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/otel-allocator/prehook/relabel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ func TestSetConfig(t *testing.T) {
_, _, _, relabelCfg := makeNNewTargets(numTargets, 3, 0)
allocatorPrehook.SetConfig(relabelCfg)
assert.Equal(t, relabelCfg, allocatorPrehook.GetConfig())
}
}
2 changes: 1 addition & 1 deletion cmd/otel-allocator/target/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ func NewItem(jobName string, targetURL string, label model.LabelSet, collectorNa
Label: label,
CollectorName: collectorName,
}
}
}

0 comments on commit 16d733b

Please sign in to comment.