From 2b993cd47924a1e0bf8b6e6d686fab746a9b7335 Mon Sep 17 00:00:00 2001 From: iamqizhao Date: Wed, 25 Feb 2015 22:57:07 -0800 Subject: [PATCH] rename the convenience function to set TLS creds --- clientconn.go | 6 +++--- examples/route_guide/client/client.go | 2 +- grpc-auth-support.md | 2 +- interop/client/client.go | 2 +- test/end2end_test.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clientconn.go b/clientconn.go index b67a59bc..d6f1042a 100644 --- a/clientconn.go +++ b/clientconn.go @@ -61,9 +61,9 @@ type dialOptions struct { // credentials. type DialOption func(*dialOptions) -// WithClientTLS returns a DialOption which configures a TLS credentials -// for connection. -func WithClientTLS(creds credentials.TransportAuthenticator) DialOption { +// WithTransportCredentials returns a DialOption which configures a +// connection level security credentials (e.g., TLS/SSL). +func WithTransportCredentials(creds credentials.TransportAuthenticator) DialOption { return func(o *dialOptions) { o.authOptions = append(o.authOptions, creds) } diff --git a/examples/route_guide/client/client.go b/examples/route_guide/client/client.go index abd93f7b..af846ecd 100644 --- a/examples/route_guide/client/client.go +++ b/examples/route_guide/client/client.go @@ -175,7 +175,7 @@ func main() { } else { creds = credentials.NewClientTLSFromCert(nil, sn) } - opts = append(opts, grpc.WithClientTLS(creds)) + opts = append(opts, grpc.WithTransportCredentials(creds)) } conn, err := grpc.Dial(*serverAddr, opts...) if err != nil { diff --git a/grpc-auth-support.md b/grpc-auth-support.md index 4bca3754..e4c36778 100644 --- a/grpc-auth-support.md +++ b/grpc-auth-support.md @@ -5,7 +5,7 @@ As outlined