Skip to main content

Workflow

Struct Workflow 

Source
pub struct Workflow { /* private fields */ }
Expand description

Client for the gestalt.provider.v1.Workflow service.

Implementations§

Source§

impl Workflow

Source

pub fn new(channel: Channel) -> Self

Creates a client over an established channel.

Source

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.

Source

pub fn with_context(self, context: RequestContext) -> Self

Sets the default request context, injected into outgoing requests that do not carry one.

Source

pub async fn connect() -> Result<Self, GestaltError>

Connects to the workflow host service described by the environment.

Source

pub async fn connect_named(name: &str) -> Result<Self, GestaltError>

Connects to the named workflow host-service binding.

Source

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.

Source

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.

Source

pub async fn get_definition( &mut self, definition_id: String, ) -> Result<WorkflowDefinition, GestaltError>

Calls gestalt.provider.v1.Workflow.GetDefinition.

Source

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.

Source

pub async fn list_definitions( &mut self, request: ListWorkflowProviderDefinitionsRequest, ) -> Result<Vec<WorkflowDefinition>, GestaltError>

Calls gestalt.provider.v1.Workflow.ListDefinitions.

Source

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.

Source

pub async fn set_definition_paused( &mut self, definition_id: String, paused: bool, ) -> Result<WorkflowDefinition, GestaltError>

Calls gestalt.provider.v1.Workflow.SetDefinitionPaused.

Source

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.

Source

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.

Source

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.

Source

pub async fn delete_definition( &mut self, definition_id: String, ) -> Result<(), GestaltError>

Calls gestalt.provider.v1.Workflow.DeleteDefinition.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub async fn get_run( &mut self, run_id: String, ) -> Result<WorkflowRun, GestaltError>

Calls gestalt.provider.v1.Workflow.GetRun.

Source

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.

Source

pub async fn get_run_events( &mut self, run_id: String, ) -> Result<Vec<WorkflowRunEvent>, GestaltError>

Calls gestalt.provider.v1.Workflow.GetRunEvents.

Source

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.

Source

pub async fn get_run_output( &mut self, run_id: String, ) -> Result<Option<Value>, GestaltError>

Calls gestalt.provider.v1.Workflow.GetRunOutput.

Source

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.

Source

pub async fn cancel_run( &mut self, run_id: String, reason: String, ) -> Result<WorkflowRun, GestaltError>

Calls gestalt.provider.v1.Workflow.CancelRun.

Source

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.

Source

pub async fn signal_run( &mut self, run_id: String, signal: Option<WorkflowSignal>, ) -> Result<SignalWorkflowRunResponse, GestaltError>

Calls gestalt.provider.v1.Workflow.SignalRun.

Source

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.

Source

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.

Source

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.

Source

pub async fn deliver_event( &mut self, event: Option<WorkflowEvent>, options: WorkflowDeliverEventOptions, ) -> Result<WorkflowEvent, GestaltError>

Calls gestalt.provider.v1.Workflow.DeliverEvent.

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more