pub struct ReposControl(/* private fields */);Expand description
control over which repositories are tracked and access to their state.
in filter mode, a repo is only indexed if it either matches a signal or is
explicitly tracked via ReposControl::track. in full mode all repos are
indexed and tracking is implicit.
tracking a DID that hydrant has never seen enqueues an immediate backfill. tracking a DID that hydrant already knows about (but has marked untracked) re-enqueues it for backfill.
Implementations§
Source§impl ReposControl
impl ReposControl
Sourcepub async fn resync(
&self,
dids: impl IntoIterator<Item = Did<'_>>,
) -> Result<Vec<Did<'static>>>
pub async fn resync( &self, dids: impl IntoIterator<Item = Did<'_>>, ) -> Result<Vec<Did<'static>>>
request one or more repositories to be resynced.
note that they may not immediately start backfilling if:
- other repos already filled the backfill concurrency limit,
- or there are many repos pending already.
this will also clear any error state the repo may have been in, allowing it to resync again.
Sourcepub async fn track(
&self,
dids: impl IntoIterator<Item = Did<'_>>,
) -> Result<Vec<Did<'static>>>
pub async fn track( &self, dids: impl IntoIterator<Item = Did<'_>>, ) -> Result<Vec<Did<'static>>>
explicitly track one or more repositories, enqueuing them for backfill if needed.
- if a repo is new, a fresh [
RepoState] is created and backfill is queued. - if a repo is already known but untracked, it is marked tracked and re-enqueued.
- if a repo is already tracked, this is a no-op.
Sourcepub async fn untrack(
&self,
dids: impl IntoIterator<Item = Did<'_>>,
) -> Result<Vec<Did<'static>>>
pub async fn untrack( &self, dids: impl IntoIterator<Item = Did<'_>>, ) -> Result<Vec<Did<'static>>>
stop tracking one or more repositories. hydrant will stop processing new events for them and remove them from the pending/resync queues, but existing indexed records are not deleted.
Source§impl ReposControl
impl ReposControl
Sourcepub fn iter(
&self,
cursor: Option<&Did<'_>>,
) -> impl Iterator<Item = Result<RepoInfo>>
pub fn iter( &self, cursor: Option<&Did<'_>>, ) -> impl Iterator<Item = Result<RepoInfo>>
iterates through all repositories, returning their state.
Sourcepub fn get<'i>(&self, did: &Did<'i>) -> RepoHandle<'i>
pub fn get<'i>(&self, did: &Did<'i>) -> RepoHandle<'i>
gets a handle for a repository to read from it.
Sourcepub async fn resolve(
&self,
repo: &AtIdentifier<'_>,
) -> Result<RepoHandle<'static>>
pub async fn resolve( &self, repo: &AtIdentifier<'_>, ) -> Result<RepoHandle<'static>>
same as ReposControl::get but allows you to pass in an identifier that can be
either a handle or a DID.
Trait Implementations§
Source§impl Clone for ReposControl
impl Clone for ReposControl
Source§fn clone(&self) -> ReposControl
fn clone(&self) -> ReposControl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ReposControl
impl !RefUnwindSafe for ReposControl
impl Send for ReposControl
impl Sync for ReposControl
impl Unpin for ReposControl
impl !UnwindSafe for ReposControl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more