Skip to content

Commit

Permalink
remove split layer
Browse files Browse the repository at this point in the history
  • Loading branch information
strahe committed Mar 4, 2025
1 parent 97eff87 commit 066107a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions cmd/curio/rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"net/url"
"os"
"path/filepath"
"strings"
"time"

"github.com/gbrlsnchs/jwt/v3"
Expand Down Expand Up @@ -509,14 +508,12 @@ func prometheusServiceDiscovery(ctx context.Context, deps *deps.Deps) http.Handl
} else {
var services []service
for _, h := range hosts {
ss := service{
services = append(services, service{
Targets: []string{h.Host},
Labels: map[string]string{},
}
for _, layer := range strings.Split(h.Layers, ",") {
ss.Labels["layer_"+layer] = "true"
}
services = append(services, ss)
Labels: map[string]string{
"layers": h.Layers,
},
})
}
enc := json.NewEncoder(resp)
if err := enc.Encode(services); err != nil {
Expand Down

0 comments on commit 066107a

Please sign in to comment.