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

Method safelyApplyInterceptor

interceptors.go:25–33  ·  view source on GitHub ↗
(interceptor ProducerInterceptor)

Source from the content-addressed store, hash-verified

23}
24
25func (msg *ProducerMessage) safelyApplyInterceptor(interceptor ProducerInterceptor) {
26 defer func() {
27 if r := recover(); r != nil {
28 Logger.Printf("Error when calling producer interceptor: %v, %v", interceptor, r)
29 }
30 }()
31
32 interceptor.OnSend(msg)
33}
34
35func (msg *ConsumerMessage) safelyApplyInterceptor(interceptor ConsumerInterceptor) {
36 defer func() {

Callers 2

interceptorsMethod · 0.45
dispatcherMethod · 0.45

Calls 2

PrintfMethod · 0.65
OnSendMethod · 0.65

Tested by

no test coverage detected