pub struct Workflow { /* private fields */ }Expand description
Client for the gestalt.provider.v1.Workflow service.
Implementations§
Source§impl Workflow
impl Workflow
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Sets a deadline applied to every unary call; calls that run past it fail with DEADLINE_EXCEEDED. Streaming calls are unaffected.
Sourcepub fn with_context(self, context: RequestContext) -> Self
pub fn with_context(self, context: RequestContext) -> Self
Sets the default request context, injected into outgoing requests that do not carry one.
Sourcepub async fn connect() -> Result<Self, GestaltError>
pub async fn connect() -> Result<Self, GestaltError>
Connects to the workflow host service described by the environment.
Sourcepub async fn connect_named(name: &str) -> Result<Self, GestaltError>
pub async fn connect_named(name: &str) -> Result<Self, GestaltError>
Connects to the named workflow host-service binding.
Sourcepub async fn apply_definition(
&mut self,
provider_name: String,
idempotency_key: String,
spec: Option<WorkflowDefinitionSpec>,
) -> Result<WorkflowDefinition, GestaltError>
pub async fn apply_definition( &mut self, provider_name: String, idempotency_key: String, spec: Option<WorkflowDefinitionSpec>, ) -> Result<WorkflowDefinition, GestaltError>
Calls gestalt.provider.v1.Workflow.ApplyDefinition.
Sourcepub async fn apply_definition_raw(
&mut self,
request: ApplyWorkflowProviderDefinitionRequest,
) -> Result<WorkflowDefinition, GestaltError>
pub async fn apply_definition_raw( &mut self, request: ApplyWorkflowProviderDefinitionRequest, ) -> Result<WorkflowDefinition, GestaltError>
Calls gestalt.provider.v1.Workflow.ApplyDefinition with the full request and response messages.
Sourcepub async fn get_definition(
&mut self,
definition_id: String,
) -> Result<WorkflowDefinition, GestaltError>
pub async fn get_definition( &mut self, definition_id: String, ) -> Result<WorkflowDefinition, GestaltError>
Calls gestalt.provider.v1.Workflow.GetDefinition.
Sourcepub async fn get_definition_raw(
&mut self,
request: GetWorkflowProviderDefinitionRequest,
) -> Result<WorkflowDefinition, GestaltError>
pub async fn get_definition_raw( &mut self, request: GetWorkflowProviderDefinitionRequest, ) -> Result<WorkflowDefinition, GestaltError>
Calls gestalt.provider.v1.Workflow.GetDefinition with the full request and response messages.
Sourcepub async fn list_definitions(
&mut self,
request: ListWorkflowProviderDefinitionsRequest,
) -> Result<Vec<WorkflowDefinition>, GestaltError>
pub async fn list_definitions( &mut self, request: ListWorkflowProviderDefinitionsRequest, ) -> Result<Vec<WorkflowDefinition>, GestaltError>
Calls gestalt.provider.v1.Workflow.ListDefinitions.
Sourcepub async fn list_definitions_raw(
&mut self,
request: ListWorkflowProviderDefinitionsRequest,
) -> Result<ListWorkflowProviderDefinitionsResponse, GestaltError>
pub async fn list_definitions_raw( &mut self, request: ListWorkflowProviderDefinitionsRequest, ) -> Result<ListWorkflowProviderDefinitionsResponse, GestaltError>
Calls gestalt.provider.v1.Workflow.ListDefinitions with the full request and response messages.
Sourcepub async fn set_definition_paused(
&mut self,
definition_id: String,
paused: bool,
) -> Result<WorkflowDefinition, GestaltError>
pub async fn set_definition_paused( &mut self, definition_id: String, paused: bool, ) -> Result<WorkflowDefinition, GestaltError>
Calls gestalt.provider.v1.Workflow.SetDefinitionPaused.
Sourcepub async fn set_definition_paused_raw(
&mut self,
request: SetWorkflowProviderDefinitionPausedRequest,
) -> Result<WorkflowDefinition, GestaltError>
pub async fn set_definition_paused_raw( &mut self, request: SetWorkflowProviderDefinitionPausedRequest, ) -> Result<WorkflowDefinition, GestaltError>
Calls gestalt.provider.v1.Workflow.SetDefinitionPaused with the full request and response messages.
Sourcepub async fn set_activation_paused(
&mut self,
definition_id: String,
activation_id: String,
paused: bool,
) -> Result<WorkflowDefinition, GestaltError>
pub async fn set_activation_paused( &mut self, definition_id: String, activation_id: String, paused: bool, ) -> Result<WorkflowDefinition, GestaltError>
Calls gestalt.provider.v1.Workflow.SetActivationPaused.
Sourcepub async fn set_activation_paused_raw(
&mut self,
request: SetWorkflowProviderActivationPausedRequest,
) -> Result<WorkflowDefinition, GestaltError>
pub async fn set_activation_paused_raw( &mut self, request: SetWorkflowProviderActivationPausedRequest, ) -> Result<WorkflowDefinition, GestaltError>
Calls gestalt.provider.v1.Workflow.SetActivationPaused with the full request and response messages.
Sourcepub async fn delete_definition(
&mut self,
definition_id: String,
) -> Result<(), GestaltError>
pub async fn delete_definition( &mut self, definition_id: String, ) -> Result<(), GestaltError>
Calls gestalt.provider.v1.Workflow.DeleteDefinition.
Sourcepub async fn delete_definition_raw(
&mut self,
request: DeleteWorkflowProviderDefinitionRequest,
) -> Result<(), GestaltError>
pub async fn delete_definition_raw( &mut self, request: DeleteWorkflowProviderDefinitionRequest, ) -> Result<(), GestaltError>
Calls gestalt.provider.v1.Workflow.DeleteDefinition with the full request and response messages.
Sourcepub async fn start_run(
&mut self,
idempotency_key: String,
workflow_key: String,
provider_name: String,
definition_id: String,
expected_definition_generation: i64,
run_as: Option<SubjectContext>,
input: Option<Map<String, Value>>,
) -> Result<WorkflowRun, GestaltError>
pub async fn start_run( &mut self, idempotency_key: String, workflow_key: String, provider_name: String, definition_id: String, expected_definition_generation: i64, run_as: Option<SubjectContext>, input: Option<Map<String, Value>>, ) -> Result<WorkflowRun, GestaltError>
Calls gestalt.provider.v1.Workflow.StartRun.
Sourcepub async fn start_run_raw(
&mut self,
request: StartWorkflowProviderRunRequest,
) -> Result<WorkflowRun, GestaltError>
pub async fn start_run_raw( &mut self, request: StartWorkflowProviderRunRequest, ) -> Result<WorkflowRun, GestaltError>
Calls gestalt.provider.v1.Workflow.StartRun with the full request and response messages.
Sourcepub async fn list_runs(
&mut self,
page_size: i32,
page_token: String,
status: WorkflowRunStatus,
target_app: String,
) -> Result<ListWorkflowProviderRunsResponse, GestaltError>
pub async fn list_runs( &mut self, page_size: i32, page_token: String, status: WorkflowRunStatus, target_app: String, ) -> Result<ListWorkflowProviderRunsResponse, GestaltError>
Calls gestalt.provider.v1.Workflow.ListRuns.
Sourcepub async fn list_runs_raw(
&mut self,
request: ListWorkflowProviderRunsRequest,
) -> Result<ListWorkflowProviderRunsResponse, GestaltError>
pub async fn list_runs_raw( &mut self, request: ListWorkflowProviderRunsRequest, ) -> Result<ListWorkflowProviderRunsResponse, GestaltError>
Calls gestalt.provider.v1.Workflow.ListRuns with the full request and response messages.
Sourcepub async fn get_run(
&mut self,
run_id: String,
) -> Result<WorkflowRun, GestaltError>
pub async fn get_run( &mut self, run_id: String, ) -> Result<WorkflowRun, GestaltError>
Calls gestalt.provider.v1.Workflow.GetRun.
Sourcepub async fn get_run_raw(
&mut self,
request: GetWorkflowProviderRunRequest,
) -> Result<WorkflowRun, GestaltError>
pub async fn get_run_raw( &mut self, request: GetWorkflowProviderRunRequest, ) -> Result<WorkflowRun, GestaltError>
Calls gestalt.provider.v1.Workflow.GetRun with the full request and response messages.
Sourcepub async fn get_run_events(
&mut self,
run_id: String,
) -> Result<Vec<WorkflowRunEvent>, GestaltError>
pub async fn get_run_events( &mut self, run_id: String, ) -> Result<Vec<WorkflowRunEvent>, GestaltError>
Calls gestalt.provider.v1.Workflow.GetRunEvents.
Sourcepub async fn get_run_events_raw(
&mut self,
request: GetWorkflowProviderRunEventsRequest,
) -> Result<GetWorkflowProviderRunEventsResponse, GestaltError>
pub async fn get_run_events_raw( &mut self, request: GetWorkflowProviderRunEventsRequest, ) -> Result<GetWorkflowProviderRunEventsResponse, GestaltError>
Calls gestalt.provider.v1.Workflow.GetRunEvents with the full request and response messages.
Sourcepub async fn get_run_output(
&mut self,
run_id: String,
) -> Result<Option<Value>, GestaltError>
pub async fn get_run_output( &mut self, run_id: String, ) -> Result<Option<Value>, GestaltError>
Calls gestalt.provider.v1.Workflow.GetRunOutput.
Sourcepub async fn get_run_output_raw(
&mut self,
request: GetWorkflowProviderRunOutputRequest,
) -> Result<GetWorkflowProviderRunOutputResponse, GestaltError>
pub async fn get_run_output_raw( &mut self, request: GetWorkflowProviderRunOutputRequest, ) -> Result<GetWorkflowProviderRunOutputResponse, GestaltError>
Calls gestalt.provider.v1.Workflow.GetRunOutput with the full request and response messages.
Sourcepub async fn cancel_run(
&mut self,
run_id: String,
reason: String,
) -> Result<WorkflowRun, GestaltError>
pub async fn cancel_run( &mut self, run_id: String, reason: String, ) -> Result<WorkflowRun, GestaltError>
Calls gestalt.provider.v1.Workflow.CancelRun.
Sourcepub async fn cancel_run_raw(
&mut self,
request: CancelWorkflowProviderRunRequest,
) -> Result<WorkflowRun, GestaltError>
pub async fn cancel_run_raw( &mut self, request: CancelWorkflowProviderRunRequest, ) -> Result<WorkflowRun, GestaltError>
Calls gestalt.provider.v1.Workflow.CancelRun with the full request and response messages.
Sourcepub async fn signal_run(
&mut self,
run_id: String,
signal: Option<WorkflowSignal>,
) -> Result<SignalWorkflowRunResponse, GestaltError>
pub async fn signal_run( &mut self, run_id: String, signal: Option<WorkflowSignal>, ) -> Result<SignalWorkflowRunResponse, GestaltError>
Calls gestalt.provider.v1.Workflow.SignalRun.
Sourcepub async fn signal_run_raw(
&mut self,
request: SignalWorkflowProviderRunRequest,
) -> Result<SignalWorkflowRunResponse, GestaltError>
pub async fn signal_run_raw( &mut self, request: SignalWorkflowProviderRunRequest, ) -> Result<SignalWorkflowRunResponse, GestaltError>
Calls gestalt.provider.v1.Workflow.SignalRun with the full request and response messages.
Sourcepub async fn signal_or_start_run(
&mut self,
workflow_key: String,
idempotency_key: String,
provider_name: String,
definition_id: String,
expected_definition_generation: i64,
signal: Option<WorkflowSignal>,
run_as: Option<SubjectContext>,
input: Option<Map<String, Value>>,
) -> Result<SignalWorkflowRunResponse, GestaltError>
pub async fn signal_or_start_run( &mut self, workflow_key: String, idempotency_key: String, provider_name: String, definition_id: String, expected_definition_generation: i64, signal: Option<WorkflowSignal>, run_as: Option<SubjectContext>, input: Option<Map<String, Value>>, ) -> Result<SignalWorkflowRunResponse, GestaltError>
Calls gestalt.provider.v1.Workflow.SignalOrStartRun.
Sourcepub async fn signal_or_start_run_raw(
&mut self,
request: SignalOrStartWorkflowProviderRunRequest,
) -> Result<SignalWorkflowRunResponse, GestaltError>
pub async fn signal_or_start_run_raw( &mut self, request: SignalOrStartWorkflowProviderRunRequest, ) -> Result<SignalWorkflowRunResponse, GestaltError>
Calls gestalt.provider.v1.Workflow.SignalOrStartRun with the full request and response messages.
Sourcepub async fn deliver_event(
&mut self,
event: Option<WorkflowEvent>,
options: WorkflowDeliverEventOptions,
) -> Result<WorkflowEvent, GestaltError>
pub async fn deliver_event( &mut self, event: Option<WorkflowEvent>, options: WorkflowDeliverEventOptions, ) -> Result<WorkflowEvent, GestaltError>
Calls gestalt.provider.v1.Workflow.DeliverEvent.
Sourcepub async fn deliver_event_raw(
&mut self,
request: DeliverWorkflowProviderEventRequest,
) -> Result<WorkflowEvent, GestaltError>
pub async fn deliver_event_raw( &mut self, request: DeliverWorkflowProviderEventRequest, ) -> Result<WorkflowEvent, GestaltError>
Calls gestalt.provider.v1.Workflow.DeliverEvent with the full request and response messages.
Auto Trait Implementations§
impl !Freeze for Workflow
impl !RefUnwindSafe for Workflow
impl !UnwindSafe for Workflow
impl Send for Workflow
impl Sync for Workflow
impl Unpin for Workflow
impl UnsafeUnpin for Workflow
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
T in a tonic::Request