UNPKG

@bitblit/ratchet-common

Version:

Common tools for general use

10 lines (9 loc) 704 B
import { RemoteStatusData } from './remote-status-data.js'; import { RemoteStatusDataAndContent } from './remote-status-data-and-content.js'; import { FileTransferResult } from './file-transfer-result.js'; import { RemoteFileTrackerPushOptions } from './remote-file-tracker-push-options.js'; export interface RemoteFileTrackingProvider<KeyType> { readRemoteStatus(key: KeyType): Promise<RemoteStatusData<KeyType>>; pullRemoteData(key: KeyType, ifNewerThan?: RemoteStatusData<KeyType>): Promise<RemoteStatusDataAndContent<KeyType>>; sendDataToRemote(src: ReadableStream, key: KeyType, opts: RemoteFileTrackerPushOptions, checkStatus: RemoteStatusData<KeyType>): Promise<FileTransferResult>; }