pub struct Client { /* private fields */ }
Expand description
Represents the Durable Functions HTTP client.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(status_query_url: &str) -> Self
pub fn new(status_query_url: &str) -> Self
Creates a new client from the given status query URL.
Sourcepub async fn instance_status(
&self,
instance_id: &str,
show_history: bool,
show_history_output: bool,
show_input: bool,
) -> Result<OrchestrationStatus>
pub async fn instance_status( &self, instance_id: &str, show_history: bool, show_history_output: bool, show_input: bool, ) -> Result<OrchestrationStatus>
Gets the status of an orchestration instance.
Sourcepub async fn query_instances<I>(
&self,
created_time_from: Option<DateTime<Utc>>,
created_time_to: Option<DateTime<Utc>>,
runtime_statuses: Option<I>,
top: Option<u32>,
show_history: bool,
show_history_output: bool,
show_input: bool,
) -> Result<Vec<OrchestrationStatus>>where
I: Iterator<Item = OrchestrationRuntimeStatus>,
pub async fn query_instances<I>(
&self,
created_time_from: Option<DateTime<Utc>>,
created_time_to: Option<DateTime<Utc>>,
runtime_statuses: Option<I>,
top: Option<u32>,
show_history: bool,
show_history_output: bool,
show_input: bool,
) -> Result<Vec<OrchestrationStatus>>where
I: Iterator<Item = OrchestrationRuntimeStatus>,
Queries the status for instances in a given date range or with runtime status.
Sourcepub async fn purge_history(&self, instance_id: &str) -> Result<()>
pub async fn purge_history(&self, instance_id: &str) -> Result<()>
Purges the history of the given orchestration instance.
Sourcepub async fn purge_history_by_query<I>(
&self,
created_time_from: Option<DateTime<Utc>>,
created_time_to: Option<DateTime<Utc>>,
runtime_statuses: Option<I>,
) -> Result<u32>where
I: Iterator<Item = OrchestrationRuntimeStatus>,
pub async fn purge_history_by_query<I>(
&self,
created_time_from: Option<DateTime<Utc>>,
created_time_to: Option<DateTime<Utc>>,
runtime_statuses: Option<I>,
) -> Result<u32>where
I: Iterator<Item = OrchestrationRuntimeStatus>,
Purges the history of orchestrations matching the given date range or runtime statuses.
Sourcepub async fn raise_event<D>(
&self,
instance_id: &str,
event_name: &str,
event_data: D,
) -> Result<()>
pub async fn raise_event<D>( &self, instance_id: &str, event_name: &str, event_data: D, ) -> Result<()>
Raises an event for the given orchestration instance.
Sourcepub async fn rewind(&self, instance_id: &str, reason: &str) -> Result<()>
pub async fn rewind(&self, instance_id: &str, reason: &str) -> Result<()>
Restores a failed orchestration instance into a running state by replaying the most recent failed operations.
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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