pub struct SessionResourceIntegration { /* private fields */ }Expand description
Integration with session management
Implementations§
Source§impl SessionResourceIntegration
impl SessionResourceIntegration
Sourcepub fn new(monitor: Arc<ResourceMonitor>) -> Self
pub fn new(monitor: Arc<ResourceMonitor>) -> Self
Create a new session resource integration
Sourcepub async fn on_session_created(
&self,
session_id: &str,
agent_id: &str,
pid: Option<u32>,
) -> Result<()>
pub async fn on_session_created( &self, session_id: &str, agent_id: &str, pid: Option<u32>, ) -> Result<()>
Handle session creation - start monitoring
Sourcepub async fn on_session_terminated(
&self,
session_id: &str,
agent_id: &str,
) -> Result<()>
pub async fn on_session_terminated( &self, session_id: &str, agent_id: &str, ) -> Result<()>
Handle session termination - stop monitoring
Sourcepub async fn check_agent_suspension(&self, agent_id: &str) -> bool
pub async fn check_agent_suspension(&self, agent_id: &str) -> bool
Check if an agent should be suspended
Sourcepub async fn resume_agent(&self, agent_id: &str) -> Result<()>
pub async fn resume_agent(&self, agent_id: &str) -> Result<()>
Resume a suspended agent
Auto Trait Implementations§
impl Freeze for SessionResourceIntegration
impl RefUnwindSafe for SessionResourceIntegration
impl Send for SessionResourceIntegration
impl Sync for SessionResourceIntegration
impl Unpin for SessionResourceIntegration
impl UnsafeUnpin for SessionResourceIntegration
impl UnwindSafe for SessionResourceIntegration
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