pub trait LexeMegaApi {
// Required methods
async fn run_user(
&self,
req: MegaNodeApiUserRunRequest,
) -> Result<MegaNodeApiUserRunResponse, MegaApiError>;
async fn evict_user(
&self,
req: MegaNodeApiUserEvictRequest,
) -> Result<Empty, MegaApiError>;
async fn status_mega(&self, mega_id: u16) -> Result<Status, MegaApiError>;
async fn shutdown_mega(&self) -> Result<Empty, MegaApiError>;
}Expand description
Defines the API the mega node exposes to the Lexe operators.
NOTE: For performance, this API does not use TLS! This API should only contain methods for limited operational and lifecycle management endpoints.
Required Methods§
Sourceasync fn run_user(
&self,
req: MegaNodeApiUserRunRequest,
) -> Result<MegaNodeApiUserRunResponse, MegaApiError>
async fn run_user( &self, req: MegaNodeApiUserRunRequest, ) -> Result<MegaNodeApiUserRunResponse, MegaApiError>
POST /lexe/run_user MegaNodeApiUserRunRequest
-> MegaNodeApiUserRunResponse
Sourceasync fn evict_user(
&self,
req: MegaNodeApiUserEvictRequest,
) -> Result<Empty, MegaApiError>
async fn evict_user( &self, req: MegaNodeApiUserEvictRequest, ) -> Result<Empty, MegaApiError>
POST /lexe/evict_user MegaNodeApiUserEvictRequest -> Empty
Sourceasync fn status_mega(&self, mega_id: u16) -> Result<Status, MegaApiError>
async fn status_mega(&self, mega_id: u16) -> Result<Status, MegaApiError>
GET /lexe/status [MegaIdStruct] -> Status
Sourceasync fn shutdown_mega(&self) -> Result<Empty, MegaApiError>
async fn shutdown_mega(&self) -> Result<Empty, MegaApiError>
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.