eventarc namespace

Functions

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

Interfaces

Interface Description
EventarcTriggerOptions Options that can be set on an Eventarc trigger.

eventarc.onCustomEventPublished()

Handles an Eventarc event published on the default channel.

Signature:

export declare function onCustomEventPublished<T = any>(eventType: string, handler: (event: CloudEvent<T>) => any | Promise<any>): CloudFunction<CloudEvent<T>>;

Parameters

Parameter Type Description
eventType string Type 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:

export declare function onCustomEventPublished<T = any>(opts: EventarcTriggerOptions, handler: (event: CloudEvent<T>) => any | Promise<any>): CloudFunction<CloudEvent<T>>;

Parameters

Parameter Type Description
opts EventarcTriggerOptions Options 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.