pub struct DiscoveryOrchestrator { /* private fields */ }Expand description
Orchestrates repository discovery.
Implementations§
Source§impl DiscoveryOrchestrator
impl DiscoveryOrchestrator
Sourcepub fn new(filters: FilterOptions, structure: String) -> Self
pub fn new(filters: FilterOptions, structure: String) -> Self
Creates a new discovery orchestrator.
Sourcepub fn to_discovery_options(&self) -> DiscoveryOptions
pub fn to_discovery_options(&self) -> DiscoveryOptions
Converts filter options to discovery options.
Sourcepub async fn discover(
&self,
provider: &dyn Provider,
progress: &dyn DiscoveryProgress,
) -> Result<Vec<OwnedRepo>, ProviderError>
pub async fn discover( &self, provider: &dyn Provider, progress: &dyn DiscoveryProgress, ) -> Result<Vec<OwnedRepo>, ProviderError>
Discovers repositories from a provider.
Sourcepub fn compute_path(
&self,
base_path: &Path,
repo: &OwnedRepo,
provider: &str,
) -> PathBuf
pub fn compute_path( &self, base_path: &Path, repo: &OwnedRepo, provider: &str, ) -> PathBuf
Computes the local path for a repository.
Sourcepub fn plan_clone<G: GitOperations>(
&self,
base_path: &Path,
repos: Vec<OwnedRepo>,
provider: &str,
git: &G,
) -> ActionPlan
pub fn plan_clone<G: GitOperations>( &self, base_path: &Path, repos: Vec<OwnedRepo>, provider: &str, git: &G, ) -> ActionPlan
Creates an action plan by comparing discovered repos with local filesystem.
Sourcepub fn plan_sync<G: GitOperations>(
&self,
base_path: &Path,
repos: Vec<OwnedRepo>,
provider: &str,
git: &G,
skip_uncommitted: bool,
) -> (Vec<LocalRepo>, Vec<(OwnedRepo, String)>)
pub fn plan_sync<G: GitOperations>( &self, base_path: &Path, repos: Vec<OwnedRepo>, provider: &str, git: &G, skip_uncommitted: bool, ) -> (Vec<LocalRepo>, Vec<(OwnedRepo, String)>)
Creates a sync plan for existing local repositories.
Sourcepub fn scan_local<G: GitOperations>(
&self,
base_path: &Path,
git: &G,
) -> Vec<(PathBuf, String, String)>
pub fn scan_local<G: GitOperations>( &self, base_path: &Path, git: &G, ) -> Vec<(PathBuf, String, String)>
Scans local filesystem for cloned repositories.
Auto Trait Implementations§
impl Freeze for DiscoveryOrchestrator
impl RefUnwindSafe for DiscoveryOrchestrator
impl Send for DiscoveryOrchestrator
impl Sync for DiscoveryOrchestrator
impl Unpin for DiscoveryOrchestrator
impl UnsafeUnpin for DiscoveryOrchestrator
impl UnwindSafe for DiscoveryOrchestrator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more