Skip to content

Commit 43ae3bf

Browse files
Merge pull request #1252 from michael-berlin/change_default_protocols
Change client protocols from BSON RPC to gRPC.
2 parents 597503d + cf87989 commit 43ae3bf

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

examples/kubernetes/vtctld-controller-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
-log_dir $VTDATAROOT/tmp
4141
-alsologtostderr
4242
-port 15000
43-
-service_map 'bsonrpc-vt-vtctl'
43+
-service_map 'grpc-vtctl'
4444
-topo_implementation etcd
4545
-tablet_protocol grpc
4646
-tablet_manager_protocol grpc

examples/local/vtctld-up.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $VTROOT/bin/vtctld -debug -templates $VTTOP/go/cmd/vtctld/templates \
2222
-web_dir $VTTOP/web/vtctld \
2323
-tablet_protocol grpc \
2424
-tablet_manager_protocol grpc \
25-
-service_map 'bsonrpc-vt-vtctl' \
25+
-service_map 'grpc-vtctl' \
2626
-backup_storage_implementation file \
2727
-file_backup_storage_root $VTDATAROOT/backups \
2828
-log_dir $VTDATAROOT/tmp -port $port > $VTDATAROOT/tmp/vtctld.out 2>&1 &

go/vt/binlog/binlogplayer/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
This file contains the API and registration mechanism for binlog player client.
2323
*/
2424

25-
var binlogPlayerProtocol = flag.String("binlog_player_protocol", "gorpc", "the protocol to download binlogs from a vttablet")
25+
var binlogPlayerProtocol = flag.String("binlog_player_protocol", "grpc", "the protocol to download binlogs from a vttablet")
2626
var binlogPlayerConnTimeout = flag.Duration("binlog_player_conn_timeout", 5*time.Second, "binlog player connection timeout")
2727

2828
// ErrFunc is a return value for streaming events

go/vt/vtctl/vtctlclient/interface.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515
"golang.org/x/net/context"
1616
)
1717

18-
// VtctlClientProtocol specifices which RPC client implementation should be used.
19-
var VtctlClientProtocol = flag.String("vtctl_client_protocol", "gorpc", "the protocol to use to talk to the vtctl server")
18+
// vtctlClientProtocol specifices which RPC client implementation should be used.
19+
var vtctlClientProtocol = flag.String("vtctl_client_protocol", "grpc", "the protocol to use to talk to the vtctl server")
2020

2121
// ErrFunc is returned by streaming queries to get the error
2222
type ErrFunc func() error
@@ -58,9 +58,9 @@ func UnregisterFactoryForTest(name string) {
5858

5959
// New allows a user of the client library to get its implementation.
6060
func New(addr string, connectTimeout time.Duration) (VtctlClient, error) {
61-
factory, ok := factories[*VtctlClientProtocol]
61+
factory, ok := factories[*vtctlClientProtocol]
6262
if !ok {
63-
return nil, fmt.Errorf("unknown vtctl client protocol: %v", *VtctlClientProtocol)
63+
return nil, fmt.Errorf("unknown vtctl client protocol: %v", *vtctlClientProtocol)
6464
}
6565
return factory(addr, connectTimeout)
6666
}

go/vt/wrangler/testlib/vtctl_pipe.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package testlib
66

77
import (
8+
"flag"
89
"fmt"
910
"net"
1011
"testing"
@@ -24,7 +25,7 @@ import (
2425

2526
func init() {
2627
// make sure we use the right protocol
27-
*vtctlclient.VtctlClientProtocol = "grpc"
28+
flag.Set("vtctl_client_protocol", "grpc")
2829
}
2930

3031
// VtctlPipe is a vtctl server based on a topo server, and a client that

test/protocols_flavor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ProtocolsFlavor(object):
1212
"""Base class for protocols flavor."""
1313

1414
def binlog_player_protocol(self):
15-
"""Tdthe binlog player protocol between vttablets, in go."""
15+
"""The binlog player protocol between vttablets, in go."""
1616
raise NotImplementedError('Not implemented in the base class')
1717

1818
def binlog_player_python_protocol(self):

0 commit comments

Comments
 (0)