pub struct Orchestrator { /* private fields */ }Implementations§
Source§impl Orchestrator
impl Orchestrator
pub fn new(config: Config, api: Api, sessions: SessionService) -> Self
pub fn api(&self) -> &Api
pub fn writer(&self) -> &Arc<Mutex<()>>
pub async fn run(self: Arc<Self>) -> Result<()>
pub async fn initialize_until_ready(&self)
pub fn runtime(&self) -> Result<&SessionRuntime>
pub async fn open_session( &self, runtime: SessionRuntime, options: SessionOptions, restored: Option<&Value>, ) -> Result<Session>
pub async fn pending_stop( &self, session_id: &str, ) -> Result<Option<SessionStopRequest>>
pub async fn complete_pending_stop( &self, session_id: &str, outcome: Value, ) -> Result<()>
pub async fn operation_is_active(&self, session_id: &str) -> bool
pub async fn register_operation(&self, session_id: &str, operation_id: Uuid)
pub async fn remove_operation(&self, session_id: &str, operation_id: Uuid)
pub async fn run_session_turn<C, F>( &self, session_id: &str, session: &mut Session, operation_id: Uuid, checkpoint: C, ) -> Result<TurnCompletion>
pub async fn list_history(&self) -> Result<Vec<SessionRecord>>
pub async fn conversation_lock(&self, id: &str) -> Arc<Mutex<()>>
pub async fn session_for_record( &self, record: &SessionRecord, ) -> Result<Session>
pub async fn close_conversation( &self, record: &Arc<Mutex<SessionRecord>>, session: &Session, ) -> Result<()>
pub async fn request_conversation_ingress( &self, record: &Arc<Mutex<SessionRecord>>, state: Option<Value>, ) -> Result<()>
pub async fn get_conversation(&self, id: &str) -> Result<SessionRecord>
pub async fn get_listed_conversation( &self, id: &str, ) -> Result<Option<SessionRecord>>
Auto Trait Implementations§
impl !Freeze for Orchestrator
impl !RefUnwindSafe for Orchestrator
impl !UnwindSafe for Orchestrator
impl Send for Orchestrator
impl Sync for Orchestrator
impl Unpin for Orchestrator
impl UnsafeUnpin for Orchestrator
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Erasable for T
impl<T> Erasable for T
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