Channel class Stay organized with collections Save and categorize content based on your preferences.
Eventarc Channel.
Signature:
exportdeclareclassChannelProperties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| allowedEventTypes | string[] | List of event types allowed by this channel for publishing. Other event types are ignored. | |
| eventarc | Eventarc | TheEventarc service instance associated with the currentChannel. | |
| name | string | The channel name as provided during channel creation. If it was not specifed, the default channel name is returned ('locations/us-central1/channels/firebase'). |
Methods
| Method | Modifiers | Description |
|---|---|---|
| publish(events) | Publishes provided events to this channel. If channel was created withallowedEventTypes and event type is not on that list, the event is ignored. |
Channel.allowedEventTypes
List of event types allowed by this channel for publishing. Other event types are ignored.
Signature:
readonlyallowedEventTypes?:string[];Channel.eventarc
TheEventarc service instance associated with the currentChannel.
Signature:
geteventarc():Eventarc;Example
varapp=channel.eventarc;Channel.name
The channel name as provided during channel creation. If it was not specifed, the default channel name is returned ('locations/us-central1/channels/firebase').
Signature:
getname():string;Channel.publish()
Publishes provided events to this channel. If channel was created withallowedEventTypes and event type is not on that list, the event is ignored.
Signature:
publish(events:CloudEvent|CloudEvent[]):Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| events | CloudEvent |CloudEvent[] | CloudEvent to publish to the channel. |
Returns:
Promise<void>
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-29 UTC.