leave_group_response.go 614 B

123456789101112131415161718192021222324252627282930313233343536
  1. package sarama
  2. type LeaveGroupResponse struct {
  3. Err KError
  4. }
  5. func (r *LeaveGroupResponse) encode(pe packetEncoder) error {
  6. pe.putInt16(int16(r.Err))
  7. return nil
  8. }
  9. func (r *LeaveGroupResponse) decode(pd packetDecoder, version int16) (err error) {
  10. kerr, err := pd.getInt16()
  11. if err != nil {
  12. return err
  13. }
  14. r.Err = KError(kerr)
  15. return nil
  16. }
  17. func (r *LeaveGroupResponse) key() int16 {
  18. return 13
  19. }
  20. func (r *LeaveGroupResponse) version() int16 {
  21. return 0
  22. }
  23. func (r *LeaveGroupResponse) headerVersion() int16 {
  24. return 0
  25. }
  26. func (r *LeaveGroupResponse) requiredVersion() KafkaVersion {
  27. return V0_9_0_0
  28. }