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

Method UpdateAddresses

balancer/subconn.go:62–62  ·  view source on GitHub ↗

UpdateAddresses updates the addresses used in this SubConn. gRPC checks if currently-connected address is still in the new list. If it's in the list, the connection will be kept. If it's not in the list, the connection will gracefully close, and a new connection will be created. This will trigger a

([]resolver.Address)

Source from the content-addressed store, hash-verified

60 // Deprecated: this method will be removed. Create new SubConns for new
61 // addresses instead.
62 UpdateAddresses([]resolver.Address)
63 // Connect starts the connecting for this SubConn.
64 Connect()
65 // GetOrBuildProducer returns a reference to the existing Producer for this

Callers 7

UpdateAddressesMethod · 0.65
refreshSubConnsMethod · 0.65
TestSubConnEmptyMethod · 0.65
UpdateAddressesMethod · 0.65
updateAddressesMethod · 0.65
updateAddressesMethod · 0.65

Implementers 3

acBalancerWrapperbalancer_wrapper.go
testSubConnbalancer/base/balancer_test.go
TestSubConninternal/testutils/balancer.go

Calls

no outgoing calls

Tested by 4

TestSubConnEmptyMethod · 0.52
updateAddressesMethod · 0.52
updateAddressesMethod · 0.52