fix benchmark, interop and examples

This commit is contained in:
iamqizhao 2015-08-27 17:32:57 -07:00
parent 996538ab4b
commit 100ca6a0da
3 changed files with 5 additions and 1 deletions

View File

@ -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)
}

View File

@ -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 {

View File

@ -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 {