Object - websub : HubPersistenceStore

Represents the hub persistence configuration and functions.

addSubscription

(SubscriptionDetails subscriptionDetails)

returns error

Function to add or update subscription details.

Parameters

  • Return Type

    (error)
  • error if an error occurred while adding the subscription, () otherwise

removeSubscription

(SubscriptionDetails subscriptionDetails)

returns error

Function to remove subscription details.

Parameters

  • Return Type

    (error)
  • error if an error occurred while removing the subscription, () otherwise

addTopic

(string topic)

returns error

Function to add a topic.

Parameters

  • topic string
  • The topic to add

  • Return Type

    (error)
  • error if an error occurred while adding the topic, () otherwise

removeTopic

(string topic)

returns error

Function to remove a topic.

Parameters

  • topic string
  • The topic to remove

  • Return Type

    (error)
  • error if an error occurred while removing the topic, () otherwise

retrieveAllSubscribers

()

returns SubscriptionDetails[] | error

Function to retrieve subscription details of all subscribers.

  • Return Type

    (SubscriptionDetails[] | error)
  • error if an error occurred while retrieving the subscriptions, an array of subscriber details otherwise

retrieveTopics

()

returns string | error

Function to retrieve all registered topics.

  • Return Type

    (string | error)
  • error if an error occurred while retrieving the topics, an array of topics otherwise