Skip to main content
Version: v2

Class: PubSubService

Properties#

client#

â–ª Static Protected client: PubSubClientV2

Defined in#

src/service/pubsub.ts:13


driver#

â–ª Static Protected driver: "synchronous" | "google"

Defined in#

src/service/pubsub.ts:15


instance#

â–ª Static Protected instance: PubSubService

Defined in#

src/service/pubsub.ts:14

Methods#

closeAll#

â–¸ closeAll(): Promise<void>

Returns#

Promise<void>

Defined in#

src/service/pubsub.ts:123


getAllSubscriptions#

â–¸ getAllSubscriptions(): Promise<AllSubscriptions[]>

Retrieves a list of subscribers

Returns#

Promise<AllSubscriptions[]>

Defined in#

src/service/pubsub.ts:213


getSubscribers#

â–¸ getSubscribers(): Subscribers

Returns#

Subscribers

Defined in#

src/service/pubsub.ts:119


initClient#

â–¸ initClient(): void

Returns#

void

Defined in#

src/service/pubsub.ts:84


publish#

â–¸ publish<T>(topic, message, options?): Promise<string>

Publishes new orders to PubSub.

Type parameters#

NameType
Textends TopicProperties

Parameters#

NameType
topicT
messageRecord<string, unknown>
options?PublishOptions

Returns#

Promise<string>

Defined in#

src/service/pubsub.ts:102


startSubscriptions#

â–¸ startSubscriptions(): Promise<void>

Returns#

Promise<void>

Defined in#

src/service/pubsub.ts:144


subscribe#

â–¸ subscribe(subscription): Promise<void>

Subscribes to any given topic

Parameters#

NameType
subscriptionSubscriberTuple

Returns#

Promise<void>

Defined in#

src/service/pubsub.ts:206


getInstance#

â–¸ Static getInstance(): PubSubService

Returns#

PubSubService

Defined in#

src/service/pubsub.ts:92


isHealthy#

â–¸ Static isHealthy(): boolean

Returns#

boolean

Defined in#

src/service/pubsub.ts:48