From 94f1917696488c633b485fe76feb764c935f2561 Mon Sep 17 00:00:00 2001 From: Menghan Li Date: Fri, 20 Oct 2017 12:03:44 -0700 Subject: [PATCH] Make passthrouth resolver the default instead of dns (#1606) --- clientconn.go | 3 ++- resolver/passthrough/passthrough.go | 3 +-- resolver/resolver.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clientconn.go b/clientconn.go index 91e4b7da315a..3269de08a2d9 100644 --- a/clientconn.go +++ b/clientconn.go @@ -37,7 +37,8 @@ import ( "google.golang.org/grpc/grpclog" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/resolver" - _ "google.golang.org/grpc/resolver/dns" // To register dns resolver. + _ "google.golang.org/grpc/resolver/dns" // To register dns resolver. + _ "google.golang.org/grpc/resolver/passthrough" // To register passthrough resolver. "google.golang.org/grpc/stats" "google.golang.org/grpc/transport" ) diff --git a/resolver/passthrough/passthrough.go b/resolver/passthrough/passthrough.go index 4d4420aa4168..b76010d74d14 100644 --- a/resolver/passthrough/passthrough.go +++ b/resolver/passthrough/passthrough.go @@ -17,8 +17,7 @@ */ // Package passthrough implements a pass-through resolver. It sends the target -// name without scheme back to gRPC as resolved address. It's for gRPC internal -// test only. +// name without scheme back to gRPC as resolved address. package passthrough import "google.golang.org/grpc/resolver" diff --git a/resolver/resolver.go b/resolver/resolver.go index 6e822b56bef6..0dd887fa5436 100644 --- a/resolver/resolver.go +++ b/resolver/resolver.go @@ -24,7 +24,7 @@ var ( // m is a map from scheme to resolver builder. m = make(map[string]Builder) // defaultScheme is the default scheme to use. - defaultScheme = "dns" + defaultScheme = "passthrough" ) // TODO(bar) install dns resolver in init(){}.