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

Record state changed listener, used to be notified whenever the record state has occurred

Methods

onError(_:errorType:errorMsg:)

func onError(_ recordName: String, errorType: Event, errorMessage: String) -> Void
argument type description
recordName String The name of the record an error occured to
errorType Event The error type, such as Event.ACK_TIMEOUT or Event.MESSAGE_DENIED
errorMessage String An error message in english, describing the issue. Do not use this message other than for logging! All checks should be against errorType

Notified whenever an error has occurred on the record, usually due to an async operation such as a timeout or VersionConflict that can't be caught sync.

onRecordDeleted(_:)

func onRecordDeleted(_ recordName: String) -> Void
argument type description
recordName String The name of the record that got deleted

Notified when the record was deleted, whether by this client or by another.

Once this is called the record object must be cleaned up and a new one created if you wish to continue setting data.

onRecordDiscarded(_:)

func onRecordDiscarded(_ recordName: String) -> Void
argument type description
recordName String The name of the record that got discarded

Notified once the record was discarded. Once this is called the record object must be cleaned up and a new one created if you wish to continue setting data.