Documentation ¶
Index ¶
- Variables
- type Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetAttributes() map[string]string
- func (x *Task) GetError() string
- func (x *Task) GetId() string
- func (x *Task) GetState() TaskState
- func (m *Task) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Task) MarshalToVT(dAtA []byte) (int, error)
- func (m *Task) MarshalVT() (dAtA []byte, err error)
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (m *Task) SizeVT() (n int)
- func (x *Task) String() string
- func (m *Task) UnmarshalVT(dAtA []byte) error
- type TaskState
- type Workflow
- func (*Workflow) Descriptor() ([]byte, []int)deprecated
- func (x *Workflow) GetCreateTime() int64
- func (x *Workflow) GetData() []byte
- func (x *Workflow) GetEndTime() int64
- func (x *Workflow) GetError() string
- func (x *Workflow) GetFactoryName() string
- func (x *Workflow) GetName() string
- func (x *Workflow) GetStartTime() int64
- func (x *Workflow) GetState() WorkflowState
- func (x *Workflow) GetUuid() string
- func (m *Workflow) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Workflow) MarshalToVT(dAtA []byte) (int, error)
- func (m *Workflow) MarshalVT() (dAtA []byte, err error)
- func (*Workflow) ProtoMessage()
- func (x *Workflow) ProtoReflect() protoreflect.Message
- func (x *Workflow) Reset()
- func (m *Workflow) SizeVT() (n int)
- func (x *Workflow) String() string
- func (m *Workflow) UnmarshalVT(dAtA []byte) error
- type WorkflowCheckpoint
- func (*WorkflowCheckpoint) Descriptor() ([]byte, []int)deprecated
- func (x *WorkflowCheckpoint) GetCodeVersion() int32
- func (x *WorkflowCheckpoint) GetSettings() map[string]string
- func (x *WorkflowCheckpoint) GetTasks() map[string]*Task
- func (m *WorkflowCheckpoint) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *WorkflowCheckpoint) MarshalToVT(dAtA []byte) (int, error)
- func (m *WorkflowCheckpoint) MarshalVT() (dAtA []byte, err error)
- func (*WorkflowCheckpoint) ProtoMessage()
- func (x *WorkflowCheckpoint) ProtoReflect() protoreflect.Message
- func (x *WorkflowCheckpoint) Reset()
- func (m *WorkflowCheckpoint) SizeVT() (n int)
- func (x *WorkflowCheckpoint) String() string
- func (m *WorkflowCheckpoint) UnmarshalVT(dAtA []byte) error
- type WorkflowState
- func (WorkflowState) Descriptor() protoreflect.EnumDescriptor
- func (x WorkflowState) Enum() *WorkflowState
- func (WorkflowState) EnumDescriptor() ([]byte, []int)deprecated
- func (x WorkflowState) Number() protoreflect.EnumNumber
- func (x WorkflowState) String() string
- func (WorkflowState) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WorkflowState_name = map[int32]string{ 0: "NotStarted", 1: "Running", 2: "Done", } WorkflowState_value = map[string]int32{ "NotStarted": 0, "Running": 1, "Done": 2, } )
Enum value maps for WorkflowState.
View Source
var ( TaskState_name = map[int32]string{ 0: "TaskNotStarted", 1: "TaskRunning", 2: "TaskDone", } TaskState_value = map[string]int32{ "TaskNotStarted": 0, "TaskRunning": 1, "TaskDone": 2, } )
Enum value maps for TaskState.
View Source
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
View Source
var File_workflow_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` State TaskState `protobuf:"varint,2,opt,name=state,proto3,enum=workflow.TaskState" json:"state,omitempty"` // attributes includes the parameters the task needs. Attributes map[string]string `` /* 161-byte string literal not displayed */ Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*Task) Descriptor
deprecated
func (*Task) GetAttributes ¶
func (*Task) MarshalToSizedBufferVT ¶ added in v0.11.0
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶ added in v0.11.0
func (x *Task) ProtoReflect() protoreflect.Message
func (*Task) UnmarshalVT ¶ added in v0.11.0
type TaskState ¶
type TaskState int32
func (TaskState) Descriptor ¶ added in v0.11.0
func (TaskState) Descriptor() protoreflect.EnumDescriptor
func (TaskState) EnumDescriptor
deprecated
func (TaskState) Number ¶ added in v0.11.0
func (x TaskState) Number() protoreflect.EnumNumber
func (TaskState) Type ¶ added in v0.11.0
func (TaskState) Type() protoreflect.EnumType
type Workflow ¶
type Workflow struct { // uuid is set when the workflow is created, and immutable after // that. Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // 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. FactoryName string `protobuf:"bytes,2,opt,name=factory_name,json=factoryName,proto3" json:"factory_name,omitempty"` // name is the display name of the workflow. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 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. State WorkflowState `protobuf:"varint,4,opt,name=state,proto3,enum=workflow.WorkflowState" json:"state,omitempty"` // 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. Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // error is set if the job finished with an error. This field only // makes sense if 'state' is Done. Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` // 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. StartTime int64 `protobuf:"varint,7,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // end_time is set when the workflow is finished. // This field only makes sense if 'state' is Done. EndTime int64 `protobuf:"varint,8,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // create_time is set when the workflow is created. CreateTime int64 `protobuf:"varint,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // contains filtered or unexported fields }
Workflow is the persisted state of a long-running workflow.
func (*Workflow) Descriptor
deprecated
func (*Workflow) GetCreateTime ¶
func (*Workflow) GetEndTime ¶
func (*Workflow) GetFactoryName ¶
func (*Workflow) GetStartTime ¶
func (*Workflow) GetState ¶
func (x *Workflow) GetState() WorkflowState
func (*Workflow) MarshalToSizedBufferVT ¶ added in v0.11.0
func (*Workflow) MarshalToVT ¶ added in v0.11.0
func (*Workflow) ProtoMessage ¶
func (*Workflow) ProtoMessage()
func (*Workflow) ProtoReflect ¶ added in v0.11.0
func (x *Workflow) ProtoReflect() protoreflect.Message
func (*Workflow) UnmarshalVT ¶ added in v0.11.0
type WorkflowCheckpoint ¶
type WorkflowCheckpoint struct { // code_version is used to detect incompabilities between the version of the // running workflow and the one which wrote the checkpoint. If they don't // match, the workflow must not continue. The author of workflow must update // this variable in their implementation when incompabilities are introduced. CodeVersion int32 `protobuf:"varint,1,opt,name=code_version,json=codeVersion,proto3" json:"code_version,omitempty"` // Task is the data structure that stores the execution status and the // attributes of a task. Tasks map[string]*Task `` /* 151-byte string literal not displayed */ // settings includes workflow specific data, e.g. the resharding workflow // would store the source shards and destination shards. Settings map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*WorkflowCheckpoint) Descriptor
deprecated
func (*WorkflowCheckpoint) Descriptor() ([]byte, []int)
Deprecated: Use WorkflowCheckpoint.ProtoReflect.Descriptor instead.
func (*WorkflowCheckpoint) GetCodeVersion ¶
func (x *WorkflowCheckpoint) GetCodeVersion() int32
func (*WorkflowCheckpoint) GetSettings ¶
func (x *WorkflowCheckpoint) GetSettings() map[string]string
func (*WorkflowCheckpoint) GetTasks ¶
func (x *WorkflowCheckpoint) GetTasks() map[string]*Task
func (*WorkflowCheckpoint) MarshalToSizedBufferVT ¶ added in v0.11.0
func (m *WorkflowCheckpoint) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*WorkflowCheckpoint) MarshalToVT ¶ added in v0.11.0
func (m *WorkflowCheckpoint) MarshalToVT(dAtA []byte) (int, error)
func (*WorkflowCheckpoint) MarshalVT ¶ added in v0.11.0
func (m *WorkflowCheckpoint) MarshalVT() (dAtA []byte, err error)
func (*WorkflowCheckpoint) ProtoMessage ¶
func (*WorkflowCheckpoint) ProtoMessage()
func (*WorkflowCheckpoint) ProtoReflect ¶ added in v0.11.0
func (x *WorkflowCheckpoint) ProtoReflect() protoreflect.Message
func (*WorkflowCheckpoint) Reset ¶
func (x *WorkflowCheckpoint) Reset()
func (*WorkflowCheckpoint) SizeVT ¶ added in v0.11.0
func (m *WorkflowCheckpoint) SizeVT() (n int)
func (*WorkflowCheckpoint) String ¶
func (x *WorkflowCheckpoint) String() string
func (*WorkflowCheckpoint) UnmarshalVT ¶ added in v0.11.0
func (m *WorkflowCheckpoint) UnmarshalVT(dAtA []byte) error
type WorkflowState ¶
type WorkflowState int32
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.
const ( WorkflowState_NotStarted WorkflowState = 0 WorkflowState_Running WorkflowState = 1 WorkflowState_Done WorkflowState = 2 )
func (WorkflowState) Descriptor ¶ added in v0.11.0
func (WorkflowState) Descriptor() protoreflect.EnumDescriptor
func (WorkflowState) Enum ¶ added in v0.11.0
func (x WorkflowState) Enum() *WorkflowState
func (WorkflowState) EnumDescriptor
deprecated
func (WorkflowState) EnumDescriptor() ([]byte, []int)
Deprecated: Use WorkflowState.Descriptor instead.
func (WorkflowState) Number ¶ added in v0.11.0
func (x WorkflowState) Number() protoreflect.EnumNumber
func (WorkflowState) String ¶
func (x WorkflowState) String() string
func (WorkflowState) Type ¶ added in v0.11.0
func (WorkflowState) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.