m/node/allocs: split new package off m/node
The metropolis/node package contains various unrelated things. One of
these things are node-wide allocations of identifiers.
These are moved here to the new metropolis/node/allocs package.
Additionally, the constants are renamed to move the type of identifier
in front.
Change-Id: Ibc841ca64d4450a7054463e6d2d44753a118e07a
Reviewed-on: https://review.monogon.dev/c/monogon/+/4566
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/node/core/metrics/metrics.go b/metropolis/node/core/metrics/metrics.go
index 9abed54..e547c5d 100644
--- a/metropolis/node/core/metrics/metrics.go
+++ b/metropolis/node/core/metrics/metrics.go
@@ -12,7 +12,7 @@
"net/http"
"os/exec"
- "source.monogon.dev/metropolis/node"
+ "source.monogon.dev/metropolis/node/allocs"
"source.monogon.dev/metropolis/node/core/identity"
"source.monogon.dev/osbase/supervisor"
)
@@ -29,7 +29,7 @@
// Each exporter is exposed on a separate path, /metrics/<name>, where <name> is
// the name of the exporter.
//
-// The HTTPS listener is bound to node.MetricsPort.
+// The HTTPS listener is bound to allocs.PortMetrics.
type Service struct {
// Credentials used to run the TLS/HTTPS listener and verify incoming
// connections.
@@ -67,7 +67,7 @@
// anyone/anything with a valid cluster certificate to access them.
}
- addr := net.JoinHostPort("", node.MetricsPort.PortString())
+ addr := net.JoinHostPort("", allocs.PortMetrics.PortString())
if s.enableDynamicAddr {
addr = ""
}