Skip to main content

BackgroundSyncCoordinator

A small durable, at-least-once queue. The result is written before delivery and removed only after the consumer resolves. A process death between those two operations can deliver a result twice, so consumers should de-duplicate by id.

Kind: Class
Package: @ovok/native

Import​

import { BackgroundSyncCoordinator } from '@ovok/native/bt-management';

TypeScript signatures​

<T extends DeviceKey>(options: BackgroundSyncOptions<T>): BackgroundSyncCoordinator<T>
ParameterTypeDetails
optionsBackgroundSyncOptions<T>—

Returns: BackgroundSyncCoordinator<T>.

Public members​

MemberTypeDetails
enqueue(result: ResultCallback<T>): Promise<void>—
flush(options?: BackgroundSyncFlushOptions): Promise<void>—

Learn the workflow​

Continue with Bluetooth for the workflow context and examples.

Source​

View the declaration in the SDK source.