Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Publish ¶
func Publish(ctx context.Context, event DomainEvent)
func ResetMediator ¶
func ResetMediator(m DomainEventMediator)
func Subscribe ¶
func Subscribe(t DomainEventType, sub DomainEventSubscriber)
Types ¶
type DomainEventMediator ¶
type DomainEventMediator interface { Publish(ctx context.Context, event DomainEvent) Subscribe(DomainEventType, DomainEventSubscriber) }
DomainEventMediator 领域事件调度者
type DomainEventSubscriber ¶
type DomainEventSubscriber interface {
Handle(ctx context.Context, event DomainEvent)
}
DomainEventSubscriber 领域事件订阅方
Click to show internal directories.
Click to hide internal directories.