Enum describing different modes for syncing a stream.

Enumeration Members

NEVER_SYNC: 2

Do not query pubsub for the new tip in any circumstance. This means that if the stream is not in cache or the pin store, then only the genesis commit for the stream will be returned

PREFER_CACHE: 0

If the stream is found in the node's in-memory cache or state store, then return the cached version without performing any query to the pubsub network for the current tip.

SYNC_ALWAYS: 1

Always query pubsub for the current tip for the stream and wait up to 'syncTimeoutSeconds' for the response, regardless of whether or not the stream is found in the node's cache. Note that this can result in lost writes as commits that cannot be successfully applied are discarded.

SYNC_ON_ERROR: 3

If there's an error with the state in the cache or state store, then automatically trigger a full resync of the stream to restore it to a valid state (may result in lost writes as commits that cannot be successfully applied are discarded).