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

Method OnSend

helpers_test.go:72–79  ·  view source on GitHub ↗
(msg *ProducerMessage)

Source from the content-addressed store, hash-verified

70}
71
72func (b *appendInterceptor) OnSend(msg *ProducerMessage) {
73 if b.i < 0 {
74 panic("hey, the interceptor has failed")
75 }
76 v, _ := msg.Value.Encode()
77 msg.Value = StringEncoder(string(v) + strconv.Itoa(b.i))
78 b.i++
79}
80
81func (b *appendInterceptor) OnConsume(msg *ConsumerMessage) {
82 if b.i < 0 {

Callers

nothing calls this directly

Calls 2

StringEncoderTypeAlias · 0.85
EncodeMethod · 0.65

Tested by

no test coverage detected