grabClusterConn returns the connection to the kafka cluster that the pool is configured to connect to. The transport uses a shared `control` connection to the cluster for any requests that aren't supposed to be sent to specific brokers (e.g. Fetch or Produce requests). Requests intended to be route
(ctx context.Context)
| 665 | // In either cases, the requests are multiplexed so we can keep a minimal number |
| 666 | // of connections open (N+1, where N is the number of brokers in the cluster). |
| 667 | func (p *connPool) grabClusterConn(ctx context.Context) (*conn, error) { |
| 668 | return p.ctrl.grabConnOrConnect(ctx) |
| 669 | } |
| 670 | |
| 671 | func (p *connPool) sendRequest(ctx context.Context, req Request, state connPoolState) promise { |
| 672 | brokerID := int32(-1) |
no test coverage detected