registerPubSubService function

void registerPubSubService(
  1. PubSub pubsub
)

Registers the pubsub object within the current service scope.

The provided pubsub object will be avilable via the top-level pubsubService getter.

Calling this function outside of a service scope will result in an error. Calling this function more than once inside the same service scope is not allowed.

Implementation

void registerPubSubService(PubSub pubsub) {
  ss.register(_pubsubKey, pubsub);
}