Skip to content

Commit

Permalink
Add a couple of fields to resolver.BuildOption struct.
Browse files Browse the repository at this point in the history
These fields will be used by resolver implementations which need to talk
to a remote name resolver.
  • Loading branch information
easwars committed Oct 14, 2019
1 parent 0859afa commit 657e8f9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion resolver/resolver.go
Expand Up @@ -21,6 +21,10 @@
package resolver

import (
"context"
"net"

"google.golang.org/grpc/credentials"
"google.golang.org/grpc/serviceconfig"
)

Expand Down Expand Up @@ -105,8 +109,18 @@ type Address struct {
// BuildOption includes additional information for the builder to create
// the resolver.
type BuildOption struct {
// DisableServiceConfig indicates whether resolver should fetch service config data.
// DisableServiceConfig indicates whether a resolver implementation should
// fetch service config data.
DisableServiceConfig bool
// DialCreds is the transport credentials that a resolver implementation
// can use to dial a remote name resolution server. Resolver
// implementations which do not need to talk to another party securely can
// safely ignore this field.
DialCreds credentials.TransportCredentials
// Dialer is the custom dialer that a resolver implementation can use to
// dial a remote name resolution server. Resolver implementations which do
// not need to talk to another party securely can safely ignore this field.
Dialer func(context.Context, string) (net.Conn, error)
}

// State contains the current Resolver state relevant to the ClientConn.
Expand Down

0 comments on commit 657e8f9

Please sign in to comment.