m/cli/metroctl: clean up RPC API
This removes a bunch of logic from the metroctl core RPC functions,
forcing users (currently only other metroctl code) to use grpc.Dial and
the metropolis RPC library directly.
We also make the core functions take ConnectOptions structures where
appropriate instead of passing around tons of arguments.
Change-Id: I4d7aa232a659097da35027dfb9b87c58cbb4ab84
Reviewed-on: https://review.monogon.dev/c/monogon/+/2742
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/cli/metroctl/core/config.go b/metropolis/cli/metroctl/core/config.go
index 9714421..1307d61 100644
--- a/metropolis/cli/metroctl/core/config.go
+++ b/metropolis/cli/metroctl/core/config.go
@@ -219,6 +219,9 @@
// instances that metroctl should use to establish connectivity to a cluster.
// These instances should have the ControlPlane role set.
Endpoints []string
+ // ResolverLogger can be set to enable verbose logging of the Metropolis RPC
+ // resolver layer.
+ ResolverLogger ResolverLogger
}
// ToFlags returns the metroctl flags corresponding to the options described by