treewide: replace deprecated grpc.Dial with grpc.NewClient
Change-Id: I925912ca1ee01d547fd9c1813eb083a2cd9a590a
Reviewed-on: https://review.monogon.dev/c/monogon/+/3858
Reviewed-by: Jan Schär <jan@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/cli/metroctl/cmd_node_set.go b/metropolis/cli/metroctl/cmd_node_set.go
index 677a425..41e2d08 100644
--- a/metropolis/cli/metroctl/cmd_node_set.go
+++ b/metropolis/cli/metroctl/cmd_node_set.go
@@ -34,9 +34,9 @@
Args: PrintUsageOnWrongArgs(cobra.MinimumNArgs(2)),
RunE: func(cmd *cobra.Command, args []string) error {
ctx, _ := signal.NotifyContext(context.Background(), os.Interrupt)
- cc, err := dialAuthenticated(ctx)
+ cc, err := newAuthenticatedClient(ctx)
if err != nil {
- return fmt.Errorf("while dialing node: %w", err)
+ return fmt.Errorf("while creating client: %w", err)
}
mgmt := api.NewManagementClient(cc)
@@ -78,9 +78,9 @@
Args: PrintUsageOnWrongArgs(cobra.ArbitraryArgs),
RunE: func(cmd *cobra.Command, args []string) error {
ctx, _ := signal.NotifyContext(context.Background(), os.Interrupt)
- cc, err := dialAuthenticated(ctx)
+ cc, err := newAuthenticatedClient(ctx)
if err != nil {
- return fmt.Errorf("while dialing node: %w", err)
+ return fmt.Errorf("while creating client: %w", err)
}
mgmt := api.NewManagementClient(cc)