package watermark import ( "context" ) // EventBusPublisher implements biz.EventPublisher using Watermill EventBus. type EventBusPublisher struct { bus *CQRSBus } // NewEventBusPublisher creates a new EventBusPublisher from a CQRSBus. func NewEventBusPublisher(bus *CQRSBus) *EventBusPublisher { return &EventBusPublisher{bus: bus} } // Publish publishes a domain event via the Watermill EventBus. func (p *EventBusPublisher) Publish(ctx context.Context, event interface{}) error { return p.bus.EventBus.Publish(ctx, event) }