pub struct FleetPool { /* private fields */ }Expand description
A WorktreeAgent that spreads subtasks over a set of workers.
Implementations§
Source§impl FleetPool
impl FleetPool
Sourcepub fn new(workers: Vec<FleetWorker>) -> Self
pub fn new(workers: Vec<FleetWorker>) -> Self
Build a pool. Workers are tried in the order given when equally loaded, so put the preferred one first.
A pool with no workers is accepted and fails every subtask with a clear message — a caller that filtered its fleet down to nothing gets told so rather than getting a silent no-op run.
pub fn worker_ids(&self) -> Vec<&str>
Sourcepub fn placements(&self) -> Vec<Placement>
pub fn placements(&self) -> Vec<Placement>
Where each subtask ran, in completion order.
Sourcepub fn quarantined(&self) -> Vec<&str>
pub fn quarantined(&self) -> Vec<&str>
Workers removed from the pool mid-run, in declaration order.
Reported next to the pool’s build-time exclusions so a degraded run says
so. A worker lands here only via ForemanError::Worker — see
Self::run_in.
Trait Implementations§
Source§impl WorktreeAgent for FleetPool
impl WorktreeAgent for FleetPool
fn run_in<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 WorktreeAgentRequest<'life2>,
) -> Pin<Box<dyn Future<Output = Result<AgentRunSummary, ForemanError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl !Freeze for FleetPool
impl !RefUnwindSafe for FleetPool
impl !UnwindSafe for FleetPool
impl Send for FleetPool
impl Sync for FleetPool
impl Unpin for FleetPool
impl UnsafeUnpin for FleetPool
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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