pub struct MultiRepoHost { /* private fields */ }Expand description
Static process-lifetime catalog plus one existing single-repo host per healthy root.
Implementations§
Source§impl MultiRepoHost
impl MultiRepoHost
Sourcepub fn with_host(host: Arc<MissionHost>) -> Self
pub fn with_host(host: Arc<MissionHost>) -> Self
Wrap an already-constructed host (including test hosts with injected backends) in a one-repository catalog.
Sourcepub fn single(repo_root: PathBuf) -> Result<Self>
pub fn single(repo_root: PathBuf) -> Result<Self>
Preserve the historical one-repository serve path when no global host catalog is configured.
Sourcepub fn from_global_config(
global_path: Option<&Path>,
fallback_root: PathBuf,
) -> Result<Self>
pub fn from_global_config( global_path: Option<&Path>, fallback_root: PathBuf, ) -> Result<Self>
Load the global catalog, falling back to the historical current repo
only when the host.repos list is absent or empty.
pub fn from_config(config: HostConfig) -> Result<Self>
pub fn contexts(&self) -> impl Iterator<Item = Arc<RepoContext>> + '_
pub fn healthy_contexts(&self) -> impl Iterator<Item = Arc<RepoContext>> + '_
pub fn resolve(&self, id: &str) -> Option<Arc<RepoContext>>
Sourcepub async fn auto_work_tick(&self) -> usize
pub async fn auto_work_tick(&self) -> usize
One fair auto-work scheduling pass (test + serve watcher entrypoint).
Sourcepub fn compatibility_context(&self) -> Option<Arc<RepoContext>>
pub fn compatibility_context(&self) -> Option<Arc<RepoContext>>
Existing unscoped routes are available for an explicit default, or when exactly one healthy root makes the choice unambiguous.
pub fn summaries(&self) -> Vec<RepoSummary>
pub fn max_concurrent_repos(&self) -> usize
pub fn default_repo(&self) -> Option<&str>
pub fn uses_operator_catalog(&self) -> bool
Sourcepub fn ensure_auto_work_started(self: &Arc<Self>)
pub fn ensure_auto_work_started(self: &Arc<Self>)
Spawn the single process-wide fair auto-work watcher at most once.
Sourcepub fn available_global_run_permits(&self) -> usize
pub fn available_global_run_permits(&self) -> usize
Remaining process-wide run slots under host.maxConcurrentRepos.
Auto Trait Implementations§
impl !Freeze for MultiRepoHost
impl !RefUnwindSafe for MultiRepoHost
impl !UnwindSafe for MultiRepoHost
impl Send for MultiRepoHost
impl Sync for MultiRepoHost
impl Unpin for MultiRepoHost
impl UnsafeUnpin for MultiRepoHost
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