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

Method writeRequest

conn.go:1287–1293  ·  view source on GitHub ↗
(apiKey apiKey, apiVersion apiVersion, correlationID int32, req request)

Source from the content-addressed store, hash-verified

1285}
1286
1287func (c *Conn) writeRequest(apiKey apiKey, apiVersion apiVersion, correlationID int32, req request) error {
1288 hdr := c.requestHeader(apiKey, apiVersion, correlationID)
1289 hdr.Size = (hdr.size() + req.size()) - 4
1290 hdr.writeTo(&c.wb)
1291 req.writeTo(&c.wb)
1292 return c.wbuf.Flush()
1293}
1294
1295func (c *Conn) readResponse(size int, res interface{}) error {
1296 size, err := read(&c.rbuf, size, res)

Callers 15

ControllerMethod · 0.95
BrokersMethod · 0.95
findCoordinatorMethod · 0.95
heartbeatMethod · 0.95
joinGroupMethod · 0.95
leaveGroupMethod · 0.95
listGroupsMethod · 0.95
offsetCommitMethod · 0.95
offsetFetchMethod · 0.95
syncGroupMethod · 0.95
ReadPartitionsMethod · 0.95
saslHandshakeMethod · 0.95

Calls 4

requestHeaderMethod · 0.95
sizeMethod · 0.65
writeToMethod · 0.65
FlushMethod · 0.45

Tested by

no test coverage detected