RoundTrip sends a request to a kafka cluster and returns the response, or an error if no responses were received. Message types are available in sub-packages of the protocol package. Each kafka API is implemented in a different sub-package. For example, the request and response types for the Fetch
(ctx context.Context, addr net.Addr, req Request)
| 176 | // features of the kafka protocol, but also provide a more efficient way of |
| 177 | // managing connections to kafka brokers. |
| 178 | func (t *Transport) RoundTrip(ctx context.Context, addr net.Addr, req Request) (Response, error) { |
| 179 | p := t.grabPool(addr) |
| 180 | defer p.unref() |
| 181 | return p.roundTrip(ctx, req) |
| 182 | } |
| 183 | |
| 184 | func (t *Transport) dial() func(context.Context, string, string) (net.Conn, error) { |
| 185 | if t.Dial != nil { |