Object -
websub
:
HubPersistenceStore
Represents the hub persistence configuration and functions.
Methods
Adds or updates subscription details.
Removes subscription details.
Function to add a topic.
Function to remove a topic.
Function to retrieve subscription details of all subscribers.
Function to retrieve all registered topics.
Adds or updates subscription details.
error? result = hubPersistenceStore.addSubscription(subscriptionDetails);
Parameters
- subscriptionDetails SubscriptionDetails
-
The details of the subscription to add or update
-
Return Type
(error?) An
error
if an error occurred while adding the subscription or else()
otherwise
Removes subscription details.
error? result = hubPersistenceStore.removeSubscription(subscriptionDetails);
Parameters
- subscriptionDetails SubscriptionDetails
-
The details of the subscription to remove
-
Return Type
(error?) An
error
if an error occurred while removing the subscription or else()
otherwise
Function to add a topic.
error? result = hubPersistenceStore.addTopic("topic");
Parameters
- topic string
-
The topic to add
-
Return Type
(error?) An
error
if an error occurred while adding the topic or else()
otherwise
Function to remove a topic.
error? result = hubPersistenceStore.removeTopic("topic");
Parameters
- topic string
-
The topic to remove
-
Return Type
(error?) An
error
if an error occurred while removing the topic or else()
otherwise
Function to retrieve subscription details of all subscribers.
SubscriptionDetails[]|error result = hubPersistenceStore.retrieveAllSubscribers();
-
Return Type
(SubscriptionDetails[] | error) An array of subscriber details or else an
error
if an error occurred while retrieving the subscriptions