William Kurkian | ea86948 | 2019-04-09 15:16:11 -0400 | [diff] [blame] | 1 | package sarama |
| 2 | |
| 3 | type LeaveGroupResponse struct { |
| 4 | Err KError |
| 5 | } |
| 6 | |
| 7 | func (r *LeaveGroupResponse) encode(pe packetEncoder) error { |
| 8 | pe.putInt16(int16(r.Err)) |
| 9 | return nil |
| 10 | } |
| 11 | |
| 12 | func (r *LeaveGroupResponse) decode(pd packetDecoder, version int16) (err error) { |
| 13 | kerr, err := pd.getInt16() |
| 14 | if err != nil { |
| 15 | return err |
| 16 | } |
| 17 | r.Err = KError(kerr) |
| 18 | |
| 19 | return nil |
| 20 | } |
| 21 | |
| 22 | func (r *LeaveGroupResponse) key() int16 { |
| 23 | return 13 |
| 24 | } |
| 25 | |
| 26 | func (r *LeaveGroupResponse) version() int16 { |
| 27 | return 0 |
| 28 | } |
| 29 | |
khenaidoo | 106c61a | 2021-08-11 18:05:46 -0400 | [diff] [blame^] | 30 | func (r *LeaveGroupResponse) headerVersion() int16 { |
| 31 | return 0 |
| 32 | } |
| 33 | |
William Kurkian | ea86948 | 2019-04-09 15:16:11 -0400 | [diff] [blame] | 34 | func (r *LeaveGroupResponse) requiredVersion() KafkaVersion { |
| 35 | return V0_9_0_0 |
| 36 | } |