pubsub namespace

Funkcje

Funkcjonować Opis
onMessagePublished (temat, procedura obsługi) Obsługuj wiadomość publikowaną w temacie Pub/Sub.
onMessagePublished (opcje, procedura obsługi) Obsługuj wiadomość publikowaną w temacie Pub/Sub.

Zajęcia

Klasa Opis
Wiadomość Interfejs reprezentujący wiadomość Google Cloud Pub/Sub.

Interfejsy

Interfejs Opis
WiadomośćPublishedDane Interfejs opublikowany w ramach subskrypcji publikacji Pub/Sub.
Opcje PubSub PubSubOptions rozszerzają EventHandlerOptions, ale muszą zawierać temat.

pubsub.onMessagePublished()

Obsługuj wiadomość publikowaną w temacie Pub/Sub.

Podpis:

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

Parametry

Parametr Typ Opis
temat strunowy Temat Pub/Sub, w którym można obserwować zdarzenia wiadomości.
treser (zdarzenie: CloudEvent < MessagePublishedData <T>>) => dowolny | Obiecaj<jakiekolwiek> uruchamia się za każdym razem, gdy publikowana jest wiadomość Cloud Pub/Sub

Zwroty:

Funkcja chmury < Wydarzenie w chmurze < MessagePublishedData <T>>>

pubsub.onMessagePublished()

Obsługuj wiadomość publikowaną w temacie Pub/Sub.

Podpis:

export declare function onMessagePublished<T = any>(options: PubSubOptions, handler: (event: CloudEvent<MessagePublishedData<T>>) => any | Promise<any>): CloudFunction<CloudEvent<MessagePublishedData<T>>>;

Parametry

Parametr Typ Opis
opcje Opcje PubSub Opcja zawierająca informację (temat) o wydarzeniu
treser (zdarzenie: CloudEvent < MessagePublishedData <T>>) => dowolny | Obiecaj<jakiekolwiek> uruchamia się za każdym razem, gdy publikowana jest wiadomość Cloud Pub/Sub

Zwroty:

Funkcja chmury < Wydarzenie w chmurze < MessagePublishedData <T>>>