pub struct SessionManager { /* private fields */ }Expand description
In-memory runtime run coordinator (not persistent session storage).
Implementations§
Source§impl SessionManager
impl SessionManager
pub fn new() -> Self
pub async fn state(&self, session_id: Uuid) -> SessionRuntimeState
pub async fn active_run_id(&self, session_id: Uuid) -> Option<Uuid>
pub async fn running_runs(&self) -> Vec<(Uuid, Uuid)>
pub async fn start_run<F, Fut>( &self, session_id: Uuid, spawn_actor: F, ) -> Result<Uuid, SessionManagerError>
pub async fn mark_run_finished( &self, session_id: Uuid, run_id: Uuid, outcome: Result<(), String>, ) -> Result<(), SessionManagerError>
pub async fn send_command( &self, session_id: Uuid, run_id: Uuid, command: AgentCommand, ) -> Result<(), SessionManagerError>
pub async fn cancel_run( &self, session_id: Uuid, run_id: Uuid, ) -> Result<(), SessionManagerError>
Trait Implementations§
Source§impl Clone for SessionManager
impl Clone for SessionManager
Source§fn clone(&self) -> SessionManager
fn clone(&self) -> SessionManager
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 Default for SessionManager
impl Default for SessionManager
Source§fn default() -> SessionManager
fn default() -> SessionManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SessionManager
impl !RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin for SessionManager
impl !UnwindSafe for SessionManager
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request