[−][src]Struct ipc_orchestrator::Orchestrator
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]
LF: Future<Output = Result<()>>,
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:
- Start IpcOneShotServer and provide server name to process via
commandline argument
--orchestrator-ch
- cmd.kill_on_drop(true) - process will exit if orchestrator's handle is dropped
- cmd.stdout(Stdio::piped()) - stdout will be logged as info!(target: &name, ...)
pub async fn connect(
self
) -> Result<ConnectedOrchestrator<Fuse<TryJoinAll<LF>>>>
[src]
self
) -> Result<ConnectedOrchestrator<Fuse<TryJoinAll<LF>>>>
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,
LF: Unpin,
impl<LF> !UnwindSafe for Orchestrator<LF>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,