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

Method encode

update_features_response.go:60–80  ·  view source on GitHub ↗
(pe packetEncoder)

Source from the content-addressed store, hash-verified

58}
59
60func (r *UpdateFeaturesResponse) encode(pe packetEncoder) error {
61 pe.putDurationMs(r.ThrottleTime)
62
63 pe.putKError(r.ErrorCode)
64
65 if err := pe.putNullableString(r.ErrorMessage); err != nil {
66 return err
67 }
68
69 if err := pe.putArrayLength(len(r.Results)); err != nil {
70 return err
71 }
72 for i := range r.Results {
73 if err := r.Results[i].encode(pe); err != nil {
74 return err
75 }
76 }
77
78 pe.putEmptyTaggedFieldArray()
79 return nil
80}
81
82func (r *UpdateFeaturesResponse) decode(pd packetDecoder, version int16) (err error) {
83 if r.ThrottleTime, err = pd.getDurationMs(); err != nil {

Callers

nothing calls this directly

Calls 6

putDurationMsMethod · 0.65
putKErrorMethod · 0.65
putNullableStringMethod · 0.65
putArrayLengthMethod · 0.65
encodeMethod · 0.65

Tested by

no test coverage detected