pub struct ProcessRegistry { /* private fields */ }Implementations§
Source§impl ProcessRegistry
impl ProcessRegistry
pub fn new(config: ProcessRegistryConfig) -> Self
pub fn subscribe(&self) -> Receiver<RoderEvent>
pub async fn register( &self, process: ProcessDescriptor, stopper: Option<Arc<dyn ProcessStopper>>, ) -> Result<ProcessDescriptor>
pub async fn list(&self, include_completed: bool) -> Vec<ProcessDescriptor>
pub async fn get(&self, process_id: &str) -> Option<ProcessDescriptor>
pub async fn output(&self, process_id: &str) -> Vec<ProcessOutput>
pub async fn output_for_task(&self, task_id: &str) -> Vec<ProcessOutput>
pub async fn append_output(&self, output: ProcessOutput) -> Result<()>
pub async fn mark_exited( &self, process_id: &str, exit_code: Option<i32>, ) -> Result<()>
pub async fn mark_failed(&self, process_id: &str, error: String) -> Result<()>
pub async fn mark_stopped( &self, process_id: &str, reason: Option<String>, ) -> Result<()>
pub async fn stop( &self, process_id: &str, reason: Option<String>, ) -> Result<ProcessStopResult>
pub async fn stop_all(&self, reason: Option<String>) -> Vec<ProcessStopResult>
pub async fn append_task_output( &self, task_id: &str, stream: TaskOutputStream, chunk: String, dropped_bytes: u64, thread_id: Option<String>, turn_id: Option<String>, ) -> Result<()>
Trait Implementations§
Source§impl Clone for ProcessRegistry
impl Clone for ProcessRegistry
Source§fn clone(&self) -> ProcessRegistry
fn clone(&self) -> ProcessRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ProcessRegistry
impl Default for ProcessRegistry
Source§impl ProcessRegistrySink for ProcessRegistry
impl ProcessRegistrySink for ProcessRegistry
fn register_process<'life0, 'async_trait>(
&'life0 self,
process: ProcessDescriptor,
stopper: Option<Arc<dyn ProcessStopper>>,
) -> Pin<Box<dyn Future<Output = Result<ProcessDescriptor>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append_process_output<'life0, 'async_trait>(
&'life0 self,
output: ProcessOutput,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_process_exited<'life0, 'life1, 'async_trait>(
&'life0 self,
process_id: &'life1 str,
exit_code: Option<i32>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_process_failed<'life0, 'life1, 'async_trait>(
&'life0 self,
process_id: &'life1 str,
error: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_process_stopped<'life0, 'life1, 'async_trait>(
&'life0 self,
process_id: &'life1 str,
reason: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for ProcessRegistry
impl !UnwindSafe for ProcessRegistry
impl Freeze for ProcessRegistry
impl Send for ProcessRegistry
impl Sync for ProcessRegistry
impl Unpin for ProcessRegistry
impl UnsafeUnpin for ProcessRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more