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

Function Get

balancer/balancer.go:84–96  ·  view source on GitHub ↗

Get returns the resolver builder registered with the given name. Note that the compare is done in a case-sensitive fashion. If no builder is register with the name, nil will be returned.

(name string)

Source from the content-addressed store, hash-verified

82// Note that the compare is done in a case-sensitive fashion.
83// If no builder is register with the name, nil will be returned.
84func Get(name string) Builder {
85 if !envconfig.CaseSensitiveBalancerRegistries {
86 lowerName := strings.ToLower(name)
87 if lowerName != name {
88 logger.Warningf("Balancer retrieved for name %q. grpc-go has switched to case sensitive balancer registries. GRPC_GO_EXPERIMENTAL_CASE_SENSITIVE_BALANCER_REGISTRIES env variable will be removed in release v1.82.0", name)
89 }
90 name = lowerName
91 }
92 if b, ok := m[name]; ok {
93 return b
94 }
95 return nil
96}
97
98// NewSubConnOptions contains options to create new SubConn.
99type NewSubConnOptions struct {

Callers 15

BuildMethod · 0.92
parseServiceConfigFunction · 0.92
BuildMethod · 0.92
BuildMethod · 0.92
BuildMethod · 0.92
BuildMethod · 0.92
TestUpdateStatePausesMethod · 0.92
parseChildPolicyConfigsFunction · 0.92
BuildMethod · 0.92

Calls 1

WarningfMethod · 0.65

Tested by 15

BuildMethod · 0.74
BuildMethod · 0.74
TestUpdateStatePausesMethod · 0.74
initFunction · 0.74
TestExitIdleMethod · 0.74
TestPickerMethod · 0.74