Skip to content

Commit

Permalink
Add new 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 15, 2019
1 parent 7c8e603 commit 0467a85
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion resolver/resolver.go
Original file line number Diff line number Diff line change
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,22 @@ 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
// CredsBundle is the credentials bundle that a resolver implementation can
// use while dialing a remote name resolution server. If both DialCreds and
// CredsBundle are set, the former takes precedence.
CredsBundle credentials.Bundle
// 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 0467a85

Please sign in to comment.