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

Method isOverflow

records.go:165–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163}
164
165func (r *Records) isOverflow() (bool, error) {
166 if r.recordsType == unknownRecords {
167 if empty, err := r.setTypeFromFields(); err != nil || empty {
168 return false, err
169 }
170 }
171
172 switch r.recordsType {
173 case unknownRecords:
174 return false, nil
175 case legacyRecords:
176 if r.MsgSet == nil {
177 return false, nil
178 }
179 return r.MsgSet.OverflowMessage, nil
180 case defaultRecords:
181 return false, nil
182 }
183 return false, fmt.Errorf("unknown records type: %v", r.recordsType)
184}
185
186// partialSize reports the total on-wire size required to fetch the partial
187// trailing batch fully. Returns 0 when not partial or when the size is unknown

Callers 2

decodeMethod · 0.95

Calls 2

setTypeFromFieldsMethod · 0.95
ErrorfMethod · 0.65

Tested by 1