mirror of https://github.com/grpc/grpc-go.git
fix benchmark, interop and examples
This commit is contained in:
parent
996538ab4b
commit
100ca6a0da
|
@ -139,7 +139,7 @@ func DoStreamingRoundTrip(tc testpb.TestServiceClient, stream testpb.TestService
|
|||
|
||||
// NewClientConn creates a gRPC client connection to addr.
|
||||
func NewClientConn(addr string) *grpc.ClientConn {
|
||||
conn, err := grpc.Dial(addr)
|
||||
conn, err := grpc.Dial(addr, grpc.WithInsecure())
|
||||
if err != nil {
|
||||
grpclog.Fatalf("NewClientConn(%q) failed to create a ClientConn %v", addr, err)
|
||||
}
|
||||
|
|
|
@ -175,6 +175,8 @@ func main() {
|
|||
creds = credentials.NewClientTLSFromCert(nil, sn)
|
||||
}
|
||||
opts = append(opts, grpc.WithTransportCredentials(creds))
|
||||
} else {
|
||||
opts = append(opts, grpc.WithInsecure())
|
||||
}
|
||||
conn, err := grpc.Dial(*serverAddr, opts...)
|
||||
if err != nil {
|
||||
|
|
|
@ -522,6 +522,8 @@ func main() {
|
|||
} else if *testCase == "oauth2_auth_token" {
|
||||
opts = append(opts, grpc.WithPerRPCCredentials(oauth.NewOauthAccess(getToken())))
|
||||
}
|
||||
} else {
|
||||
opts = append(opts, grpc.WithInsecure())
|
||||
}
|
||||
conn, err := grpc.Dial(serverAddr, opts...)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue