why deepstreamHub? compare us getting started feature roadmap faq
use cases pricing
products
developers
company
blog contact

An interface that notifies whenever a pattern match has been found or removed when added via event.listen(_:listener:) or record.listen(_:listener:)

Methods

onSubscriptionForPatternAdded(_:)

func onSubscriptionForPatternAdded(_ subscription: String) -> Bool
argument type description
subscription String The name of the subscription that can be provided

Called whenever a subscription has been found a on pattern you previously added. This method must return a true if it is willing to provide the subscription, and false otherwise. This also has to be done in a timely fashion since the server will assume the provider is unresponsive if it takes too long.

onSubscriptionForPatternRemoved(_:)

func onSubscriptionForPatternRemoved(_ subscription: String) -> Void
argument type description
subscription String The name of the subscription to stop providing

If a provider has accepted a request, they will then be notified when the subscription is no longer needed so that they can stop providing