messaging

package
v0.0.0-...-4fb02c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemoryEventBus

func NewInMemoryEventBus() eventx.EventBus

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 用于订阅事件处理器

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL