pub struct DefaultLifecycleController { /* private fields */ }Expand description
Default implementation of the lifecycle controller
Implementations§
Source§impl DefaultLifecycleController
impl DefaultLifecycleController
Sourcepub async fn new(config: LifecycleConfig) -> Result<Self, LifecycleError>
pub async fn new(config: LifecycleConfig) -> Result<Self, LifecycleError>
Create a new lifecycle controller
Trait Implementations§
Source§impl LifecycleController for DefaultLifecycleController
impl LifecycleController for DefaultLifecycleController
Source§fn initialize_agent<'life0, 'async_trait>(
&'life0 self,
config: AgentConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentId, LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize_agent<'life0, 'async_trait>(
&'life0 self,
config: AgentConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentId, LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize a new agent
Source§fn start_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start an agent
Source§fn suspend_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn suspend_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Suspend an agent
Source§fn resume_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn resume_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Resume a suspended agent
Source§fn terminate_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn terminate_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Terminate an agent
Source§fn get_agent_state<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<AgentState, LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_agent_state<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<AgentState, LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get agent state
Source§fn get_agents_by_state<'life0, 'async_trait>(
&'life0 self,
state: AgentState,
) -> Pin<Box<dyn Future<Output = Vec<AgentId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_agents_by_state<'life0, 'async_trait>(
&'life0 self,
state: AgentState,
) -> Pin<Box<dyn Future<Output = Vec<AgentId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all agents in a specific state
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shutdown the lifecycle controller
Source§fn check_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ComponentHealth, LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ComponentHealth, LifecycleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check the health of the lifecycle controller
Auto Trait Implementations§
impl Freeze for DefaultLifecycleController
impl !RefUnwindSafe for DefaultLifecycleController
impl Send for DefaultLifecycleController
impl Sync for DefaultLifecycleController
impl Unpin for DefaultLifecycleController
impl !UnwindSafe for DefaultLifecycleController
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more