go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/proto/workflow Index | Files

package workflow

import "gopkg.in/src-d/go-vitess.v1/vt/proto/workflow"

Index

Package Files

workflow.pb.go

Variables

var TaskState_name = map[int32]string{
    0:  "TaskNotStarted",
    1:  "TaskRunning",
    2:  "TaskDone",
}
var TaskState_value = map[string]int32{
    "TaskNotStarted": 0,
    "TaskRunning":    1,
    "TaskDone":       2,
}
var WorkflowState_name = map[int32]string{
    0:  "NotStarted",
    1:  "Running",
    2:  "Done",
}
var WorkflowState_value = map[string]int32{
    "NotStarted": 0,
    "Running":    1,
    "Done":       2,
}

type Task Uses

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 `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    Error                string            `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

func (*Task) Descriptor Uses

func (*Task) Descriptor() ([]byte, []int)

func (*Task) GetAttributes Uses

func (m *Task) GetAttributes() map[string]string

func (*Task) GetError Uses

func (m *Task) GetError() string

func (*Task) GetId Uses

func (m *Task) GetId() string

func (*Task) GetState Uses

func (m *Task) GetState() TaskState

func (*Task) ProtoMessage Uses

func (*Task) ProtoMessage()

func (*Task) Reset Uses

func (m *Task) Reset()

func (*Task) String Uses

func (m *Task) String() string

func (*Task) XXX_DiscardUnknown Uses

func (m *Task) XXX_DiscardUnknown()

func (*Task) XXX_Marshal Uses

func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Task) XXX_Merge Uses

func (dst *Task) XXX_Merge(src proto.Message)

func (*Task) XXX_Size Uses

func (m *Task) XXX_Size() int

func (*Task) XXX_Unmarshal Uses

func (m *Task) XXX_Unmarshal(b []byte) error

type TaskState Uses

type TaskState int32
const (
    TaskState_TaskNotStarted TaskState = 0
    TaskState_TaskRunning    TaskState = 1
    TaskState_TaskDone       TaskState = 2
)

func (TaskState) EnumDescriptor Uses

func (TaskState) EnumDescriptor() ([]byte, []int)

func (TaskState) String Uses

func (x TaskState) String() string

type Workflow Uses

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"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Workflow is the persisted state of a long-running workflow.

func (*Workflow) Descriptor Uses

func (*Workflow) Descriptor() ([]byte, []int)

func (*Workflow) GetCreateTime Uses

func (m *Workflow) GetCreateTime() int64

func (*Workflow) GetData Uses

func (m *Workflow) GetData() []byte

func (*Workflow) GetEndTime Uses

func (m *Workflow) GetEndTime() int64

func (*Workflow) GetError Uses

func (m *Workflow) GetError() string

func (*Workflow) GetFactoryName Uses

func (m *Workflow) GetFactoryName() string

func (*Workflow) GetName Uses

func (m *Workflow) GetName() string

func (*Workflow) GetStartTime Uses

func (m *Workflow) GetStartTime() int64

func (*Workflow) GetState Uses

func (m *Workflow) GetState() WorkflowState

func (*Workflow) GetUuid Uses

func (m *Workflow) GetUuid() string

func (*Workflow) ProtoMessage Uses

func (*Workflow) ProtoMessage()

func (*Workflow) Reset Uses

func (m *Workflow) Reset()

func (*Workflow) String Uses

func (m *Workflow) String() string

func (*Workflow) XXX_DiscardUnknown Uses

func (m *Workflow) XXX_DiscardUnknown()

func (*Workflow) XXX_Marshal Uses

func (m *Workflow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Workflow) XXX_Merge Uses

func (dst *Workflow) XXX_Merge(src proto.Message)

func (*Workflow) XXX_Size Uses

func (m *Workflow) XXX_Size() int

func (*Workflow) XXX_Unmarshal Uses

func (m *Workflow) XXX_Unmarshal(b []byte) error

type WorkflowCheckpoint Uses

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 `protobuf:"bytes,2,rep,name=tasks,proto3" json:"tasks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // settings includes workflow specific data, e.g. the resharding workflow
    // would store the source shards and destination shards.
    Settings             map[string]string `protobuf:"bytes,3,rep,name=settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

func (*WorkflowCheckpoint) Descriptor Uses

func (*WorkflowCheckpoint) Descriptor() ([]byte, []int)

func (*WorkflowCheckpoint) GetCodeVersion Uses

func (m *WorkflowCheckpoint) GetCodeVersion() int32

func (*WorkflowCheckpoint) GetSettings Uses

func (m *WorkflowCheckpoint) GetSettings() map[string]string

func (*WorkflowCheckpoint) GetTasks Uses

func (m *WorkflowCheckpoint) GetTasks() map[string]*Task

func (*WorkflowCheckpoint) ProtoMessage Uses

func (*WorkflowCheckpoint) ProtoMessage()

func (*WorkflowCheckpoint) Reset Uses

func (m *WorkflowCheckpoint) Reset()

func (*WorkflowCheckpoint) String Uses

func (m *WorkflowCheckpoint) String() string

func (*WorkflowCheckpoint) XXX_DiscardUnknown Uses

func (m *WorkflowCheckpoint) XXX_DiscardUnknown()

func (*WorkflowCheckpoint) XXX_Marshal Uses

func (m *WorkflowCheckpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WorkflowCheckpoint) XXX_Merge Uses

func (dst *WorkflowCheckpoint) XXX_Merge(src proto.Message)

func (*WorkflowCheckpoint) XXX_Size Uses

func (m *WorkflowCheckpoint) XXX_Size() int

func (*WorkflowCheckpoint) XXX_Unmarshal Uses

func (m *WorkflowCheckpoint) XXX_Unmarshal(b []byte) error

type WorkflowState Uses

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) EnumDescriptor Uses

func (WorkflowState) EnumDescriptor() ([]byte, []int)

func (WorkflowState) String Uses

func (x WorkflowState) String() string

Package workflow imports 3 packages (graph) and is imported by 12 packages. Updated 2019-06-13. Refresh now. Tools for package owners.