Skip to main content

RuntimeRunner

Trait RuntimeRunner 

pub trait RuntimeRunner:
    Send
    + Sync
    + 'static {
    // Required methods
    fn start<'a>(
        &'a self,
        runtime_id: &'a str,
        host_network: bool,
    ) -> RunnerFuture<'a, Result<(), RunnerError>>;
    fn stop<'a>(
        &'a self,
        runtime_id: &'a str,
    ) -> RunnerFuture<'a, Result<(), RunnerError>>;
    fn fetch_local_runtimes<'a>(&'a self) -> RunnerFuture<'a, Vec<String>>;
}
Expand description

Abstraction over the mechanism used to start and stop plugin runtimes.

Required Methods§

fn start<'a>( &'a self, runtime_id: &'a str, host_network: bool, ) -> RunnerFuture<'a, Result<(), RunnerError>>

Start the runtime with the given ID.

host_network is passed through from the runtime’s config; implementations that do not support network mode selection (e.g. process runner) should ignore it.

fn stop<'a>( &'a self, runtime_id: &'a str, ) -> RunnerFuture<'a, Result<(), RunnerError>>

Stop (and clean up) the runtime with the given ID.

fn fetch_local_runtimes<'a>(&'a self) -> RunnerFuture<'a, Vec<String>>

Returns the IDs of all locally-running runtimes managed by this runner.

Implementors§