Skip to main content

MetadataStore

Trait MetadataStore 

Source
pub trait MetadataStore:
    Send
    + Sync
    + 'static {
Show 14 methods // Required methods fn register_repo(&self, repo_path: PathBuf) -> StorageResult<RepoMetadata>; fn unregister_repo( &self, repo_path: &Path, ) -> StorageResult<Option<RepoMetadata>>; fn get_repo(&self, repo_path: &Path) -> StorageResult<Option<RepoMetadata>>; fn list_repos(&self) -> StorageResult<Vec<RepoMetadata>>; fn update_repo_status( &self, repo_path: &Path, status: RepoStatus, ) -> StorageResult<()>; fn increment_jobs( &self, repo_path: &Path, delta: isize, ) -> StorageResult<RepoMetadata>; fn record_event( &self, repo_path: &Path, when: SystemTime, ) -> StorageResult<()>; fn mark_dirty_path( &self, repo_path: &Path, path: PathBuf, ) -> StorageResult<()>; fn drain_dirty_paths(&self, repo_path: &Path) -> StorageResult<Vec<PathBuf>>; fn dirty_path_count(&self, repo_path: &Path) -> StorageResult<usize>; fn current_generation(&self, repo_path: &Path) -> StorageResult<u64>; fn bump_generation(&self, repo_path: &Path) -> StorageResult<u64>; fn set_needs_reconciliation( &self, repo_path: &Path, needs: bool, ) -> StorageResult<()>; fn set_watcher_token( &self, repo_path: &Path, token: u64, ) -> StorageResult<()>;
}
Expand description

Primary abstraction for storing repository metadata.

Required Methods§

Source

fn register_repo(&self, repo_path: PathBuf) -> StorageResult<RepoMetadata>

Source

fn unregister_repo( &self, repo_path: &Path, ) -> StorageResult<Option<RepoMetadata>>

Source

fn get_repo(&self, repo_path: &Path) -> StorageResult<Option<RepoMetadata>>

Source

fn list_repos(&self) -> StorageResult<Vec<RepoMetadata>>

Source

fn update_repo_status( &self, repo_path: &Path, status: RepoStatus, ) -> StorageResult<()>

Source

fn increment_jobs( &self, repo_path: &Path, delta: isize, ) -> StorageResult<RepoMetadata>

Source

fn record_event(&self, repo_path: &Path, when: SystemTime) -> StorageResult<()>

Source

fn mark_dirty_path(&self, repo_path: &Path, path: PathBuf) -> StorageResult<()>

Source

fn drain_dirty_paths(&self, repo_path: &Path) -> StorageResult<Vec<PathBuf>>

Source

fn dirty_path_count(&self, repo_path: &Path) -> StorageResult<usize>

Source

fn current_generation(&self, repo_path: &Path) -> StorageResult<u64>

Source

fn bump_generation(&self, repo_path: &Path) -> StorageResult<u64>

Source

fn set_needs_reconciliation( &self, repo_path: &Path, needs: bool, ) -> StorageResult<()>

Source

fn set_watcher_token(&self, repo_path: &Path, token: u64) -> StorageResult<()>

Implementors§