MCPcopy
hub / github.com/grpc/grpc-go / WithResolvers

Function WithResolvers

dialoptions.go:765–769  ·  view source on GitHub ↗

WithResolvers allows a list of resolver implementations to be registered locally with the ClientConn without needing to be globally registered via resolver.Register. They will be matched against the scheme used for the current Dial only, and will take precedence over the global registry. # Experim

(rs ...resolver.Builder)

Source from the content-addressed store, hash-verified

763// Notice: This API is EXPERIMENTAL and may be changed or removed in a
764// later release.
765func WithResolvers(rs ...resolver.Builder) DialOption {
766 return newFuncDialOption(func(o *dialOptions) {
767 o.resolvers = append(o.resolvers, rs...)
768 })
769}
770
771// WithIdleTimeout returns a DialOption that configures an idle timeout for the
772// channel. If the channel is idle for the configured timeout, i.e there are no

Calls 1

newFuncDialOptionFunction · 0.85