Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextPublisher ¶
type Options ¶
type Options struct {
Publisher message.Publisher
TopicMapping TopicMapping
Logger *slog.Logger
MarshalerTransformFunc marshaler.TransformFunc
}
type Publisher ¶
type Publisher interface {
// Publish publishes an event to the event bus
Publish(ctx context.Context, event marshaler.Event) error
// WithContext is a convinience method to publish from the router. Usually if we need
// to publish from the router, a function returns a marshaler.Event and an error. Using this
// method we can inline the publish call and avoid the need to check for errors:
//
// return p.WithContext(ctx).PublishIfNoError(worker.handleEvent(ctx, event))
WithContext(ctx context.Context) ContextPublisher
Marshaler() marshaler.Marshaler
}
type TopicMapping ¶
func (TopicMapping) Validate ¶
func (t TopicMapping) Validate() error
Click to show internal directories.
Click to hide internal directories.