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

Method encode

api_versions_response.go:19–32  ·  view source on GitHub ↗
(pe packetEncoder, version int16)

Source from the content-addressed store, hash-verified

17}
18
19func (a *ApiVersionsResponseKey) encode(pe packetEncoder, version int16) (err error) {
20 a.Version = version
21 pe.putInt16(a.ApiKey)
22
23 pe.putInt16(a.MinVersion)
24
25 pe.putInt16(a.MaxVersion)
26
27 if version >= 3 {
28 pe.putEmptyTaggedFieldArray()
29 }
30
31 return nil
32}
33
34func (a *ApiVersionsResponseKey) decode(pd packetDecoder, version int16) (err error) {
35 a.Version = version

Callers

nothing calls this directly

Calls 2

putInt16Method · 0.65

Tested by

no test coverage detected