request.go 299 B

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