pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new(base_url: impl Into<String>) -> Result<Self>
pub fn builder(base_url: impl Into<String>) -> ClientBuilder
pub async fn health(&self) -> Result<Value>
pub async fn cluster_info(&self) -> Result<Value>
pub async fn start_workflow<T: Serialize>( &self, workflow_type: &str, task_queue: &str, workflow_id: &str, input: T, ) -> Result<WorkflowHandle>
pub async fn signal_workflow<T: Serialize>( &self, workflow_id: &str, signal_name: &str, input: T, ) -> Result<Value>
Sourcepub async fn query_workflow<T: Serialize>(
&self,
workflow_id: &str,
query_name: &str,
input: T,
) -> Result<Value>
pub async fn query_workflow<T: Serialize>( &self, workflow_id: &str, query_name: &str, input: T, ) -> Result<Value>
Execute a named, read-only query against a running or completed workflow.
Arguments and results use the platform payload envelope. Server and
worker rejections are returned as Error::QueryFailed with a stable
reason, HTTP status, and original response body.
pub async fn describe_workflow( &self, workflow_id: &str, ) -> Result<WorkflowDescription>
pub async fn register_worker( &self, worker_id: &str, task_queue: &str, supported_workflow_types: Vec<String>, supported_activity_types: Vec<String>, max_concurrent_workflow_tasks: usize, max_concurrent_activity_tasks: usize, ) -> Result<RegisterWorkerResponse>
Sourcepub async fn register_worker_with_capabilities(
&self,
worker_id: &str,
task_queue: &str,
supported_workflow_types: Vec<String>,
supported_activity_types: Vec<String>,
max_concurrent_workflow_tasks: usize,
max_concurrent_activity_tasks: usize,
capabilities: Vec<String>,
) -> Result<RegisterWorkerResponse>
pub async fn register_worker_with_capabilities( &self, worker_id: &str, task_queue: &str, supported_workflow_types: Vec<String>, supported_activity_types: Vec<String>, max_concurrent_workflow_tasks: usize, max_concurrent_activity_tasks: usize, capabilities: Vec<String>, ) -> Result<RegisterWorkerResponse>
Register a worker and explicitly advertise additive worker capabilities.
Sourcepub async fn poll_query_task(
&self,
worker_id: &str,
task_queue: &str,
timeout: Duration,
) -> Result<Option<QueryTask>>
pub async fn poll_query_task( &self, worker_id: &str, task_queue: &str, timeout: Duration, ) -> Result<Option<QueryTask>>
Long-poll for an ephemeral, read-only workflow query task.
Sourcepub async fn complete_query_task(
&self,
query_task_id: &str,
lease_owner: &str,
query_task_attempt: u64,
result: Value,
codec: &str,
) -> Result<Value>
pub async fn complete_query_task( &self, query_task_id: &str, lease_owner: &str, query_task_attempt: u64, result: Value, codec: &str, ) -> Result<Value>
Complete a query task without appending workflow history.
Sourcepub async fn fail_query_task(
&self,
query_task_id: &str,
lease_owner: &str,
query_task_attempt: u64,
message: impl Into<String>,
reason: impl Into<String>,
failure_type: impl Into<String>,
) -> Result<Value>
pub async fn fail_query_task( &self, query_task_id: &str, lease_owner: &str, query_task_attempt: u64, message: impl Into<String>, reason: impl Into<String>, failure_type: impl Into<String>, ) -> Result<Value>
Report a stable machine-readable query-task failure.
pub async fn heartbeat_worker( &self, worker_id: &str, workflow_available: usize, activity_available: usize, ) -> Result<Value>
pub async fn poll_workflow_task( &self, worker_id: &str, task_queue: &str, timeout: Duration, ) -> Result<Option<WorkflowTask>>
pub async fn poll_workflow_task_response( &self, worker_id: &str, task_queue: &str, timeout: Duration, ) -> Result<PollWorkflowTaskResponse>
pub async fn complete_workflow_task( &self, task_id: &str, lease_owner: &str, workflow_task_attempt: u64, commands: Vec<Value>, ) -> Result<Value>
pub async fn fail_workflow_task( &self, task_id: &str, lease_owner: &str, workflow_task_attempt: u64, message: impl Into<String>, ) -> Result<Value>
pub async fn poll_activity_task( &self, worker_id: &str, task_queue: &str, timeout: Duration, ) -> Result<Option<ActivityTask>>
pub async fn complete_activity_task( &self, task_id: &str, activity_attempt_id: &str, lease_owner: &str, result: Value, codec: &str, ) -> Result<Value>
pub async fn fail_activity_task( &self, task_id: &str, activity_attempt_id: &str, lease_owner: &str, message: impl Into<String>, non_retryable: bool, ) -> Result<Value>
pub async fn heartbeat_activity_task( &self, task_id: &str, activity_attempt_id: &str, lease_owner: &str, details: Value, ) -> Result<ActivityHeartbeatResponse>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin 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