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

Method ensureRecords

produce_request.go:286–294  ·  view source on GitHub ↗
(topic string, partition int32)

Source from the content-addressed store, hash-verified

284}
285
286func (r *ProduceRequest) ensureRecords(topic string, partition int32) {
287 if r.records == nil {
288 r.records = make(map[string]map[int32]Records)
289 }
290
291 if r.records[topic] == nil {
292 r.records[topic] = make(map[int32]Records)
293 }
294}
295
296func (r *ProduceRequest) AddMessage(topic string, partition int32, msg *Message) {
297 r.ensureRecords(topic, partition)

Callers 3

AddMessageMethod · 0.95
AddSetMethod · 0.95
AddBatchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected