MCPcopy
hub / github.com/IBM/sarama / prepareFlexibleDecoder

Function prepareFlexibleDecoder

encoder_decoder.go:118–123  ·  view source on GitHub ↗
(pd *realDecoder, in versionedDecoder, version int16)

Source from the content-addressed store, hash-verified

116}
117
118func prepareFlexibleDecoder(pd *realDecoder, in versionedDecoder, version int16) packetDecoder {
119 if flexibleDecoder, ok := in.(flexibleVersion); ok && flexibleDecoder.isFlexibleVersion(version) {
120 return &realFlexibleDecoder{pd}
121 }
122 return pd
123}
124
125func prepareFlexibleEncoder(pe packetEncoder, req encoder) packetEncoder {
126 if flexibleEncoder, ok := req.(flexibleVersion); ok && flexibleEncoder.isFlexible() {

Callers 2

versionedDecodeFunction · 0.85
decodeMethod · 0.85

Calls 1

isFlexibleVersionMethod · 0.65

Tested by

no test coverage detected