Skip to main content

LifecycleGithub

Trait LifecycleGithub 

Source
pub trait LifecycleGithub:
    Debug
    + Send
    + Sync {
    // Required methods
    fn register<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        target: &'life1 ScaleTarget,
        request: &'life2 JitRunnerRequest,
        cancel: &'life3 CancelToken,
    ) -> Pin<Box<dyn Future<Output = Result<JitRegistration, JitRequestFailure>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn observe<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        target: &'life1 ScaleTarget,
        attempt: AttemptId,
        cancel: &'life2 CancelToken,
    ) -> Pin<Box<dyn Future<Output = LifecycleGithubObservation> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn deregister<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        target: &'life1 ScaleTarget,
        runner_id: u64,
        cancel: &'life2 CancelToken,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

The two GitHub views the lifecycle needs, combined so one fake can drive registration and authoritative runner telemetry.

Required Methods§

Source

fn register<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, target: &'life1 ScaleTarget, request: &'life2 JitRunnerRequest, cancel: &'life3 CancelToken, ) -> Pin<Box<dyn Future<Output = Result<JitRegistration, JitRequestFailure>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn observe<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, target: &'life1 ScaleTarget, attempt: AttemptId, cancel: &'life2 CancelToken, ) -> Pin<Box<dyn Future<Output = LifecycleGithubObservation> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn deregister<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, target: &'life1 ScaleTarget, runner_id: u64, cancel: &'life2 CancelToken, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Remove one runner registration this agent created.

Answers whether the registration is gone, and is deliberately not fallible in the Result sense: no caller may abandon a conclusion because GitHub was unreachable. See LifecycleLauncher::deregister_runner.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§