Skip to content

Commit 7e6e4b8

Browse files
cli: consolidate InitClient RPC client creation
This commit consolidates `InitClient` RPC client creation logic in the cli package. It is a continuation of the work done in #147606. Epic: CRDB-48923 Fixes: #148185 Release note: none
1 parent 2c99066 commit 7e6e4b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cli/init.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func runInit(cmd *cobra.Command, args []string) error {
5050
if err := dialAndCheckHealth(ctx); err != nil {
5151
return err
5252
}
53-
conn, finish, err := getClientGRPCConn(ctx, serverCfg)
53+
conn, finish, err := newClientConn(ctx, serverCfg)
5454
if err != nil {
5555
return err
5656
}
@@ -64,7 +64,7 @@ func runInit(cmd *cobra.Command, args []string) error {
6464
}
6565

6666
// Actually perform cluster initialization.
67-
c := serverpb.NewInitClient(conn)
67+
c := conn.NewInitClient()
6868
if _, err = c.Bootstrap(ctx, &serverpb.BootstrapRequest{
6969
InitType: typ,
7070
}); err != nil {

0 commit comments

Comments
 (0)