Skip to main content

NodeRunnerApi

Trait NodeRunnerApi 

Source
pub trait NodeRunnerApi {
    // Required methods
    async fn renew_lease(
        &self,
        req: &UserLeaseRenewalRequest,
    ) -> Result<Empty, RunnerApiError>;
    async fn sync_succ(&self, user_pk: UserPk) -> Result<Empty, RunnerApiError>;
}
Expand description

Defines the api that the runner exposes to the user node.

Required Methods§

Source

async fn renew_lease( &self, req: &UserLeaseRenewalRequest, ) -> Result<Empty, RunnerApiError>

POST /node/renew_lease UserLeaseRenewalRequest -> Empty

Renew’s a user node’s lease with the megarunner.

Source

async fn sync_succ(&self, user_pk: UserPk) -> Result<Empty, RunnerApiError>

POST /node/sync_success [UserPkStruct] -> Empty

Indicates the node successfully completed sync.

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§