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

Function setConfigKey

balancer/weightedtarget/weightedtarget_test.go:123–126  ·  view source on GitHub ↗
(addr resolver.Address, config string)

Source from the content-addressed store, hash-verified

121type configKey struct{}
122
123func setConfigKey(addr resolver.Address, config string) resolver.Address {
124 addr.Attributes = addr.Attributes.WithValue(configKey{}, config)
125 return addr
126}
127
128func getConfigKey(attr *attributes.Attributes) (string, bool) {
129 v := attr.Value(configKey{})

Callers 2

UpdateClientConnStateMethod · 0.85
TestWeightedTargetMethod · 0.85

Calls 1

WithValueMethod · 0.80

Tested by

no test coverage detected