Skip to main content

Home > git-documentdb > RemoteOptions

RemoteOptions type#

Options for Sync class

Signature:
export declare type RemoteOptions = {
remoteUrl?: string;
syncDirection?: SyncDirection;
connection?: ConnectionSettings;
live?: boolean;
interval?: number;
retry?: number;
retryInterval?: number;
conflictResolutionStrategy?: ConflictResolutionStrategies;
combineDbStrategy?: CombineDbStrategies;
includeCommits?: boolean;
};
References:

SyncDirection , ConnectionSettings , ConflictResolutionStrategies , CombineDbStrategies

Remarks#

(network)

  • remoteUrl: Connection destination

  • syncDirection: Default is 'both'.

  • connection: Authentication and other settings on remote site

(automation)

  • live: Synchronization repeats automatically if true. Default is false.

  • interval: Synchronization interval (milliseconds). This must be greater than MINIMUM_SYNC_INTERVAL(3000). Default is DEFAULT_SYNC_INTERVAL(30000).

  • retry: Number of network retries. Retry does not occur if retry is 0. Default is NETWORK_RETRY(3).

  • retryInterval: Retry interval (milliseconds). Default is NETWORK_RETRY_INTERVAL(2000).

(merge)

  • conflictResolutionStrategy: Default is 'ours-diff'.

  • combineDbStrategy: Default is 'combine-head-with-theirs'.

(result)

  • includeCommits: Whether SyncResult includes 'commits' property or not. Default is false.