Skip to main content

RootFundingRuntime

Trait RootFundingRuntime 

Source
pub trait RootFundingRuntime: Send + Sync {
    // Required methods
    fn config(&self) -> Result<RootFundingRuntimeConfig, InternalError>;
    fn current_request(
        &self,
    ) -> Result<Option<FleetRootFundingRequest>, InternalError>;
    fn prepare_request(&self) -> Result<FleetRootFundingRequest, InternalError>;
    fn request<'life0, 'async_trait>(
        &'life0 self,
        request: FleetRootFundingRequest,
    ) -> Pin<Box<dyn Future<Output = Result<FleetRootFundingResponse, InternalError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn record_response(
        &self,
        response: FleetRootFundingResponse,
    ) -> Result<FleetRootFundingResponse, InternalError>;
}
Expand description

Driver implemented by the Root control plane while core retains timer ownership.

Required Methods§

Source

fn config(&self) -> Result<RootFundingRuntimeConfig, InternalError>

Return the protected normal funding schedule.

Source

fn current_request( &self, ) -> Result<Option<FleetRootFundingRequest>, InternalError>

Validate and return the exact durable nonterminal request, if one exists.

Source

fn prepare_request(&self) -> Result<FleetRootFundingRequest, InternalError>

Persist the next request before its first outbound call.

Source

fn request<'life0, 'async_trait>( &'life0 self, request: FleetRootFundingRequest, ) -> Pin<Box<dyn Future<Output = Result<FleetRootFundingResponse, InternalError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Invoke the exact Coordinator request without changing Root journal state.

Source

fn record_response( &self, response: FleetRootFundingResponse, ) -> Result<FleetRootFundingResponse, InternalError>

Commit one exact terminal Coordinator response.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§