Documentation ¶
Index ¶
Constants ¶
View Source
const (
Name = "discovery"
)
Variables ¶
This section is empty.
Functions ¶
func NewResolverBuilderEtcd ¶
func NewResolverBuilderEtcd(discoverer register.IDiscovery) resolver.Builder
Types ¶
type ResolverBuilderEtcd ¶
type ResolverBuilderEtcd struct {
// contains filtered or unexported fields
}
func (*ResolverBuilderEtcd) Build ¶
func (b *ResolverBuilderEtcd) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
Build 做一些解析,解析 ETCD 的地址,从 ETCD 解析到 gRPC 的地址,用 cc.UpdateState 更新 gRPC 地址, 执行 grpc.dial 的时候调用 参见源码: grpc-go clientconn.go DialContext ( rWrapper, err := newCCResolverWrapper(cc, resolverBuilder) )
Click to show internal directories.
Click to hide internal directories.