eventarc namespace

Functions

FunctionDescription
onCustomEventPublished(eventType, handler)Handles an Eventarc event published on the default channel.
onCustomEventPublished(opts, handler)Handles an Eventarc event.

Interfaces

InterfaceDescription
EventarcTriggerOptionsOptions that can be set on an Eventarc trigger.

eventarc.onCustomEventPublished()

Handles an Eventarc event published on the default channel.

Signature:

exportdeclarefunctiononCustomEventPublished<T=any>(eventType:string,handler:(event:CloudEvent<T>)=>any|Promise<any>):CloudFunction<CloudEvent<T>>;

Parameters

ParameterTypeDescription
eventTypestringType of the event to trigger on.
handler(event: CloudEvent<T>) => any | Promise<any>A function to execute when triggered.

Returns:

CloudFunction<CloudEvent<T>>

A function that you can export and deploy.

eventarc.onCustomEventPublished()

Handles an Eventarc event.

Signature:

exportdeclarefunctiononCustomEventPublished<T=any>(opts:EventarcTriggerOptions,handler:(event:CloudEvent<T>)=>any|Promise<any>):CloudFunction<CloudEvent<T>>;

Parameters

ParameterTypeDescription
optsEventarcTriggerOptionsOptions to set on this function
handler(event: CloudEvent<T>) => any | Promise<any>A function to execute when triggered.

Returns:

CloudFunction<CloudEvent<T>>

A function that you can export and deploy.