pub struct BotLifecycleService<B, C>where
B: BotRepository,
C: ConfigRepository,{ /* private fields */ }Implementations§
Source§impl<B, C> BotLifecycleService<B, C>where
B: BotRepository,
C: ConfigRepository,
impl<B, C> BotLifecycleService<B, C>where
B: BotRepository,
C: ConfigRepository,
pub fn new(bot_repo: Arc<B>, config_repo: Arc<C>) -> Self
pub async fn get_bot(&self, bot_id: Uuid) -> Result<Bot, LifecycleError>
pub async fn get_bot_with_token( &self, bot_id: Uuid, token: &str, ) -> Result<Bot, LifecycleError>
Sourcepub async fn list_account_bots(
&self,
account_id: Uuid,
limit: i64,
offset: i64,
) -> Result<Vec<Bot>, LifecycleError>
pub async fn list_account_bots( &self, account_id: Uuid, limit: i64, offset: i64, ) -> Result<Vec<Bot>, LifecycleError>
PERF-002: List bots with pagination support
- limit: Maximum number of bots to return
- offset: Number of bots to skip
pub async fn create_bot_config( &self, bot_id: Uuid, config: StoredBotConfig, ) -> Result<StoredBotConfig, LifecycleError>
pub async fn acknowledge_config( &self, bot_id: Uuid, config_id: Uuid, ) -> Result<(), LifecycleError>
pub async fn get_desired_config( &self, bot_id: Uuid, ) -> Result<Option<StoredBotConfig>, LifecycleError>
pub async fn record_heartbeat(&self, bot_id: Uuid) -> Result<(), LifecycleError>
Sourcepub async fn check_stale_bots(
&self,
heartbeat_timeout: Duration,
) -> Result<Vec<Bot>, LifecycleError>
pub async fn check_stale_bots( &self, heartbeat_timeout: Duration, ) -> Result<Vec<Bot>, LifecycleError>
Check for bots with stale heartbeats and mark them as Error (HIGH-001)
Auto Trait Implementations§
impl<B, C> Freeze for BotLifecycleService<B, C>
impl<B, C> RefUnwindSafe for BotLifecycleService<B, C>where
B: RefUnwindSafe,
C: RefUnwindSafe,
impl<B, C> Send for BotLifecycleService<B, C>
impl<B, C> Sync for BotLifecycleService<B, C>
impl<B, C> Unpin for BotLifecycleService<B, C>
impl<B, C> UnwindSafe for BotLifecycleService<B, C>where
B: RefUnwindSafe,
C: RefUnwindSafe,
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