技能 编程开发 事件发布与领域事件抽象

事件发布与领域事件抽象

v20260825
webiny-api-event-publisher-catalog
本模块提供了实现事件驱动架构(EDA)的核心抽象。它定义了所有业务领域事件的基类 `DomainEvent`,以及负责将事件发布给注册处理器的 `EventPublisher`。使用这些组件可以有效实现服务间的解耦,构建健壮的事件响应式应用。
获取技能
286 次下载
概览

api/event-publisher

How to Use

  1. Find the abstraction you need below
  2. You MUST read the source file to get the exact interface and types!
  3. Import: import { Name } from "<importPath>";
  4. See webiny-use-case-pattern or webiny-event-handler-pattern skills for implementation patterns

Abstractions


Name: DomainEvent
Import: import { DomainEvent } from "webiny/api/event-publisher"
Source: @webiny/api-core/features/eventPublisher/index.ts
Description: Base class for all domain events.


Name: EventPublisher
Import: import { EventPublisher } from "webiny/api/event-publisher"
Source: @webiny/api-core/features/eventPublisher/index.ts
Description: Publish domain events to registered handlers.


信息
分类 编程开发
名称 webiny-api-event-publisher-catalog
版本 v20260825
大小 879B
更新时间 2026-09-06
语言