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

Function encodeKV

fetch_response.go:618–629  ·  view source on GitHub ↗
(key, value Encoder)

Source from the content-addressed store, hash-verified

616}
617
618func encodeKV(key, value Encoder) ([]byte, []byte) {
619 var kb []byte
620 var vb []byte
621 if key != nil {
622 kb, _ = key.Encode()
623 }
624 if value != nil {
625 vb, _ = value.Encode()
626 }
627
628 return kb, vb
629}
630
631func (r *FetchResponse) AddMessageWithTimestamp(topic string, partition int32, key, value Encoder, offset int64, timestamp time.Time, version int8) {
632 frb := r.getOrCreateBlock(topic, partition)

Callers 3

Calls 1

EncodeMethod · 0.65

Tested by

no test coverage detected