Trait ya_runtime_sdk::Runtime
source · pub trait Runtime: RuntimeDef {
const MODE: RuntimeMode = RuntimeMode::Server;
fn deploy<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>;
fn start<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>;
fn run_command<'a>(
&mut self,
command: RunProcess,
mode: RuntimeMode,
ctx: &mut Context<Self>
) -> ProcessIdResponse<'a>;
fn stop<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a> { ... }
fn kill_command<'a>(
&mut self,
_kill: KillProcess,
_ctx: &mut Context<Self>
) -> EmptyResponse<'a> { ... }
fn offer<'a>(&mut self, _ctx: &mut Context<Self>) -> OutputResponse<'a> { ... }
fn test<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a> { ... }
fn join_network<'a>(
&mut self,
_network: CreateNetwork,
_ctx: &mut Context<Self>
) -> EndpointResponse<'a> { ... }
}
Expand description
Command handling interface for runtimes
Provided Associated Constants§
const MODE: RuntimeMode = RuntimeMode::Server
Required Methods§
sourcefn deploy<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>
fn deploy<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>
Deploy and configure the runtime
sourcefn start<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>
fn start<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>
Start the runtime
sourcefn run_command<'a>(
&mut self,
command: RunProcess,
mode: RuntimeMode,
ctx: &mut Context<Self>
) -> ProcessIdResponse<'a>
fn run_command<'a>(
&mut self,
command: RunProcess,
mode: RuntimeMode,
ctx: &mut Context<Self>
) -> ProcessIdResponse<'a>
Start a runtime command
Provided Methods§
sourcefn stop<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a>
fn stop<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a>
Stop the runtime
sourcefn kill_command<'a>(
&mut self,
_kill: KillProcess,
_ctx: &mut Context<Self>
) -> EmptyResponse<'a>
fn kill_command<'a>(
&mut self,
_kill: KillProcess,
_ctx: &mut Context<Self>
) -> EmptyResponse<'a>
Stop runtime command execution
sourcefn offer<'a>(&mut self, _ctx: &mut Context<Self>) -> OutputResponse<'a>
fn offer<'a>(&mut self, _ctx: &mut Context<Self>) -> OutputResponse<'a>
Output a market Offer template stub
sourcefn test<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a>
fn test<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a>
Perform a self-test
sourcefn join_network<'a>(
&mut self,
_network: CreateNetwork,
_ctx: &mut Context<Self>
) -> EndpointResponse<'a>
fn join_network<'a>(
&mut self,
_network: CreateNetwork,
_ctx: &mut Context<Self>
) -> EndpointResponse<'a>
Join a VPN network