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

Method GetOrBuildProducer

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

GetOrBuildProducer returns a reference to the existing Producer for this ProducerBuilder in this SubConn, or, if one does not currently exist, creates a new one and returns it. Returns a close function which may be called when the Producer is no longer needed. Otherwise the producer will automatic

(ProducerBuilder)

Source from the content-addressed store, hash-verified

70 // Should only be called on a SubConn in state Ready. Otherwise the
71 // producer will be unable to create streams.
72 GetOrBuildProducer(ProducerBuilder) (p Producer, close func())
73 // Shutdown shuts down the SubConn gracefully. Any started RPCs will be
74 // allowed to complete. No future calls should be made on the SubConn.
75 // One final state update will be delivered to the StateListener (or

Implementers 3

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

Calls

no outgoing calls

Tested by 1