Skip to content

Commit

Permalink
rework comments
Browse files Browse the repository at this point in the history
Signed-off-by: SammyOina <sammyoina@gmail.com>
  • Loading branch information
SammyOina committed May 11, 2023
1 parent d13905f commit f7bd264
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions consumers/tracing/consumers.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ type tracingMiddlewareBlock struct {
tracer opentracing.Tracer
}

// NewAsync creates a new traced consumers.Blocking service
// NewAsync creates a new traced consumers.AsyncConsumer service
func NewAsync(tracer opentracing.Tracer, consumerAsync consumers.AsyncConsumer) consumers.AsyncConsumer {
return &tracingMiddlewareAsync{
consumerAsync: consumerAsync,
tracer: tracer,
}
}

// NewBlocking creates a new traced consumers.Blocking service
// NewBlocking creates a new traced consumers.BlockingConsumer service
func NewBlocking(tracer opentracing.Tracer, consumerBlock consumers.BlockingConsumer) consumers.BlockingConsumer {
return &tracingMiddlewareBlock{
consumerBlock: consumerBlock,
tracer: tracer,
}
}

// ConsumeBlocking traces consume operations for each message.
// ConsumeBlocking traces consume operations for message/s consumed.
func (tm *tracingMiddlewareBlock) ConsumeBlocking(ctx context.Context, messages interface{}) error {
var span opentracing.Span
switch m := messages.(type) {
Expand All @@ -59,7 +59,7 @@ func (tm *tracingMiddlewareBlock) ConsumeBlocking(ctx context.Context, messages
return tm.consumerBlock.ConsumeBlocking(ctx, messages)
}

// ConsumeAsync traces consume operations for each message.
// ConsumeAsync traces consume operations for message/s consumed.
func (tm *tracingMiddlewareAsync) ConsumeAsync(ctx context.Context, messages interface{}) {
var span opentracing.Span
switch m := messages.(type) {
Expand Down

0 comments on commit f7bd264

Please sign in to comment.