delta-sync
Version:
A lightweight framework for bi-directional database synchronization with automatic version tracking and conflict resolution.
19 lines (18 loc) • 458 B
JavaScript
// 补全默认的同步设置
export const createDefaultOptions = (options) => {
return {
autoSync: {
enabled: false,
pullInterval: 600000,
pushDebounce: 10000,
retryDelay: 3000,
...options.autoSync
},
maxRetries: 3,
timeout: 30000,
batchSize: 100,
maxFileSize: 10 * 1024 * 1024,
fileChunkSize: 1024 * 1024,
...options
};
};