m/node: extract network.Status to node.NetStatus
This is done to avoid nasty dependency loops involving clusternet and
the network service. The clusternet service can currently not be
included by anything also talking to the network service which will be
needed by future network work.
To make this work we pull out the critical network.Status into
node.NetStatus which itself imports nothing and is thus safe to import
everywhere.
Change-Id: I8935de02926b6e06b5211f90c0c7f9abd8699c6d
Reviewed-on: https://review.monogon.dev/c/monogon/+/4495
Tested-by: Jenkins CI
Reviewed-by: Jan Schär <jan@monogon.tech>
diff --git a/metropolis/node/net_status.go b/metropolis/node/net_status.go
new file mode 100644
index 0000000..8bedfe4
--- /dev/null
+++ b/metropolis/node/net_status.go
@@ -0,0 +1,14 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
+package node
+
+import "net"
+
+// NetStatus is the current network status of the host. It will be updated by the
+// network Service whenever the node's network configuration changes. Spurious
+// changes might occur, consumers should ensure that the change that occured is
+// meaningful to them.
+type NetStatus struct {
+ ExternalAddress net.IP
+}