You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/rpcx/internal/resolver/resolver.go

31 lines
475 B
Go

package resolver
import "google.golang.org/grpc/resolver"
const (
DirectScheme = "direct"
DiscovScheme = "discov"
EndpointSep = ","
subsetSize = 32
)
var (
dirBuilder directBuilder
disBuilder discovBuilder
)
func RegisterResolver() {
resolver.Register(&dirBuilder)
resolver.Register(&disBuilder)
}
type nopResolver struct {
cc resolver.ClientConn
}
func (r *nopResolver) Close() {
}
func (r *nopResolver) ResolveNow(options resolver.ResolveNowOptions) {
}