Documentation ¶
Index ¶
- func NewNamedPublisherDecorator(name string, pub message.Publisher, options ...Option) message.Publisher
- func NewPublisherDecorator(pub message.Publisher, options ...Option) message.Publisher
- func Trace(options ...Option) message.HandlerMiddleware
- func TraceHandler(h message.HandlerFunc, options ...Option) message.HandlerFunc
- func TraceNoPublishHandler(h message.NoPublishHandlerFunc, options ...Option) message.NoPublishHandlerFunc
- type Option
- type PublisherDecorator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNamedPublisherDecorator ¶
func NewNamedPublisherDecorator(name string, pub message.Publisher, options ...Option) message.Publisher
NewNamedPublisherDecorator instantiates a PublisherDecorator with a provided name.
func NewPublisherDecorator ¶
NewPublisherDecorator instantiates a PublisherDecorator with a default name.
func Trace ¶
func Trace(options ...Option) message.HandlerMiddleware
Trace defines a middleware that will add tracing.
func TraceHandler ¶
func TraceHandler(h message.HandlerFunc, options ...Option) message.HandlerFunc
TraceHandler decorates a watermill HandlerFunc to add tracing when a message is received.
func TraceNoPublishHandler ¶
func TraceNoPublishHandler(h message.NoPublishHandlerFunc, options ...Option) message.NoPublishHandlerFunc
TraceNoPublishHandler decorates a watermill NoPublishHandlerFunc to add tracing when a message is received.
Types ¶
type Option ¶
type Option func(*config)
Option provides a convenience wrapper for simple options that can be represented as functions.
func WithSpanAttributes ¶
WithSpanAttributes includes the given attributes to the generated Spans.
type PublisherDecorator ¶
type PublisherDecorator struct {
// contains filtered or unexported fields
}
PublisherDecorator decorates a standard watermill publisher to add tracing capabilities.
func (*PublisherDecorator) Close ¶
func (p *PublisherDecorator) Close() error
Close implements the watermill Publisher interface.