NewStream begins a streaming RPC on the addrConn. If the addrConn is not ready, blocks until it is or ctx expires. Returns an error when the context expires or the addrConn is shut down.
(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption)
| 359 | // ready, blocks until it is or ctx expires. Returns an error when the context |
| 360 | // expires or the addrConn is shut down. |
| 361 | func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { |
| 362 | transport := acbw.ac.getReadyTransport() |
| 363 | if transport == nil { |
| 364 | return nil, status.Errorf(codes.Unavailable, "SubConn state is not Ready") |
| 365 | |
| 366 | } |
| 367 | return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) |
| 368 | } |
| 369 | |
| 370 | // Invoke performs a unary RPC. If the addrConn is not ready, returns |
| 371 | // errSubConnNotReady. |
no test coverage detected