pub trait LifecycleController {
// Required methods
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 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 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 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 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 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_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 shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), 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;
}Expand description
Agent lifecycle controller trait
Required Methods§
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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