pub struct AgentDatabaseService {
pub repository: AgentServiceRepository,
pub registry: AgentRegistry,
}Fields§
§repository: AgentServiceRepository§registry: AgentRegistryImplementations§
Source§impl AgentDatabaseService
impl AgentDatabaseService
pub async fn new( repository: AgentServiceRepository, ) -> OrchestrationResult<Self>
pub async fn register_agent( &self, name: &str, pid: u32, port: u16, ) -> OrchestrationResult<String>
pub async fn get_status( &self, agent_name: &str, ) -> OrchestrationResult<AgentStatus>
pub async fn mark_failed( &self, agent_name: &str, _reason: &str, ) -> OrchestrationResult<()>
pub async fn mark_crashed(&self, agent_name: &str) -> OrchestrationResult<()>
pub async fn get_error_message( &self, agent_name: &str, ) -> OrchestrationResult<String>
pub async fn mark_error(&self, agent_name: &str) -> OrchestrationResult<()>
pub async fn list_running_agents(&self) -> OrchestrationResult<Vec<String>>
pub async fn list_all_agents( &self, ) -> OrchestrationResult<Vec<(String, AgentStatus)>>
pub async fn agent_exists(&self, agent_name: &str) -> OrchestrationResult<bool>
pub async fn get_agent_config( &self, agent_name: &str, ) -> OrchestrationResult<AgentConfig>
pub async fn cleanup_orphaned_services(&self) -> OrchestrationResult<u64>
pub async fn remove_agent_service( &self, agent_name: &str, ) -> OrchestrationResult<()>
pub async fn update_health_status( &self, agent_name: &str, health_status: &str, ) -> OrchestrationResult<()>
pub async fn update_agent_running( &self, agent_name: &str, pid: u32, port: u16, ) -> OrchestrationResult<String>
pub async fn update_agent_stopped( &self, agent_name: &str, ) -> OrchestrationResult<()>
pub async fn register_agent_starting( &self, agent_name: &str, pid: u32, port: u16, ) -> OrchestrationResult<String>
pub async fn mark_running(&self, agent_name: &str) -> OrchestrationResult<()>
pub async fn get_unresponsive_agents( &self, _max_failures: u32, ) -> OrchestrationResult<Vec<(String, Option<u32>)>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentDatabaseService
impl !RefUnwindSafe for AgentDatabaseService
impl Send for AgentDatabaseService
impl Sync for AgentDatabaseService
impl Unpin for AgentDatabaseService
impl !UnwindSafe for AgentDatabaseService
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