зеркало из https://github.com/github/vitess-gh.git
61 строка
2.0 KiB
Protocol Buffer
61 строка
2.0 KiB
Protocol Buffer
// This file contains the Vitess workflow management related data
|
|
// structures. They are used to store / retrieve state from topology
|
|
// server.
|
|
|
|
syntax = "proto3";
|
|
|
|
package workflow;
|
|
|
|
// WorkflowState describes the state of a workflow.
|
|
// This constant should match the Node object described in
|
|
// web/vtctld2/src/app/workflows/node.ts as it is exposed as JSON to
|
|
// the Angular 2 web app.
|
|
enum WorkflowState {
|
|
NotStarted = 0;
|
|
Running = 1;
|
|
Done = 2;
|
|
}
|
|
|
|
// Workflow is the persisted state of a long-running workflow.
|
|
message Workflow {
|
|
// uuid is set when the workflow is created, and immutable after
|
|
// that.
|
|
string uuid = 1;
|
|
|
|
// factory_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.
|
|
string factory_name = 2;
|
|
|
|
// name is the display name of the workflow.
|
|
string name = 3;
|
|
|
|
// state 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.
|
|
WorkflowState state = 4;
|
|
|
|
// 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.
|
|
bytes data = 5;
|
|
|
|
// error is set if the job finished with an error. This field only
|
|
// makes sense if 'state' is Done.
|
|
string error = 6;
|
|
|
|
// start_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.
|
|
int64 start_time = 7;
|
|
|
|
// end_time is set when the workflow is finished.
|
|
// This field only makes sense if 'state' is Done.
|
|
int64 end_time = 8;
|
|
}
|