[][src]Struct ipc_orchestrator::Orchestrator

pub struct Orchestrator<LF: TryFuture> {
    pub processes: HashMap<String, Process>,
    // some fields omitted
}

Orchestrator which is in progress of starting up

Fields

processes: HashMap<String, Process>

Methods

impl<LF: TryFuture> Orchestrator<LF>[src]

pub fn from_handlers(logger: fn(_: ChildStdout, _: String) -> LF) -> Self[src]

Create orchestrator with provided log handler

Log handler is a function: fn(ChildStdout, String) -> impl TryFuture Provided future should process ChildStdout until eof, returning with anyhow::Result<()>

impl<LF> Orchestrator<LF> where
    LF: Future<Output = Result<()>>, 
[src]

pub fn start(&mut self, name: &str, cmd: &mut Command) -> Result<()>[src]

Start provided command with communication channel As opinionated executor for all the processes Orchestrator provides following setup:

  1. Start IpcOneShotServer and provide server name to process via commandline argument --orchestrator-ch
  2. cmd.kill_on_drop(true) - process will exit if orchestrator's handle is dropped
  3. cmd.stdout(Stdio::piped()) - stdout will be logged as info!(target: &name, ...)

pub async fn connect(
    self
) -> Result<ConnectedOrchestrator<Fuse<TryJoinAll<LF>>>>
[src]

Connect to processes IPC channels Resulting ConnectedOrchestrator can be used to further setup handlers over processes bridges

impl<LF: TryFuture> Orchestrator<LF>[src]

pub fn ipc(self, ipc: bool) -> Self[src]

Setup IPC channel Will pass IpcOneShotServer name via --orchestrator-ch

pub fn rust_backtrace(self, backtrace: bool) -> Self[src]

Start child process with RUST_BACKTRACE=1 env option

Auto Trait Implementations

impl<LF> !RefUnwindSafe for Orchestrator<LF>

impl<LF> !Send for Orchestrator<LF>

impl<LF> !Sync for Orchestrator<LF>

impl<LF> Unpin for Orchestrator<LF> where
    LF: Unpin

impl<LF> !UnwindSafe for Orchestrator<LF>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,