Skip to content

Commit 09a90b0

Browse files
committed
update
1 parent 92f1e4d commit 09a90b0

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

vsctl/command/eventbus.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func createEventbusCommand() *cobra.Command {
5151
cmdFailedf(cmd, "the --name flag MUST be set")
5252
}
5353
ctx := context.Background()
54-
grpcConn := mustGatewayProxyGRPCConn(ctx, cmd)
54+
grpcConn := mustGetControllerProxyConn(ctx, cmd)
5555
defer func() {
5656
_ = grpcConn.Close()
5757
}()
@@ -92,7 +92,7 @@ func deleteEventbusCommand() *cobra.Command {
9292
cmdFailedf(cmd, "the --name flag MUST be set")
9393
}
9494
ctx := context.Background()
95-
grpcConn := mustGatewayProxyGRPCConn(ctx, cmd)
95+
grpcConn := mustGetControllerProxyConn(ctx, cmd)
9696
defer func() {
9797
_ = grpcConn.Close()
9898
}()
@@ -137,7 +137,7 @@ func getEventbusInfoCommand() *cobra.Command {
137137
buses = strings.Split(eventbus, ",")
138138
}
139139
ctx := context.Background()
140-
grpcConn := mustGatewayProxyGRPCConn(ctx, cmd)
140+
grpcConn := mustGetControllerProxyConn(ctx, cmd)
141141
defer func() {
142142
_ = grpcConn.Close()
143143
}()
@@ -306,7 +306,7 @@ func listEventbusInfoCommand() *cobra.Command {
306306
Short: "list the eventbus",
307307
Run: func(cmd *cobra.Command, args []string) {
308308
ctx := context.Background()
309-
grpcConn := mustGatewayProxyGRPCConn(ctx, cmd)
309+
grpcConn := mustGetControllerProxyConn(ctx, cmd)
310310
defer func() {
311311
_ = grpcConn.Close()
312312
}()

vsctl/command/grpc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"google.golang.org/grpc/credentials/insecure"
2828
)
2929

30-
func mustGatewayProxyGRPCConn(ctx context.Context, cmd *cobra.Command) *grpc.ClientConn {
30+
func mustGetControllerProxyConn(ctx context.Context, cmd *cobra.Command) *grpc.ClientConn {
3131
splits := strings.Split(mustGetGatewayEndpoint(cmd), ":")
3232
port, err := strconv.Atoi(splits[1])
3333
if err != nil {

vsctl/command/meta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func getControllerTopology() *cobra.Command {
4949
Short: "get topology",
5050
Run: func(cmd *cobra.Command, args []string) {
5151
ctx := context.Background()
52-
grpcConn := mustGatewayProxyGRPCConn(ctx, cmd)
52+
grpcConn := mustGetControllerProxyConn(ctx, cmd)
5353
defer func() {
5454
_ = grpcConn.Close()
5555
}()

vsctl/command/subscription.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func createSubscriptionCommand() *cobra.Command {
5252
cmdFailedWithHelpNotice(cmd, "sink name can't be empty\n")
5353
}
5454
ctx := context.Background()
55-
grpcConn := mustGatewayProxyGRPCConn(ctx, cmd)
55+
grpcConn := mustGetControllerProxyConn(ctx, cmd)
5656
defer func() {
5757
_ = grpcConn.Close()
5858
}()
@@ -126,7 +126,7 @@ func deleteSubscriptionCommand() *cobra.Command {
126126
cmdFailedWithHelpNotice(cmd, "subscriptionID name can't be empty\n")
127127
}
128128
ctx := context.Background()
129-
grpcConn := mustGatewayProxyGRPCConn(ctx, cmd)
129+
grpcConn := mustGetControllerProxyConn(ctx, cmd)
130130
defer func() {
131131
_ = grpcConn.Close()
132132
}()
@@ -168,7 +168,7 @@ func getSubscriptionCommand() *cobra.Command {
168168
cmdFailedWithHelpNotice(cmd, "subscriptionID name can't be empty\n")
169169
}
170170
ctx := context.Background()
171-
grpcConn := mustGatewayProxyGRPCConn(ctx, cmd)
171+
grpcConn := mustGetControllerProxyConn(ctx, cmd)
172172
defer func() {
173173
_ = grpcConn.Close()
174174
}()
@@ -212,7 +212,7 @@ func listSubscriptionCommand() *cobra.Command {
212212
Short: "list the subscription ",
213213
Run: func(cmd *cobra.Command, args []string) {
214214
ctx := context.Background()
215-
grpcConn := mustGatewayProxyGRPCConn(ctx, cmd)
215+
grpcConn := mustGetControllerProxyConn(ctx, cmd)
216216
defer func() {
217217
_ = grpcConn.Close()
218218
}()

0 commit comments

Comments
 (0)