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

Function setTestAttrAddr

balancer/ringhash/ringhash_test.go:686–689  ·  view source on GitHub ↗
(addr resolver.Address, content string)

Source from the content-addressed store, hash-verified

684}
685
686func setTestAttrAddr(addr resolver.Address, content string) resolver.Address {
687 addr.BalancerAttributes = addr.BalancerAttributes.WithValue(testKey, testAttribute{content})
688 return addr
689}
690
691func setTestAttrEndpoint(endpoint resolver.Endpoint, content string) resolver.Endpoint {
692 endpoint.Attributes = endpoint.Attributes.WithValue(testKey, testAttribute{content})

Callers 1

Calls 1

WithValueMethod · 0.80

Tested by

no test coverage detected