MCPcopy
hub / github.com/segmentio/kafka-go / roundTrip

Method roundTrip

transport.go:1273–1283  ·  view source on GitHub ↗
(ctx context.Context, pc *protocol.Conn, req Request)

Source from the content-addressed store, hash-verified

1271}
1272
1273func (c *conn) roundTrip(ctx context.Context, pc *protocol.Conn, req Request) (Response, error) {
1274 pprof.SetGoroutineLabels(ctx)
1275 defer pprof.SetGoroutineLabels(context.Background())
1276
1277 if deadline, hasDeadline := ctx.Deadline(); hasDeadline {
1278 pc.SetDeadline(deadline)
1279 defer pc.SetDeadline(time.Time{})
1280 }
1281
1282 return pc.RoundTrip(req)
1283}
1284
1285// authenticateSASL performs all of the required requests to authenticate this
1286// connection. If any step fails, this function returns with an error. A nil

Callers 2

runMethod · 0.95
RoundTripMethod · 0.45

Calls 3

DeadlineMethod · 0.80
RoundTripMethod · 0.65
SetDeadlineMethod · 0.45

Tested by

no test coverage detected