Firebase Eventarc。
函数
函数 | 说明 |
---|---|
getEventarc(应用) | 获取默认应用或指定应用的 Eventarc 服务。可调用 getEventarc() (不使用任何参数)来访问默认应用的 Eventarc 服务,或者以 getEventarc(app) 的形式调用 getEventarc() ,以访问与特定应用关联的 Eventarc 服务。 |
类
类 | 说明 |
---|---|
渠道 | Eventarc 渠道。 |
Eventarc | Eventarc 服务会绑定到提供的应用。 |
接口
接口 | 说明 |
---|---|
ChannelOptions | 频道选项界面。 |
CloudEvent | CloudEvent 用于描述事件数据。 |
类型别名
类型别名 | 说明 |
---|---|
CloudEventVersion | CloudEvent 版本。 |
getEventarc(应用)
获取默认应用或指定应用的 Eventarc 服务。
可以不使用任何参数调用 getEventarc()
来访问默认应用的 Eventarc
服务,或者以 getEventarc(app)
形式调用以访问与特定应用关联的 Eventarc
服务。
签名:
export declare function getEventarc(app?: App): Eventarc;
参数
参数 | 类型 | 说明 |
---|---|---|
app | 应用 | 可选应用,其 Eventarc 服务将被返回。如果未提供,系统将返回默认的 Eventarc 服务。 |
返回:
如果未提供应用,或与提供的应用关联的 Eventarc
服务,则为默认的 Eventarc
服务。
示例 1
// Get the Eventarc service for the default app
const defaultEventarc = getEventarc();
示例 2
// Get the Eventarc service for a given app
const otherEventarc = getEventarc(otherApp);
CloudEventVersion
CloudEvent 版本。
签名:
export type CloudEventVersion = '1.0';