Skip to main content

MegaRunnerApi

Trait MegaRunnerApi 

Source
pub trait MegaRunnerApi {
    // Required methods
    async fn mega_ready(
        &self,
        ports: &MegaPorts,
    ) -> Result<Empty, RunnerApiError>;
    async fn activity(
        &self,
        user_pks: HashSet<UserPk>,
    ) -> Result<Empty, RunnerApiError>;
    async fn user_finished(
        &self,
        req: &UserFinishedRequest,
    ) -> Result<Empty, RunnerApiError>;
}
Expand description

Defines the API the runner exposes to mega nodes.

Required Methods§

Source

async fn mega_ready(&self, ports: &MegaPorts) -> Result<Empty, RunnerApiError>

POST /mega/ready MegaPorts -> Empty

Indicates this mega node is initialized and ready to load user nodes.

Source

async fn activity( &self, user_pks: HashSet<UserPk>, ) -> Result<Empty, RunnerApiError>

POST /mega/activity [UserPkSet] -> Empty

Indicates the meganode received some activity from its users.

Source

async fn user_finished( &self, req: &UserFinishedRequest, ) -> Result<Empty, RunnerApiError>

POST /mega/user_finished UserFinishedRequest -> Empty

Notifies the runner that a user has shut down, and that the user’s lease can be terminated.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§