pub struct AgentServiceRepository { /* private fields */ }Implementations§
Source§impl AgentServiceRepository
impl AgentServiceRepository
pub const fn new(db_pool: DbPool) -> Self
pub async fn register_agent( &self, name: &str, pid: u32, port: u16, ) -> Result<String, RepositoryError>
pub async fn register_agent_starting( &self, name: &str, pid: u32, port: u16, ) -> Result<String, RepositoryError>
pub async fn mark_running( &self, agent_name: &str, ) -> Result<(), RepositoryError>
pub async fn get_agent_status( &self, agent_name: &str, ) -> Result<Option<AgentServiceRow>, RepositoryError>
pub async fn mark_crashed( &self, agent_name: &str, ) -> Result<(), RepositoryError>
pub async fn mark_stopped( &self, agent_name: &str, ) -> Result<(), RepositoryError>
pub async fn mark_error(&self, agent_name: &str) -> Result<(), RepositoryError>
pub async fn list_running_agents( &self, ) -> Result<Vec<AgentServerIdRow>, RepositoryError>
pub async fn list_running_agent_pids( &self, ) -> Result<Vec<AgentServerIdPidRow>, RepositoryError>
pub async fn remove_agent_service( &self, agent_name: &str, ) -> Result<(), RepositoryError>
pub async fn update_health_status( &self, agent_name: &str, health_status: &str, ) -> Result<(), RepositoryError>
Trait Implementations§
Source§impl Clone for AgentServiceRepository
impl Clone for AgentServiceRepository
Source§fn clone(&self) -> AgentServiceRepository
fn clone(&self) -> AgentServiceRepository
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentServiceRepository
impl Debug for AgentServiceRepository
Auto Trait Implementations§
impl Freeze for AgentServiceRepository
impl !RefUnwindSafe for AgentServiceRepository
impl Send for AgentServiceRepository
impl Sync for AgentServiceRepository
impl Unpin for AgentServiceRepository
impl !UnwindSafe for AgentServiceRepository
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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