Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInMemoryEventBus ¶
NewInMemoryEventBus 创建一个新的基于内存的 EventBus 实例
Types ¶
type InMemoryEventBus ¶
type InMemoryEventBus struct {
// contains filtered or unexported fields
}
InMemoryEventBus 是一个基于内存的事件总线实现
func (*InMemoryEventBus) Publish ¶
func (bus *InMemoryEventBus) Publish(event eventx.DomainEvent) error
Publish 用于发布事件,通知所有订阅的处理器
func (*InMemoryEventBus) Subscribe ¶
func (bus *InMemoryEventBus) Subscribe(handler eventx.EventHandler) error
Subscribe 用于订阅事件处理器
Click to show internal directories.
Click to hide internal directories.