技能 编程开发 API事件发布器抽象层

API事件发布器抽象层

v20260424
webiny-api-event-publisher-catalog
本模块提供了事件驱动架构的核心抽象层。它定义了所有业务域事件的基类 `DomainEvent`,并提供了 `EventPublisher` 工具,用于将域事件发布给已注册的处理器。这有助于实现API服务的解耦、可扩展和模块化开发。
获取技能
108 次下载
概览

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.


信息
Category 编程开发
Name webiny-api-event-publisher-catalog
版本 v20260424
大小 899B
更新时间 2026-04-28
语言