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§
Sourceasync fn mega_ready(&self, ports: &MegaPorts) -> Result<Empty, RunnerApiError>
async fn mega_ready(&self, ports: &MegaPorts) -> Result<Empty, RunnerApiError>
Sourceasync fn activity(
&self,
user_pks: HashSet<UserPk>,
) -> Result<Empty, RunnerApiError>
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.
Sourceasync fn user_finished(
&self,
req: &UserFinishedRequest,
) -> Result<Empty, RunnerApiError>
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.