pub trait SyncStoreSdk: Send + Sync {
Show 14 methods
// Required methods
fn sync<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncReport, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_route<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 LocationId,
dest: &'life2 LocationId,
) -> Pin<Box<dyn Future<Output = Result<SyncReport, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
file_type: FileType,
fingerprint: FileFingerprint,
origin: &'life2 LocationId,
embedded_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<PutReport, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn restore<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
revision: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TopologyFileView>, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
file_type: Option<FileType>,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TopologyFileView>, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncSummary, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn errors<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ErrorEntry>, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn pending<'life0, 'life1, 'async_trait>(
&'life0 self,
dest: &'life1 LocationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingEntry>, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn locations(&self) -> Vec<LocationId>;
fn all_edges(&self) -> Vec<(LocationId, LocationId)>;
fn local_root(&self) -> Option<&Path>;
// Provided method
fn set_progress_callback(&self, _callback: Option<ProgressFn>) { ... }
}Expand description
vdsl-syncの外部向けAPI。
インターフェース層(MCP, Lua Bridge, CLI)はこのtraitのみに依存する。 内部実装(TopologyStore, TransferEngine, scan, delta等)は一切公開しない。
Required Methods§
Sourcefn sync<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncReport, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncReport, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
全体同期: scan→delta→plan→execute 一括。
Sourcefn sync_route<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 LocationId,
dest: &'life2 LocationId,
) -> Pin<Box<dyn Future<Output = Result<SyncReport, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sync_route<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 LocationId,
dest: &'life2 LocationId,
) -> Pin<Box<dyn Future<Output = Result<SyncReport, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
単一ルート同期。
Sourcefn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
file_type: FileType,
fingerprint: FileFingerprint,
origin: &'life2 LocationId,
embedded_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<PutReport, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
file_type: FileType,
fingerprint: FileFingerprint,
origin: &'life2 LocationId,
embedded_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<PutReport, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ファイル登録。
Sourcefn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ファイル削除。削除されたTransfer数を返す。
Sourcefn restore<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
revision: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn restore<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
revision: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
アーカイブからファイル復元。
delete() で archive 化されたファイル(cloud上の vdsl/archived/{revision}/{path})を
元の場所(vdsl/output/{path})に moveto reverse で戻し、TopologyFile の
deleted フラグを解除する。直後の sync() の cloud scan により LocationFile が再登録され、
distribute → 他拠点へ再配布される。
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TopologyFileView>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TopologyFileView>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ファイル取得。
Sourcefn list<'life0, 'async_trait>(
&'life0 self,
file_type: Option<FileType>,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TopologyFileView>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
file_type: Option<FileType>,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TopologyFileView>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
ファイル一覧。
Sourcefn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncSummary, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncSummary, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
ロケーション別同期サマリー。
Sourcefn errors<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ErrorEntry>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn errors<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ErrorEntry>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
エラー一覧。
Sourcefn pending<'life0, 'life1, 'async_trait>(
&'life0 self,
dest: &'life1 LocationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingEntry>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pending<'life0, 'life1, 'async_trait>(
&'life0 self,
dest: &'life1 LocationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingEntry>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
転送待ち一覧。
Sourcefn locations(&self) -> Vec<LocationId>
fn locations(&self) -> Vec<LocationId>
登録済みロケーション一覧。
Sourcefn all_edges(&self) -> Vec<(LocationId, LocationId)>
fn all_edges(&self) -> Vec<(LocationId, LocationId)>
全エッジ (src, dest) 一覧。
Sourcefn local_root(&self) -> Option<&Path>
fn local_root(&self) -> Option<&Path>
ローカルファイルルート。
Provided Methods§
Sourcefn set_progress_callback(&self, _callback: Option<ProgressFn>)
fn set_progress_callback(&self, _callback: Option<ProgressFn>)
Set a progress callback for reporting phase/chunk progress.
Called by SyncTaskManager before spawning sync.
The callback receives human-readable messages like:
"phase: scan (1200 files)""push: chunk 5/22 (500/2111)"
Default: no-op.