request.go 288 B

123456789101112131415
  1. package kafka
  2. type request struct {
  3. correlation_id int32
  4. id *string
  5. body apiEncoder
  6. }
  7. func (r *request) encode(pe packetEncoder) {
  8. pe.putInt16(r.body.key())
  9. pe.putInt16(r.body.version())
  10. pe.putInt32(r.correlation_id)
  11. pe.putString(r.id)
  12. r.body.encode(pe)
  13. }