Invoke performs a unary RPC. If the addrConn is not ready, returns errSubConnNotReady.
(ctx context.Context, method string, args any, reply any, opts ...CallOption)
| 370 | // Invoke performs a unary RPC. If the addrConn is not ready, returns |
| 371 | // errSubConnNotReady. |
| 372 | func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args any, reply any, opts ...CallOption) error { |
| 373 | cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...) |
| 374 | if err != nil { |
| 375 | return err |
| 376 | } |
| 377 | if err := cs.SendMsg(args); err != nil { |
| 378 | return err |
| 379 | } |
| 380 | return cs.RecvMsg(reply) |
| 381 | } |
| 382 | |
| 383 | type refCountedProducer struct { |
| 384 | producer balancer.Producer |