pub struct Workflow {
pub uuid: String,
pub factory_name: String,
pub name: String,
pub state: i32,
pub data: Vec<u8>,
pub error: String,
pub start_time: i64,
pub end_time: i64,
pub create_time: i64,
}Expand description
Workflow is the persisted state of a long-running workflow.
Fields§
§uuid: Stringuuid is set when the workflow is created, and immutable after that.
factory_name: Stringfactory_name is set with the name of the factory that created the job (and can also restart it). It is set at creation time, and immutable after that.
name: Stringname is the display name of the workflow.
state: i32state describes the state of the job. A job is created as NotStarted, then the Workflow Manager picks it up and starts it, switching it to Running (and populating ‘start_time’). The workflow can then fail over to a new Workflow Manager is necessary, and still be in Running state. When done, it goes to Done, ‘end_time’ is populated, and ‘error’ is set if there was an error.
data: Vec<u8>data is workflow-specific stored data. It is usually a binary proto-encoded data structure. It can vary throughout the execution of the workflow. It will not change after the workflow is Done.
error: Stringerror is set if the job finished with an error. This field only makes sense if ‘state’ is Done.
start_time: i64start_time is set when the workflow manager starts a workflow for the first time. This field only makes sense if ‘state’ is Running or Done.
end_time: i64end_time is set when the workflow is finished. This field only makes sense if ‘state’ is Done.
create_time: i64create_time is set when the workflow is created.
Implementations§
Source§impl Workflow
impl Workflow
Sourcepub fn state(&self) -> WorkflowState
pub fn state(&self) -> WorkflowState
Returns the enum value of state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_state(&mut self, value: WorkflowState)
pub fn set_state(&mut self, value: WorkflowState)
Sets state to the provided enum value.
Trait Implementations§
Source§impl Message for Workflow
impl Message for Workflow
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.impl StructuralPartialEq for Workflow
Auto Trait Implementations§
impl Freeze for Workflow
impl RefUnwindSafe for Workflow
impl Send for Workflow
impl Sync for Workflow
impl Unpin for Workflow
impl UnwindSafe 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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