pub struct LifecycleLauncher { /* private fields */ }Expand description
Production implementation of e1’s launcher port.
Implementations§
Source§impl LifecycleLauncher
impl LifecycleLauncher
pub fn new( host_id: HostId, app_paths: AppPaths, diagnostics_root: impl Into<PathBuf>, runner_group_id: u64, timeouts: RecoveryTimeouts, retry: RetryPolicy, ports: LifecyclePorts, ) -> Self
Sourcepub fn with_preparation_turns(self, turns: Arc<Semaphore>) -> Self
pub fn with_preparation_turns(self, turns: Arc<Semaphore>) -> Self
Takes turns to prepare with every launcher holding turns, rather than
only with itself: the targets of one host.
Sourcepub async fn recover_startup(
&self,
policies: &[ScalePolicy],
) -> Result<Vec<ReplacementIntent>, LifecycleError>
pub async fn recover_startup( &self, policies: &[ScalePolicy], ) -> Result<Vec<ReplacementIntent>, LifecycleError>
Reconcile the entire journal before allowing a launch. Unknown-policy attempts are left untouched rather than being acted on without an ownership proof.
Sourcepub async fn supervise(
&self,
policy: &ScalePolicy,
) -> Result<Vec<ReplacementIntent>, LifecycleError>
pub async fn supervise( &self, policy: &ScalePolicy, ) -> Result<Vec<ReplacementIntent>, LifecycleError>
Supervise all attempts of one policy during an ordinary poll.
Trait Implementations§
Source§impl Debug for LifecycleLauncher
impl Debug for LifecycleLauncher
Source§impl RunnerLauncher for LifecycleLauncher
impl RunnerLauncher for LifecycleLauncher
Source§fn host_capacity<'life0, 'life1, 'async_trait>(
&'life0 self,
host: &'life1 Host,
) -> Pin<Box<dyn Future<Output = Result<NonZeroU16, HostCapacityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn host_capacity<'life0, 'life1, 'async_trait>(
&'life0 self,
host: &'life1 Host,
) -> Pin<Box<dyn Future<Output = Result<NonZeroU16, HostCapacityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read this host’s current ceiling from the journal, including edits made
after daemon startup. An unreadable or missing host is an error, never
permission to fall back to the startup ceiling.
Source§fn supervise<'life0, 'life1, 'async_trait>(
&'life0 self,
policy: &'life1 ScalePolicy,
) -> Pin<Box<dyn Future<Output = Result<Vec<ReplacementIntent>, LaunchFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn supervise<'life0, 'life1, 'async_trait>(
&'life0 self,
policy: &'life1 ScalePolicy,
) -> Pin<Box<dyn Future<Output = Result<Vec<ReplacementIntent>, LaunchFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reconcile this policy’s existing processes before demand is read and
capacity is recomputed. A concluded pre-acceptance attempt thereby
becomes an ordinary allocation candidate in this same pass; replacement
never bypasses the allocator.
Source§fn attempts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunnerAttempt>, LaunchFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn attempts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunnerAttempt>, LaunchFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Every attempt this host holds, across every policy, terminal ones
included. Read more
Source§fn launch<'life0, 'life1, 'async_trait>(
&'life0 self,
request: LaunchRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<RunnerAttempt, LaunchFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn launch<'life0, 'life1, 'async_trait>(
&'life0 self,
request: LaunchRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<RunnerAttempt, LaunchFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create exactly one runtime and start one runner, and return the attempt
that now exists. Read more
Source§fn finish_launch<'life0, 'life1, 'async_trait>(
&'life0 self,
policy: &'life1 ScalePolicy,
attempt: RunnerAttempt,
lock_wait: Duration,
) -> Pin<Box<dyn Future<Output = Result<RunnerAttempt, LaunchFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn finish_launch<'life0, 'life1, 'async_trait>(
&'life0 self,
policy: &'life1 ScalePolicy,
attempt: RunnerAttempt,
lock_wait: Duration,
) -> Pin<Box<dyn Future<Output = Result<RunnerAttempt, LaunchFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Bring up a runner
Self::launch reserved, after the host allocation
lock was released: its package, its registration and its process, none
of which decides a ceiling, and all of which may take minutes. Read moreAuto Trait Implementations§
impl !Freeze for LifecycleLauncher
impl !RefUnwindSafe for LifecycleLauncher
impl !UnwindSafe for LifecycleLauncher
impl Forget for LifecycleLauncher
impl Send for LifecycleLauncher
impl Sync for LifecycleLauncher
impl Unpin for LifecycleLauncher
impl UnsafeUnpin for LifecycleLauncher
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