(pe packetEncoder, version int16)
| 10 | } |
| 11 | |
| 12 | func (b *offsetRequestBlock) encode(pe packetEncoder, version int16) error { |
| 13 | if version >= 4 { |
| 14 | pe.putInt32(b.currentLeaderEpoch) |
| 15 | } |
| 16 | |
| 17 | pe.putInt64(b.timestamp) |
| 18 | |
| 19 | if version == 0 { |
| 20 | pe.putInt32(b.maxNumOffsets) |
| 21 | } |
| 22 | |
| 23 | pe.putEmptyTaggedFieldArray() |
| 24 | |
| 25 | return nil |
| 26 | } |
| 27 | |
| 28 | func (b *offsetRequestBlock) decode(pd packetDecoder, version int16) (err error) { |
| 29 | b.currentLeaderEpoch = -1 |
nothing calls this directly
no test coverage detected