MCPcopy Create free account
hub / github.com/IBM/sarama / encode

Method encode

offset_request.go:12–26  ·  view source on GitHub ↗
(pe packetEncoder, version int16)

Source from the content-addressed store, hash-verified

10}
11
12func (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
28func (b *offsetRequestBlock) decode(pd packetDecoder, version int16) (err error) {
29 b.currentLeaderEpoch = -1

Callers

nothing calls this directly

Calls 3

putInt32Method · 0.65
putInt64Method · 0.65

Tested by

no test coverage detected