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

Function Register

resolver/resolver.go:54–56  ·  view source on GitHub ↗

TODO(bar) install dns resolver in init(){}. Register registers the resolver builder to the resolver map. b.Scheme will be used as the scheme registered with this builder. The registry is case sensitive, and schemes should not contain any uppercase characters. NOTE: this function must only be called

(b Builder)

Source from the content-addressed store, hash-verified

52// an init() function), and is not thread-safe. If multiple Resolvers are
53// registered with the same name, the one registered last will take effect.
54func Register(b Builder) {
55 m[b.Scheme()] = b
56}
57
58// Get returns the resolver builder registered with the given scheme.
59//

Calls 1

SchemeMethod · 0.65