From 4c644874b9e654c5650131d43c5a68ceabfd3df2 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 31 Mar 2026 08:51:53 -0500 Subject: [PATCH 01/12] first pass renaming Signed-off-by: Cassandra Coyle --- api/helpers/history.go | 10 +- api/helpers/tracing.go | 2 +- api/protos/backend_service.pb.go | 810 ++- api/protos/history_events.pb.go | 2432 +++++++ api/protos/orchestration.pb.go | 1090 ++++ api/protos/orchestrator_actions.pb.go | 1054 ++++ api/protos/orchestrator_service.pb.go | 6653 ++++---------------- api/protos/orchestrator_service_grpc.pb.go | 90 +- api/protos/runtime_state.pb.go | 330 +- backend/client.go | 42 +- client/client_grpc.go | 50 +- client/worker_grpc.go | 20 +- tests/runtimestate_test.go | 110 +- tests/task_executor_test.go | 12 +- tests/worker_test.go | 40 +- workflow/api.go | 6 +- workflow/client.go | 16 +- workflow/state.go | 2 +- workflow/workflow.go | 2 +- 19 files changed, 6750 insertions(+), 6021 deletions(-) create mode 100644 api/protos/history_events.pb.go create mode 100644 api/protos/orchestration.pb.go create mode 100644 api/protos/orchestrator_actions.pb.go diff --git a/api/helpers/history.go b/api/helpers/history.go index b695fb15..0a492461 100644 --- a/api/helpers/history.go +++ b/api/helpers/history.go @@ -31,7 +31,7 @@ func HistoryListSummary(list []*protos.HistoryEvent) string { return sb.String() } -func ActionListSummary(actions []*protos.OrchestratorAction) string { +func ActionListSummary(actions []*protos.WorkflowAction) string { var sb strings.Builder sb.WriteString("[") for i, a := range actions { @@ -60,9 +60,9 @@ func GetTaskId(e *protos.HistoryEvent) int32 { return x.TaskScheduledId } else if x := e.GetTaskFailed(); x != nil { return x.TaskScheduledId - } else if x := e.GetSubOrchestrationInstanceCompleted(); x != nil { + } else if x := e.GetChildWorkflowInstanceCompleted(); x != nil { return x.TaskScheduledId - } else if x := e.GetSubOrchestrationInstanceFailed(); x != nil { + } else if x := e.GetChildWorkflowInstanceFailed(); x != nil { return x.TaskScheduledId } else if x := e.GetTimerFired(); x != nil { return x.TimerId @@ -88,7 +88,7 @@ func getHistoryEventTypeName(e *protos.HistoryEvent) string { return reflect.TypeOf(e.EventType).Elem().Name()[len("HistoryEvent_"):] } -func getActionTypeName(a *protos.OrchestratorAction) string { +func getActionTypeName(a *protos.WorkflowAction) string { // PERFORMANCE: Replace this with a switch statement or a map lookup to avoid this use of reflection - return reflect.TypeOf(a.OrchestratorActionType).Elem().Name()[len("OrchestratorAction_"):] + return reflect.TypeOf(a.WorkflowActionType).Elem().Name()[len("WorkflowAction_"):] } diff --git a/api/helpers/tracing.go b/api/helpers/tracing.go index 450f8798..9630ed5a 100644 --- a/api/helpers/tracing.go +++ b/api/helpers/tracing.go @@ -33,7 +33,7 @@ func StartNewRunOrchestrationSpan( ctx context.Context, es *protos.ExecutionStartedEvent, startedTime time.Time, ) (context.Context, trace.Span) { name := es.Name - instanceID := es.OrchestrationInstance.InstanceId + instanceID := es.WorkflowInstance.InstanceId version := es.Version.GetValue() attributes := []attribute.KeyValue{ {Key: "durabletask.type", Value: attribute.StringValue("orchestration")}, diff --git a/api/protos/backend_service.pb.go b/api/protos/backend_service.pb.go index 093bcf0f..c97da771 100644 --- a/api/protos/backend_service.pb.go +++ b/api/protos/backend_service.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v6.32.1 +// protoc v4.25.4 // source: backend_service.proto package protos @@ -25,15 +25,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Request payload for adding new orchestration events. +// Request payload for adding new workflow events. type AddEventRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The ID of the orchestration to send an event to. - Instance *OrchestrationInstance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - // The event to send to the orchestration. + // The ID of the workflow to send an event to. + Instance *WorkflowInstance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + // The event to send to the workflow. Event *HistoryEvent `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` } @@ -69,7 +69,7 @@ func (*AddEventRequest) Descriptor() ([]byte, []int) { return file_backend_service_proto_rawDescGZIP(), []int{0} } -func (x *AddEventRequest) GetInstance() *OrchestrationInstance { +func (x *AddEventRequest) GetInstance() *WorkflowInstance { if x != nil { return x.Instance } @@ -83,7 +83,7 @@ func (x *AddEventRequest) GetEvent() *HistoryEvent { return nil } -// Response payload for adding new orchestration events. +// Response payload for adding new workflow events. type AddEventResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -130,7 +130,7 @@ type CompleteActivityWorkItemRequest struct { // The completion token that was provided when the work item was fetched. CompletionToken string `protobuf:"bytes,1,opt,name=completionToken,proto3" json:"completionToken,omitempty"` - // The response event that will be sent to the orchestrator. + // The response event that will be sent to the workflow. // This must be either a TaskCompleted event or a TaskFailed event. ResponseEvent *HistoryEvent `protobuf:"bytes,2,opt,name=responseEvent,proto3" json:"responseEvent,omitempty"` } @@ -220,28 +220,28 @@ func (*CompleteActivityWorkItemResponse) Descriptor() ([]byte, []int) { return file_backend_service_proto_rawDescGZIP(), []int{3} } -// Request payload for completing an orchestration work item. -type CompleteOrchestrationWorkItemRequest struct { +// Request payload for completing a workflow work item. +type CompleteWorkflowWorkItemRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The completion token that was provided when the work item was fetched. CompletionToken string `protobuf:"bytes,1,opt,name=completionToken,proto3" json:"completionToken,omitempty"` - Instance *OrchestrationInstance `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"` + Instance *WorkflowInstance `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"` RuntimeStatus OrchestrationStatus `protobuf:"varint,3,opt,name=runtimeStatus,proto3,enum=OrchestrationStatus" json:"runtimeStatus,omitempty"` CustomStatus *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=customStatus,proto3" json:"customStatus,omitempty"` NewHistory []*HistoryEvent `protobuf:"bytes,5,rep,name=newHistory,proto3" json:"newHistory,omitempty"` NewTasks []*HistoryEvent `protobuf:"bytes,6,rep,name=newTasks,proto3" json:"newTasks,omitempty"` NewTimers []*HistoryEvent `protobuf:"bytes,7,rep,name=newTimers,proto3" json:"newTimers,omitempty"` - NewMessages []*OrchestratorMessage `protobuf:"bytes,8,rep,name=newMessages,proto3" json:"newMessages,omitempty"` - // The number of work item events that were processed by the orchestrator. - // This field is optional. If not set, the service should assume that the orchestrator processed all events. + NewMessages []*WorkflowMessage `protobuf:"bytes,8,rep,name=newMessages,proto3" json:"newMessages,omitempty"` + // The number of work item events that were processed by the workflow. + // This field is optional. If not set, the service should assume that the workflow processed all events. NumEventsProcessed *wrapperspb.Int32Value `protobuf:"bytes,9,opt,name=numEventsProcessed,proto3" json:"numEventsProcessed,omitempty"` } -func (x *CompleteOrchestrationWorkItemRequest) Reset() { - *x = CompleteOrchestrationWorkItemRequest{} +func (x *CompleteWorkflowWorkItemRequest) Reset() { + *x = CompleteWorkflowWorkItemRequest{} if protoimpl.UnsafeEnabled { mi := &file_backend_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -249,13 +249,13 @@ func (x *CompleteOrchestrationWorkItemRequest) Reset() { } } -func (x *CompleteOrchestrationWorkItemRequest) String() string { +func (x *CompleteWorkflowWorkItemRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CompleteOrchestrationWorkItemRequest) ProtoMessage() {} +func (*CompleteWorkflowWorkItemRequest) ProtoMessage() {} -func (x *CompleteOrchestrationWorkItemRequest) ProtoReflect() protoreflect.Message { +func (x *CompleteWorkflowWorkItemRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -267,83 +267,83 @@ func (x *CompleteOrchestrationWorkItemRequest) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use CompleteOrchestrationWorkItemRequest.ProtoReflect.Descriptor instead. -func (*CompleteOrchestrationWorkItemRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CompleteWorkflowWorkItemRequest.ProtoReflect.Descriptor instead. +func (*CompleteWorkflowWorkItemRequest) Descriptor() ([]byte, []int) { return file_backend_service_proto_rawDescGZIP(), []int{4} } -func (x *CompleteOrchestrationWorkItemRequest) GetCompletionToken() string { +func (x *CompleteWorkflowWorkItemRequest) GetCompletionToken() string { if x != nil { return x.CompletionToken } return "" } -func (x *CompleteOrchestrationWorkItemRequest) GetInstance() *OrchestrationInstance { +func (x *CompleteWorkflowWorkItemRequest) GetInstance() *WorkflowInstance { if x != nil { return x.Instance } return nil } -func (x *CompleteOrchestrationWorkItemRequest) GetRuntimeStatus() OrchestrationStatus { +func (x *CompleteWorkflowWorkItemRequest) GetRuntimeStatus() OrchestrationStatus { if x != nil { return x.RuntimeStatus } return OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING } -func (x *CompleteOrchestrationWorkItemRequest) GetCustomStatus() *wrapperspb.StringValue { +func (x *CompleteWorkflowWorkItemRequest) GetCustomStatus() *wrapperspb.StringValue { if x != nil { return x.CustomStatus } return nil } -func (x *CompleteOrchestrationWorkItemRequest) GetNewHistory() []*HistoryEvent { +func (x *CompleteWorkflowWorkItemRequest) GetNewHistory() []*HistoryEvent { if x != nil { return x.NewHistory } return nil } -func (x *CompleteOrchestrationWorkItemRequest) GetNewTasks() []*HistoryEvent { +func (x *CompleteWorkflowWorkItemRequest) GetNewTasks() []*HistoryEvent { if x != nil { return x.NewTasks } return nil } -func (x *CompleteOrchestrationWorkItemRequest) GetNewTimers() []*HistoryEvent { +func (x *CompleteWorkflowWorkItemRequest) GetNewTimers() []*HistoryEvent { if x != nil { return x.NewTimers } return nil } -func (x *CompleteOrchestrationWorkItemRequest) GetNewMessages() []*OrchestratorMessage { +func (x *CompleteWorkflowWorkItemRequest) GetNewMessages() []*WorkflowMessage { if x != nil { return x.NewMessages } return nil } -func (x *CompleteOrchestrationWorkItemRequest) GetNumEventsProcessed() *wrapperspb.Int32Value { +func (x *CompleteWorkflowWorkItemRequest) GetNumEventsProcessed() *wrapperspb.Int32Value { if x != nil { return x.NumEventsProcessed } return nil } -// Response payload for completing an orchestration work item. -type CompleteOrchestrationWorkItemResponse struct { +// Response payload for completing a workflow work item. +type CompleteWorkflowWorkItemResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *CompleteOrchestrationWorkItemResponse) Reset() { - *x = CompleteOrchestrationWorkItemResponse{} +func (x *CompleteWorkflowWorkItemResponse) Reset() { + *x = CompleteWorkflowWorkItemResponse{} if protoimpl.UnsafeEnabled { mi := &file_backend_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -351,13 +351,13 @@ func (x *CompleteOrchestrationWorkItemResponse) Reset() { } } -func (x *CompleteOrchestrationWorkItemResponse) String() string { +func (x *CompleteWorkflowWorkItemResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CompleteOrchestrationWorkItemResponse) ProtoMessage() {} +func (*CompleteWorkflowWorkItemResponse) ProtoMessage() {} -func (x *CompleteOrchestrationWorkItemResponse) ProtoReflect() protoreflect.Message { +func (x *CompleteWorkflowWorkItemResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -369,25 +369,25 @@ func (x *CompleteOrchestrationWorkItemResponse) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use CompleteOrchestrationWorkItemResponse.ProtoReflect.Descriptor instead. -func (*CompleteOrchestrationWorkItemResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use CompleteWorkflowWorkItemResponse.ProtoReflect.Descriptor instead. +func (*CompleteWorkflowWorkItemResponse) Descriptor() ([]byte, []int) { return file_backend_service_proto_rawDescGZIP(), []int{5} } -// A message to be delivered to an orchestration by the backend. -type OrchestratorMessage struct { +// A message to be delivered to a workflow by the backend. +type WorkflowMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The ID of the orchestration instance to receive the message. - Instance *OrchestrationInstance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - // The event payload to be received by the target orchestration. + // The ID of the workflow instance to receive the message. + Instance *WorkflowInstance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + // The event payload to be received by the target workflow. Event *HistoryEvent `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` } -func (x *OrchestratorMessage) Reset() { - *x = OrchestratorMessage{} +func (x *WorkflowMessage) Reset() { + *x = WorkflowMessage{} if protoimpl.UnsafeEnabled { mi := &file_backend_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -395,13 +395,13 @@ func (x *OrchestratorMessage) Reset() { } } -func (x *OrchestratorMessage) String() string { +func (x *WorkflowMessage) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OrchestratorMessage) ProtoMessage() {} +func (*WorkflowMessage) ProtoMessage() {} -func (x *OrchestratorMessage) ProtoReflect() protoreflect.Message { +func (x *WorkflowMessage) ProtoReflect() protoreflect.Message { mi := &file_backend_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -413,26 +413,26 @@ func (x *OrchestratorMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OrchestratorMessage.ProtoReflect.Descriptor instead. -func (*OrchestratorMessage) Descriptor() ([]byte, []int) { +// Deprecated: Use WorkflowMessage.ProtoReflect.Descriptor instead. +func (*WorkflowMessage) Descriptor() ([]byte, []int) { return file_backend_service_proto_rawDescGZIP(), []int{6} } -func (x *OrchestratorMessage) GetInstance() *OrchestrationInstance { +func (x *WorkflowMessage) GetInstance() *WorkflowInstance { if x != nil { return x.Instance } return nil } -func (x *OrchestratorMessage) GetEvent() *HistoryEvent { +func (x *WorkflowMessage) GetEvent() *HistoryEvent { if x != nil { return x.Event } return nil } -type WorkflowState struct { +type BackendWorkflowState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -443,8 +443,8 @@ type WorkflowState struct { Generation uint64 `protobuf:"varint,4,opt,name=generation,proto3" json:"generation,omitempty"` } -func (x *WorkflowState) Reset() { - *x = WorkflowState{} +func (x *BackendWorkflowState) Reset() { + *x = BackendWorkflowState{} if protoimpl.UnsafeEnabled { mi := &file_backend_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -452,13 +452,13 @@ func (x *WorkflowState) Reset() { } } -func (x *WorkflowState) String() string { +func (x *BackendWorkflowState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WorkflowState) ProtoMessage() {} +func (*BackendWorkflowState) ProtoMessage() {} -func (x *WorkflowState) ProtoReflect() protoreflect.Message { +func (x *BackendWorkflowState) ProtoReflect() protoreflect.Message { mi := &file_backend_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -470,33 +470,33 @@ func (x *WorkflowState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WorkflowState.ProtoReflect.Descriptor instead. -func (*WorkflowState) Descriptor() ([]byte, []int) { +// Deprecated: Use BackendWorkflowState.ProtoReflect.Descriptor instead. +func (*BackendWorkflowState) Descriptor() ([]byte, []int) { return file_backend_service_proto_rawDescGZIP(), []int{7} } -func (x *WorkflowState) GetInbox() []*HistoryEvent { +func (x *BackendWorkflowState) GetInbox() []*HistoryEvent { if x != nil { return x.Inbox } return nil } -func (x *WorkflowState) GetHistory() []*HistoryEvent { +func (x *BackendWorkflowState) GetHistory() []*HistoryEvent { if x != nil { return x.History } return nil } -func (x *WorkflowState) GetCustomStatus() *wrapperspb.StringValue { +func (x *BackendWorkflowState) GetCustomStatus() *wrapperspb.StringValue { if x != nil { return x.CustomStatus } return nil } -func (x *WorkflowState) GetGeneration() uint64 { +func (x *BackendWorkflowState) GetGeneration() uint64 { if x != nil { return x.Generation } @@ -508,8 +508,7 @@ type CreateWorkflowInstanceRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StartEvent *HistoryEvent `protobuf:"bytes,1,opt,name=startEvent,proto3" json:"startEvent,omitempty"` - Policy *OrchestrationIdReusePolicy `protobuf:"bytes,2,opt,name=policy,proto3,oneof" json:"policy,omitempty"` + StartEvent *HistoryEvent `protobuf:"bytes,1,opt,name=startEvent,proto3" json:"startEvent,omitempty"` } func (x *CreateWorkflowInstanceRequest) Reset() { @@ -551,14 +550,7 @@ func (x *CreateWorkflowInstanceRequest) GetStartEvent() *HistoryEvent { return nil } -func (x *CreateWorkflowInstanceRequest) GetPolicy() *OrchestrationIdReusePolicy { - if x != nil { - return x.Policy - } - return nil -} - -type OrchestrationMetadata struct { +type WorkflowMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -576,8 +568,8 @@ type OrchestrationMetadata struct { ParentInstanceId string `protobuf:"bytes,11,opt,name=parentInstanceId,proto3" json:"parentInstanceId,omitempty"` } -func (x *OrchestrationMetadata) Reset() { - *x = OrchestrationMetadata{} +func (x *WorkflowMetadata) Reset() { + *x = WorkflowMetadata{} if protoimpl.UnsafeEnabled { mi := &file_backend_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -585,13 +577,13 @@ func (x *OrchestrationMetadata) Reset() { } } -func (x *OrchestrationMetadata) String() string { +func (x *WorkflowMetadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OrchestrationMetadata) ProtoMessage() {} +func (*WorkflowMetadata) ProtoMessage() {} -func (x *OrchestrationMetadata) ProtoReflect() protoreflect.Message { +func (x *WorkflowMetadata) ProtoReflect() protoreflect.Message { mi := &file_backend_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -603,89 +595,89 @@ func (x *OrchestrationMetadata) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OrchestrationMetadata.ProtoReflect.Descriptor instead. -func (*OrchestrationMetadata) Descriptor() ([]byte, []int) { +// Deprecated: Use WorkflowMetadata.ProtoReflect.Descriptor instead. +func (*WorkflowMetadata) Descriptor() ([]byte, []int) { return file_backend_service_proto_rawDescGZIP(), []int{9} } -func (x *OrchestrationMetadata) GetInstanceId() string { +func (x *WorkflowMetadata) GetInstanceId() string { if x != nil { return x.InstanceId } return "" } -func (x *OrchestrationMetadata) GetName() string { +func (x *WorkflowMetadata) GetName() string { if x != nil { return x.Name } return "" } -func (x *OrchestrationMetadata) GetRuntimeStatus() OrchestrationStatus { +func (x *WorkflowMetadata) GetRuntimeStatus() OrchestrationStatus { if x != nil { return x.RuntimeStatus } return OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING } -func (x *OrchestrationMetadata) GetCreatedAt() *timestamppb.Timestamp { +func (x *WorkflowMetadata) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt } return nil } -func (x *OrchestrationMetadata) GetLastUpdatedAt() *timestamppb.Timestamp { +func (x *WorkflowMetadata) GetLastUpdatedAt() *timestamppb.Timestamp { if x != nil { return x.LastUpdatedAt } return nil } -func (x *OrchestrationMetadata) GetInput() *wrapperspb.StringValue { +func (x *WorkflowMetadata) GetInput() *wrapperspb.StringValue { if x != nil { return x.Input } return nil } -func (x *OrchestrationMetadata) GetOutput() *wrapperspb.StringValue { +func (x *WorkflowMetadata) GetOutput() *wrapperspb.StringValue { if x != nil { return x.Output } return nil } -func (x *OrchestrationMetadata) GetCustomStatus() *wrapperspb.StringValue { +func (x *WorkflowMetadata) GetCustomStatus() *wrapperspb.StringValue { if x != nil { return x.CustomStatus } return nil } -func (x *OrchestrationMetadata) GetFailureDetails() *TaskFailureDetails { +func (x *WorkflowMetadata) GetFailureDetails() *TaskFailureDetails { if x != nil { return x.FailureDetails } return nil } -func (x *OrchestrationMetadata) GetCompletedAt() *timestamppb.Timestamp { +func (x *WorkflowMetadata) GetCompletedAt() *timestamppb.Timestamp { if x != nil { return x.CompletedAt } return nil } -func (x *OrchestrationMetadata) GetParentInstanceId() string { +func (x *WorkflowMetadata) GetParentInstanceId() string { if x != nil { return x.ParentInstanceId } return "" } -type WorkflowStateMetadata struct { +type BackendWorkflowStateMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -693,10 +685,14 @@ type WorkflowStateMetadata struct { InboxLength uint64 `protobuf:"varint,1,opt,name=inboxLength,proto3" json:"inboxLength,omitempty"` HistoryLength uint64 `protobuf:"varint,2,opt,name=historyLength,proto3" json:"historyLength,omitempty"` Generation uint64 `protobuf:"varint,3,opt,name=generation,proto3" json:"generation,omitempty"` + // Number of HistorySignature entries stored (signature-NNNNNN keys). + SignatureLength uint64 `protobuf:"varint,4,opt,name=signatureLength,proto3" json:"signatureLength,omitempty"` + // Number of SigningCertificate entries stored (sigcert-NNNNNN keys). + SigningCertificateLength uint64 `protobuf:"varint,5,opt,name=signingCertificateLength,proto3" json:"signingCertificateLength,omitempty"` } -func (x *WorkflowStateMetadata) Reset() { - *x = WorkflowStateMetadata{} +func (x *BackendWorkflowStateMetadata) Reset() { + *x = BackendWorkflowStateMetadata{} if protoimpl.UnsafeEnabled { mi := &file_backend_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -704,13 +700,13 @@ func (x *WorkflowStateMetadata) Reset() { } } -func (x *WorkflowStateMetadata) String() string { +func (x *BackendWorkflowStateMetadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WorkflowStateMetadata) ProtoMessage() {} +func (*BackendWorkflowStateMetadata) ProtoMessage() {} -func (x *WorkflowStateMetadata) ProtoReflect() protoreflect.Message { +func (x *BackendWorkflowStateMetadata) ProtoReflect() protoreflect.Message { mi := &file_backend_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -722,32 +718,215 @@ func (x *WorkflowStateMetadata) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WorkflowStateMetadata.ProtoReflect.Descriptor instead. -func (*WorkflowStateMetadata) Descriptor() ([]byte, []int) { +// Deprecated: Use BackendWorkflowStateMetadata.ProtoReflect.Descriptor instead. +func (*BackendWorkflowStateMetadata) Descriptor() ([]byte, []int) { return file_backend_service_proto_rawDescGZIP(), []int{10} } -func (x *WorkflowStateMetadata) GetInboxLength() uint64 { +func (x *BackendWorkflowStateMetadata) GetInboxLength() uint64 { if x != nil { return x.InboxLength } return 0 } -func (x *WorkflowStateMetadata) GetHistoryLength() uint64 { +func (x *BackendWorkflowStateMetadata) GetHistoryLength() uint64 { if x != nil { return x.HistoryLength } return 0 } -func (x *WorkflowStateMetadata) GetGeneration() uint64 { +func (x *BackendWorkflowStateMetadata) GetGeneration() uint64 { if x != nil { return x.Generation } return 0 } +func (x *BackendWorkflowStateMetadata) GetSignatureLength() uint64 { + if x != nil { + return x.SignatureLength + } + return 0 +} + +func (x *BackendWorkflowStateMetadata) GetSigningCertificateLength() uint64 { + if x != nil { + return x.SigningCertificateLength + } + return 0 +} + +// A signing identity's X.509 certificate, stored once and referenced by index +// from HistorySignature entries. This avoids duplicating the certificate +// across every signature from the same identity. Stored as individual actor +// state keys: sigcert-000000, sigcert-000001, etc. +type SigningCertificate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // X.509 certificate chain of the signing identity. Certificates are + // DER-encoded and concatenated directly in order: leaf first, followed by + // intermediates. Each certificate is a self-delimiting ASN.1 SEQUENCE, + // so the chain can be parsed by reading consecutive DER structures. + Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"` +} + +func (x *SigningCertificate) Reset() { + *x = SigningCertificate{} + if protoimpl.UnsafeEnabled { + mi := &file_backend_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SigningCertificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningCertificate) ProtoMessage() {} + +func (x *SigningCertificate) ProtoReflect() protoreflect.Message { + mi := &file_backend_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningCertificate.ProtoReflect.Descriptor instead. +func (*SigningCertificate) Descriptor() ([]byte, []int) { + return file_backend_service_proto_rawDescGZIP(), []int{11} +} + +func (x *SigningCertificate) GetCertificate() []byte { + if x != nil { + return x.Certificate + } + return nil +} + +// Signing metadata for a contiguous range of history events. +// This is metadata-only — it does NOT contain the events themselves. +// Events are stored once in history-NNNNNN keys; this message references them +// by index range and stores only the signing artifacts. +// Stored as individual actor state keys: signature-000000, signature-000001, +// etc. +type HistorySignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Index of the first event covered by this signature (inclusive). + StartEventIndex uint64 `protobuf:"varint,1,opt,name=startEventIndex,proto3" json:"startEventIndex,omitempty"` + // Number of events covered by this signature. + EventCount uint64 `protobuf:"varint,2,opt,name=eventCount,proto3" json:"eventCount,omitempty"` + // SHA-256 digest of the previous HistorySignature message (the entire + // deterministically serialized protobuf message). Absent for the first + // signature in the chain (no predecessor). When computing the signature + // input for the root case, this value is treated as empty (zero-length). + PreviousSignatureDigest []byte `protobuf:"bytes,3,opt,name=previousSignatureDigest,proto3,oneof" json:"previousSignatureDigest,omitempty"` + // SHA-256 digest over the concatenation of the raw serialized bytes of each + // history event in this range, in order. The bytes are the exact values + // persisted to the state store (one per history-NNNNNN key). + EventsDigest []byte `protobuf:"bytes,4,opt,name=eventsDigest,proto3" json:"eventsDigest,omitempty"` + // Index into the SigningCertificate table (sigcert-NNNNNN keys). + // Multiple signatures from the same identity share the same index. + // A new entry is appended only when the certificate rotates. + CertificateIndex uint64 `protobuf:"varint,5,opt,name=certificateIndex,proto3" json:"certificateIndex,omitempty"` + // Cryptographic signature over + // SHA-256(previousSignatureDigest || eventsDigest) + // using the private key corresponding to the referenced certificate. + // The algorithm is determined by the certificate's key type: + // + // Ed25519: raw Ed25519 signature over the input bytes + // ECDSA: fixed-size r||s over SHA-256(input), each component + // zero-padded to the curve byte length + // RSA: PKCS#1 v1.5 with SHA-256 + Signature []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *HistorySignature) Reset() { + *x = HistorySignature{} + if protoimpl.UnsafeEnabled { + mi := &file_backend_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HistorySignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HistorySignature) ProtoMessage() {} + +func (x *HistorySignature) ProtoReflect() protoreflect.Message { + mi := &file_backend_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HistorySignature.ProtoReflect.Descriptor instead. +func (*HistorySignature) Descriptor() ([]byte, []int) { + return file_backend_service_proto_rawDescGZIP(), []int{12} +} + +func (x *HistorySignature) GetStartEventIndex() uint64 { + if x != nil { + return x.StartEventIndex + } + return 0 +} + +func (x *HistorySignature) GetEventCount() uint64 { + if x != nil { + return x.EventCount + } + return 0 +} + +func (x *HistorySignature) GetPreviousSignatureDigest() []byte { + if x != nil { + return x.PreviousSignatureDigest + } + return nil +} + +func (x *HistorySignature) GetEventsDigest() []byte { + if x != nil { + return x.EventsDigest + } + return nil +} + +func (x *HistorySignature) GetCertificateIndex() uint64 { + if x != nil { + return x.CertificateIndex + } + return 0 +} + +func (x *HistorySignature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + type DurableTimer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -760,7 +939,7 @@ type DurableTimer struct { func (x *DurableTimer) Reset() { *x = DurableTimer{} if protoimpl.UnsafeEnabled { - mi := &file_backend_service_proto_msgTypes[11] + mi := &file_backend_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -773,7 +952,7 @@ func (x *DurableTimer) String() string { func (*DurableTimer) ProtoMessage() {} func (x *DurableTimer) ProtoReflect() protoreflect.Message { - mi := &file_backend_service_proto_msgTypes[11] + mi := &file_backend_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -786,7 +965,7 @@ func (x *DurableTimer) ProtoReflect() protoreflect.Message { // Deprecated: Use DurableTimer.ProtoReflect.Descriptor instead. func (*DurableTimer) Descriptor() ([]byte, []int) { - return file_backend_service_proto_rawDescGZIP(), []int{11} + return file_backend_service_proto_rawDescGZIP(), []int{13} } func (x *DurableTimer) GetTimerEvent() *HistoryEvent { @@ -809,38 +988,38 @@ var file_backend_service_proto_rawDesc = []byte{ 0x0a, 0x15, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1a, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, - 0x12, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x1f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, - 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x33, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x22, 0x0a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, - 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x04, 0x0a, 0x24, 0x43, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x32, 0x0a, - 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x65, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x41, 0x64, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x01, + 0x0a, 0x1f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x0d, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x22, 0x22, 0x0a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9e, 0x04, 0x0a, 0x1f, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, @@ -858,86 +1037,82 @@ var file_backend_service_proto_rawDesc = []byte{ 0x08, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x6e, 0x65, 0x77, - 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x75, + 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x63, 0x68, - 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x0b, 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x12, - 0x6e, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6e, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x22, 0x27, 0x0a, 0x25, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x6e, 0x0a, 0x13, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x4f, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, - 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x22, 0xbf, 0x01, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x27, 0x0a, 0x07, 0x68, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x6e, 0x65, 0x77, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x12, 0x6e, 0x75, 0x6d, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x12, 0x6e, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x65, 0x64, 0x22, 0x22, 0x0a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x65, 0x0a, 0x0f, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x08, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x22, 0xc6, 0x01, 0x0a, 0x14, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x69, 0x6e, 0x62, + 0x6f, 0x78, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x27, + 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x07, + 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0x0a, 0x1d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, + 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xd1, 0x04, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x40, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x34, 0x0a, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x48, 0x00, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x88, 0x01, 0x01, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xd6, 0x04, 0x0a, 0x15, 0x4f, - 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x40, - 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0e, - 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x64, 0x22, 0x7f, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x2a, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0xec, 0x01, 0x0a, 0x1c, + 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, @@ -945,19 +1120,47 @@ var file_backend_service_proto_rawDesc = []byte{ 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x0c, 0x44, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x56, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x64, - 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x5a, 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xaa, - 0x02, 0x19, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3a, + 0x0a, 0x18, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x18, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x36, 0x0a, 0x12, 0x53, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x22, 0xa5, 0x02, 0x0a, 0x10, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x3d, 0x0a, 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x48, 0x00, 0x52, 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x44, 0x69, + 0x67, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x1a, + 0x0a, 0x18, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x5d, 0x0a, 0x0c, 0x44, 0x75, + 0x72, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x74, 0x69, + 0x6d, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x74, + 0x69, 0x6d, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x56, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, + 0x64, 0x61, 0x70, 0x72, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, + 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5a, 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xaa, 0x02, 0x19, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -972,62 +1175,62 @@ func file_backend_service_proto_rawDescGZIP() []byte { return file_backend_service_proto_rawDescData } -var file_backend_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_backend_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_backend_service_proto_goTypes = []interface{}{ - (*AddEventRequest)(nil), // 0: durabletask.protos.backend.v1.AddEventRequest - (*AddEventResponse)(nil), // 1: durabletask.protos.backend.v1.AddEventResponse - (*CompleteActivityWorkItemRequest)(nil), // 2: durabletask.protos.backend.v1.CompleteActivityWorkItemRequest - (*CompleteActivityWorkItemResponse)(nil), // 3: durabletask.protos.backend.v1.CompleteActivityWorkItemResponse - (*CompleteOrchestrationWorkItemRequest)(nil), // 4: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemRequest - (*CompleteOrchestrationWorkItemResponse)(nil), // 5: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemResponse - (*OrchestratorMessage)(nil), // 6: durabletask.protos.backend.v1.OrchestratorMessage - (*WorkflowState)(nil), // 7: durabletask.protos.backend.v1.WorkflowState - (*CreateWorkflowInstanceRequest)(nil), // 8: durabletask.protos.backend.v1.CreateWorkflowInstanceRequest - (*OrchestrationMetadata)(nil), // 9: durabletask.protos.backend.v1.OrchestrationMetadata - (*WorkflowStateMetadata)(nil), // 10: durabletask.protos.backend.v1.WorkflowStateMetadata - (*DurableTimer)(nil), // 11: durabletask.protos.backend.v1.DurableTimer - (*OrchestrationInstance)(nil), // 12: OrchestrationInstance - (*HistoryEvent)(nil), // 13: HistoryEvent - (OrchestrationStatus)(0), // 14: OrchestrationStatus - (*wrapperspb.StringValue)(nil), // 15: google.protobuf.StringValue - (*wrapperspb.Int32Value)(nil), // 16: google.protobuf.Int32Value - (*OrchestrationIdReusePolicy)(nil), // 17: OrchestrationIdReusePolicy - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp - (*TaskFailureDetails)(nil), // 19: TaskFailureDetails + (*AddEventRequest)(nil), // 0: durabletask.protos.backend.v1.AddEventRequest + (*AddEventResponse)(nil), // 1: durabletask.protos.backend.v1.AddEventResponse + (*CompleteActivityWorkItemRequest)(nil), // 2: durabletask.protos.backend.v1.CompleteActivityWorkItemRequest + (*CompleteActivityWorkItemResponse)(nil), // 3: durabletask.protos.backend.v1.CompleteActivityWorkItemResponse + (*CompleteWorkflowWorkItemRequest)(nil), // 4: durabletask.protos.backend.v1.CompleteWorkflowWorkItemRequest + (*CompleteWorkflowWorkItemResponse)(nil), // 5: durabletask.protos.backend.v1.CompleteWorkflowWorkItemResponse + (*WorkflowMessage)(nil), // 6: durabletask.protos.backend.v1.WorkflowMessage + (*BackendWorkflowState)(nil), // 7: durabletask.protos.backend.v1.BackendWorkflowState + (*CreateWorkflowInstanceRequest)(nil), // 8: durabletask.protos.backend.v1.CreateWorkflowInstanceRequest + (*WorkflowMetadata)(nil), // 9: durabletask.protos.backend.v1.WorkflowMetadata + (*BackendWorkflowStateMetadata)(nil), // 10: durabletask.protos.backend.v1.BackendWorkflowStateMetadata + (*SigningCertificate)(nil), // 11: durabletask.protos.backend.v1.SigningCertificate + (*HistorySignature)(nil), // 12: durabletask.protos.backend.v1.HistorySignature + (*DurableTimer)(nil), // 13: durabletask.protos.backend.v1.DurableTimer + (*WorkflowInstance)(nil), // 14: WorkflowInstance + (*HistoryEvent)(nil), // 15: HistoryEvent + (OrchestrationStatus)(0), // 16: OrchestrationStatus + (*wrapperspb.StringValue)(nil), // 17: google.protobuf.StringValue + (*wrapperspb.Int32Value)(nil), // 18: google.protobuf.Int32Value + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (*TaskFailureDetails)(nil), // 20: TaskFailureDetails } var file_backend_service_proto_depIdxs = []int32{ - 12, // 0: durabletask.protos.backend.v1.AddEventRequest.instance:type_name -> OrchestrationInstance - 13, // 1: durabletask.protos.backend.v1.AddEventRequest.event:type_name -> HistoryEvent - 13, // 2: durabletask.protos.backend.v1.CompleteActivityWorkItemRequest.responseEvent:type_name -> HistoryEvent - 12, // 3: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemRequest.instance:type_name -> OrchestrationInstance - 14, // 4: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemRequest.runtimeStatus:type_name -> OrchestrationStatus - 15, // 5: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemRequest.customStatus:type_name -> google.protobuf.StringValue - 13, // 6: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemRequest.newHistory:type_name -> HistoryEvent - 13, // 7: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemRequest.newTasks:type_name -> HistoryEvent - 13, // 8: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemRequest.newTimers:type_name -> HistoryEvent - 6, // 9: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemRequest.newMessages:type_name -> durabletask.protos.backend.v1.OrchestratorMessage - 16, // 10: durabletask.protos.backend.v1.CompleteOrchestrationWorkItemRequest.numEventsProcessed:type_name -> google.protobuf.Int32Value - 12, // 11: durabletask.protos.backend.v1.OrchestratorMessage.instance:type_name -> OrchestrationInstance - 13, // 12: durabletask.protos.backend.v1.OrchestratorMessage.event:type_name -> HistoryEvent - 13, // 13: durabletask.protos.backend.v1.WorkflowState.inbox:type_name -> HistoryEvent - 13, // 14: durabletask.protos.backend.v1.WorkflowState.history:type_name -> HistoryEvent - 15, // 15: durabletask.protos.backend.v1.WorkflowState.customStatus:type_name -> google.protobuf.StringValue - 13, // 16: durabletask.protos.backend.v1.CreateWorkflowInstanceRequest.startEvent:type_name -> HistoryEvent - 17, // 17: durabletask.protos.backend.v1.CreateWorkflowInstanceRequest.policy:type_name -> OrchestrationIdReusePolicy - 14, // 18: durabletask.protos.backend.v1.OrchestrationMetadata.runtimeStatus:type_name -> OrchestrationStatus - 18, // 19: durabletask.protos.backend.v1.OrchestrationMetadata.createdAt:type_name -> google.protobuf.Timestamp - 18, // 20: durabletask.protos.backend.v1.OrchestrationMetadata.lastUpdatedAt:type_name -> google.protobuf.Timestamp - 15, // 21: durabletask.protos.backend.v1.OrchestrationMetadata.input:type_name -> google.protobuf.StringValue - 15, // 22: durabletask.protos.backend.v1.OrchestrationMetadata.output:type_name -> google.protobuf.StringValue - 15, // 23: durabletask.protos.backend.v1.OrchestrationMetadata.customStatus:type_name -> google.protobuf.StringValue - 19, // 24: durabletask.protos.backend.v1.OrchestrationMetadata.failureDetails:type_name -> TaskFailureDetails - 18, // 25: durabletask.protos.backend.v1.OrchestrationMetadata.completedAt:type_name -> google.protobuf.Timestamp - 13, // 26: durabletask.protos.backend.v1.DurableTimer.timerEvent:type_name -> HistoryEvent - 27, // [27:27] is the sub-list for method output_type - 27, // [27:27] is the sub-list for method input_type - 27, // [27:27] is the sub-list for extension type_name - 27, // [27:27] is the sub-list for extension extendee - 0, // [0:27] is the sub-list for field type_name + 14, // 0: durabletask.protos.backend.v1.AddEventRequest.instance:type_name -> WorkflowInstance + 15, // 1: durabletask.protos.backend.v1.AddEventRequest.event:type_name -> HistoryEvent + 15, // 2: durabletask.protos.backend.v1.CompleteActivityWorkItemRequest.responseEvent:type_name -> HistoryEvent + 14, // 3: durabletask.protos.backend.v1.CompleteWorkflowWorkItemRequest.instance:type_name -> WorkflowInstance + 16, // 4: durabletask.protos.backend.v1.CompleteWorkflowWorkItemRequest.runtimeStatus:type_name -> OrchestrationStatus + 17, // 5: durabletask.protos.backend.v1.CompleteWorkflowWorkItemRequest.customStatus:type_name -> google.protobuf.StringValue + 15, // 6: durabletask.protos.backend.v1.CompleteWorkflowWorkItemRequest.newHistory:type_name -> HistoryEvent + 15, // 7: durabletask.protos.backend.v1.CompleteWorkflowWorkItemRequest.newTasks:type_name -> HistoryEvent + 15, // 8: durabletask.protos.backend.v1.CompleteWorkflowWorkItemRequest.newTimers:type_name -> HistoryEvent + 6, // 9: durabletask.protos.backend.v1.CompleteWorkflowWorkItemRequest.newMessages:type_name -> durabletask.protos.backend.v1.WorkflowMessage + 18, // 10: durabletask.protos.backend.v1.CompleteWorkflowWorkItemRequest.numEventsProcessed:type_name -> google.protobuf.Int32Value + 14, // 11: durabletask.protos.backend.v1.WorkflowMessage.instance:type_name -> WorkflowInstance + 15, // 12: durabletask.protos.backend.v1.WorkflowMessage.event:type_name -> HistoryEvent + 15, // 13: durabletask.protos.backend.v1.BackendWorkflowState.inbox:type_name -> HistoryEvent + 15, // 14: durabletask.protos.backend.v1.BackendWorkflowState.history:type_name -> HistoryEvent + 17, // 15: durabletask.protos.backend.v1.BackendWorkflowState.customStatus:type_name -> google.protobuf.StringValue + 15, // 16: durabletask.protos.backend.v1.CreateWorkflowInstanceRequest.startEvent:type_name -> HistoryEvent + 16, // 17: durabletask.protos.backend.v1.WorkflowMetadata.runtimeStatus:type_name -> OrchestrationStatus + 19, // 18: durabletask.protos.backend.v1.WorkflowMetadata.createdAt:type_name -> google.protobuf.Timestamp + 19, // 19: durabletask.protos.backend.v1.WorkflowMetadata.lastUpdatedAt:type_name -> google.protobuf.Timestamp + 17, // 20: durabletask.protos.backend.v1.WorkflowMetadata.input:type_name -> google.protobuf.StringValue + 17, // 21: durabletask.protos.backend.v1.WorkflowMetadata.output:type_name -> google.protobuf.StringValue + 17, // 22: durabletask.protos.backend.v1.WorkflowMetadata.customStatus:type_name -> google.protobuf.StringValue + 20, // 23: durabletask.protos.backend.v1.WorkflowMetadata.failureDetails:type_name -> TaskFailureDetails + 19, // 24: durabletask.protos.backend.v1.WorkflowMetadata.completedAt:type_name -> google.protobuf.Timestamp + 15, // 25: durabletask.protos.backend.v1.DurableTimer.timerEvent:type_name -> HistoryEvent + 26, // [26:26] is the sub-list for method output_type + 26, // [26:26] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_backend_service_proto_init() } @@ -1035,7 +1238,8 @@ func file_backend_service_proto_init() { if File_backend_service_proto != nil { return } - file_orchestrator_service_proto_init() + file_orchestration_proto_init() + file_history_events_proto_init() if !protoimpl.UnsafeEnabled { file_backend_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddEventRequest); i { @@ -1086,7 +1290,7 @@ func file_backend_service_proto_init() { } } file_backend_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompleteOrchestrationWorkItemRequest); i { + switch v := v.(*CompleteWorkflowWorkItemRequest); i { case 0: return &v.state case 1: @@ -1098,7 +1302,7 @@ func file_backend_service_proto_init() { } } file_backend_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompleteOrchestrationWorkItemResponse); i { + switch v := v.(*CompleteWorkflowWorkItemResponse); i { case 0: return &v.state case 1: @@ -1110,7 +1314,7 @@ func file_backend_service_proto_init() { } } file_backend_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestratorMessage); i { + switch v := v.(*WorkflowMessage); i { case 0: return &v.state case 1: @@ -1122,7 +1326,7 @@ func file_backend_service_proto_init() { } } file_backend_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowState); i { + switch v := v.(*BackendWorkflowState); i { case 0: return &v.state case 1: @@ -1146,7 +1350,7 @@ func file_backend_service_proto_init() { } } file_backend_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestrationMetadata); i { + switch v := v.(*WorkflowMetadata); i { case 0: return &v.state case 1: @@ -1158,7 +1362,7 @@ func file_backend_service_proto_init() { } } file_backend_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowStateMetadata); i { + switch v := v.(*BackendWorkflowStateMetadata); i { case 0: return &v.state case 1: @@ -1170,6 +1374,30 @@ func file_backend_service_proto_init() { } } file_backend_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SigningCertificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_backend_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HistorySignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_backend_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DurableTimer); i { case 0: return &v.state @@ -1182,14 +1410,14 @@ func file_backend_service_proto_init() { } } } - file_backend_service_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_backend_service_proto_msgTypes[12].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_backend_service_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, diff --git a/api/protos/history_events.pb.go b/api/protos/history_events.pb.go new file mode 100644 index 00000000..3ec6a2a7 --- /dev/null +++ b/api/protos/history_events.pb.go @@ -0,0 +1,2432 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.4 +// source: history_events.proto + +package protos + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ExecutionStartedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` + WorkflowInstance *WorkflowInstance `protobuf:"bytes,4,opt,name=workflowInstance,proto3" json:"workflowInstance,omitempty"` + ParentInstance *ParentInstanceInfo `protobuf:"bytes,5,opt,name=parentInstance,proto3" json:"parentInstance,omitempty"` + ScheduledStartTimestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=scheduledStartTimestamp,proto3" json:"scheduledStartTimestamp,omitempty"` + ParentTraceContext *TraceContext `protobuf:"bytes,7,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` + WorkflowSpanID *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=workflowSpanID,proto3" json:"workflowSpanID,omitempty"` + Tags map[string]string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ExecutionStartedEvent) Reset() { + *x = ExecutionStartedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionStartedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionStartedEvent) ProtoMessage() {} + +func (x *ExecutionStartedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionStartedEvent.ProtoReflect.Descriptor instead. +func (*ExecutionStartedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{0} +} + +func (x *ExecutionStartedEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExecutionStartedEvent) GetVersion() *wrapperspb.StringValue { + if x != nil { + return x.Version + } + return nil +} + +func (x *ExecutionStartedEvent) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +func (x *ExecutionStartedEvent) GetWorkflowInstance() *WorkflowInstance { + if x != nil { + return x.WorkflowInstance + } + return nil +} + +func (x *ExecutionStartedEvent) GetParentInstance() *ParentInstanceInfo { + if x != nil { + return x.ParentInstance + } + return nil +} + +func (x *ExecutionStartedEvent) GetScheduledStartTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.ScheduledStartTimestamp + } + return nil +} + +func (x *ExecutionStartedEvent) GetParentTraceContext() *TraceContext { + if x != nil { + return x.ParentTraceContext + } + return nil +} + +func (x *ExecutionStartedEvent) GetWorkflowSpanID() *wrapperspb.StringValue { + if x != nil { + return x.WorkflowSpanID + } + return nil +} + +func (x *ExecutionStartedEvent) GetTags() map[string]string { + if x != nil { + return x.Tags + } + return nil +} + +type ExecutionCompletedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkflowStatus OrchestrationStatus `protobuf:"varint,1,opt,name=workflowStatus,proto3,enum=OrchestrationStatus" json:"workflowStatus,omitempty"` + Result *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + FailureDetails *TaskFailureDetails `protobuf:"bytes,3,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` +} + +func (x *ExecutionCompletedEvent) Reset() { + *x = ExecutionCompletedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionCompletedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionCompletedEvent) ProtoMessage() {} + +func (x *ExecutionCompletedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionCompletedEvent.ProtoReflect.Descriptor instead. +func (*ExecutionCompletedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{1} +} + +func (x *ExecutionCompletedEvent) GetWorkflowStatus() OrchestrationStatus { + if x != nil { + return x.WorkflowStatus + } + return OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING +} + +func (x *ExecutionCompletedEvent) GetResult() *wrapperspb.StringValue { + if x != nil { + return x.Result + } + return nil +} + +func (x *ExecutionCompletedEvent) GetFailureDetails() *TaskFailureDetails { + if x != nil { + return x.FailureDetails + } + return nil +} + +type ExecutionTerminatedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Input *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + Recurse bool `protobuf:"varint,2,opt,name=recurse,proto3" json:"recurse,omitempty"` +} + +func (x *ExecutionTerminatedEvent) Reset() { + *x = ExecutionTerminatedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionTerminatedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionTerminatedEvent) ProtoMessage() {} + +func (x *ExecutionTerminatedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionTerminatedEvent.ProtoReflect.Descriptor instead. +func (*ExecutionTerminatedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{2} +} + +func (x *ExecutionTerminatedEvent) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +func (x *ExecutionTerminatedEvent) GetRecurse() bool { + if x != nil { + return x.Recurse + } + return false +} + +type TaskScheduledEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` + ParentTraceContext *TraceContext `protobuf:"bytes,4,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` + TaskExecutionId string `protobuf:"bytes,5,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` + // If defined, indicates that this task was the starting point of a new + // workflow execution as the result of a rerun operation. + RerunParentInstanceInfo *RerunParentInstanceInfo `protobuf:"bytes,6,opt,name=rerunParentInstanceInfo,proto3,oneof" json:"rerunParentInstanceInfo,omitempty"` +} + +func (x *TaskScheduledEvent) Reset() { + *x = TaskScheduledEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskScheduledEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskScheduledEvent) ProtoMessage() {} + +func (x *TaskScheduledEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskScheduledEvent.ProtoReflect.Descriptor instead. +func (*TaskScheduledEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{3} +} + +func (x *TaskScheduledEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TaskScheduledEvent) GetVersion() *wrapperspb.StringValue { + if x != nil { + return x.Version + } + return nil +} + +func (x *TaskScheduledEvent) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +func (x *TaskScheduledEvent) GetParentTraceContext() *TraceContext { + if x != nil { + return x.ParentTraceContext + } + return nil +} + +func (x *TaskScheduledEvent) GetTaskExecutionId() string { + if x != nil { + return x.TaskExecutionId + } + return "" +} + +func (x *TaskScheduledEvent) GetRerunParentInstanceInfo() *RerunParentInstanceInfo { + if x != nil { + return x.RerunParentInstanceInfo + } + return nil +} + +type TaskCompletedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` + Result *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + TaskExecutionId string `protobuf:"bytes,3,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` +} + +func (x *TaskCompletedEvent) Reset() { + *x = TaskCompletedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskCompletedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskCompletedEvent) ProtoMessage() {} + +func (x *TaskCompletedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskCompletedEvent.ProtoReflect.Descriptor instead. +func (*TaskCompletedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{4} +} + +func (x *TaskCompletedEvent) GetTaskScheduledId() int32 { + if x != nil { + return x.TaskScheduledId + } + return 0 +} + +func (x *TaskCompletedEvent) GetResult() *wrapperspb.StringValue { + if x != nil { + return x.Result + } + return nil +} + +func (x *TaskCompletedEvent) GetTaskExecutionId() string { + if x != nil { + return x.TaskExecutionId + } + return "" +} + +type TaskFailedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` + FailureDetails *TaskFailureDetails `protobuf:"bytes,2,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` + TaskExecutionId string `protobuf:"bytes,3,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` +} + +func (x *TaskFailedEvent) Reset() { + *x = TaskFailedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskFailedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskFailedEvent) ProtoMessage() {} + +func (x *TaskFailedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskFailedEvent.ProtoReflect.Descriptor instead. +func (*TaskFailedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{5} +} + +func (x *TaskFailedEvent) GetTaskScheduledId() int32 { + if x != nil { + return x.TaskScheduledId + } + return 0 +} + +func (x *TaskFailedEvent) GetFailureDetails() *TaskFailureDetails { + if x != nil { + return x.FailureDetails + } + return nil +} + +func (x *TaskFailedEvent) GetTaskExecutionId() string { + if x != nil { + return x.TaskExecutionId + } + return "" +} + +type ChildWorkflowInstanceCreatedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"` + ParentTraceContext *TraceContext `protobuf:"bytes,5,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` + // If defined, indicates that this task was the starting point of a new + // workflow execution as the result of a rerun operation. + RerunParentInstanceInfo *RerunParentInstanceInfo `protobuf:"bytes,6,opt,name=rerunParentInstanceInfo,proto3,oneof" json:"rerunParentInstanceInfo,omitempty"` +} + +func (x *ChildWorkflowInstanceCreatedEvent) Reset() { + *x = ChildWorkflowInstanceCreatedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChildWorkflowInstanceCreatedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChildWorkflowInstanceCreatedEvent) ProtoMessage() {} + +func (x *ChildWorkflowInstanceCreatedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChildWorkflowInstanceCreatedEvent.ProtoReflect.Descriptor instead. +func (*ChildWorkflowInstanceCreatedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{6} +} + +func (x *ChildWorkflowInstanceCreatedEvent) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *ChildWorkflowInstanceCreatedEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ChildWorkflowInstanceCreatedEvent) GetVersion() *wrapperspb.StringValue { + if x != nil { + return x.Version + } + return nil +} + +func (x *ChildWorkflowInstanceCreatedEvent) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +func (x *ChildWorkflowInstanceCreatedEvent) GetParentTraceContext() *TraceContext { + if x != nil { + return x.ParentTraceContext + } + return nil +} + +func (x *ChildWorkflowInstanceCreatedEvent) GetRerunParentInstanceInfo() *RerunParentInstanceInfo { + if x != nil { + return x.RerunParentInstanceInfo + } + return nil +} + +type ChildWorkflowInstanceCompletedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` + Result *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *ChildWorkflowInstanceCompletedEvent) Reset() { + *x = ChildWorkflowInstanceCompletedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChildWorkflowInstanceCompletedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChildWorkflowInstanceCompletedEvent) ProtoMessage() {} + +func (x *ChildWorkflowInstanceCompletedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChildWorkflowInstanceCompletedEvent.ProtoReflect.Descriptor instead. +func (*ChildWorkflowInstanceCompletedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{7} +} + +func (x *ChildWorkflowInstanceCompletedEvent) GetTaskScheduledId() int32 { + if x != nil { + return x.TaskScheduledId + } + return 0 +} + +func (x *ChildWorkflowInstanceCompletedEvent) GetResult() *wrapperspb.StringValue { + if x != nil { + return x.Result + } + return nil +} + +type ChildWorkflowInstanceFailedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` + FailureDetails *TaskFailureDetails `protobuf:"bytes,2,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` +} + +func (x *ChildWorkflowInstanceFailedEvent) Reset() { + *x = ChildWorkflowInstanceFailedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChildWorkflowInstanceFailedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChildWorkflowInstanceFailedEvent) ProtoMessage() {} + +func (x *ChildWorkflowInstanceFailedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChildWorkflowInstanceFailedEvent.ProtoReflect.Descriptor instead. +func (*ChildWorkflowInstanceFailedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{8} +} + +func (x *ChildWorkflowInstanceFailedEvent) GetTaskScheduledId() int32 { + if x != nil { + return x.TaskScheduledId + } + return 0 +} + +func (x *ChildWorkflowInstanceFailedEvent) GetFailureDetails() *TaskFailureDetails { + if x != nil { + return x.FailureDetails + } + return nil +} + +// Indicates the timer was created by a createTimer call with no special origin. +type TimerOriginCreateTimer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TimerOriginCreateTimer) Reset() { + *x = TimerOriginCreateTimer{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimerOriginCreateTimer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimerOriginCreateTimer) ProtoMessage() {} + +func (x *TimerOriginCreateTimer) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimerOriginCreateTimer.ProtoReflect.Descriptor instead. +func (*TimerOriginCreateTimer) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{9} +} + +// Indicates the timer was created as a timeout for a waitForExternalEvent call. +type TimerOriginExternalEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the external event being waited on, matching EventRaisedEvent.name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *TimerOriginExternalEvent) Reset() { + *x = TimerOriginExternalEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimerOriginExternalEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimerOriginExternalEvent) ProtoMessage() {} + +func (x *TimerOriginExternalEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimerOriginExternalEvent.ProtoReflect.Descriptor instead. +func (*TimerOriginExternalEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{10} +} + +func (x *TimerOriginExternalEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type TimerCreatedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FireAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=fireAt,proto3" json:"fireAt,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` + // If defined, indicates that this task was the starting point of a new + // workflow execution as the result of a rerun operation. + RerunParentInstanceInfo *RerunParentInstanceInfo `protobuf:"bytes,3,opt,name=rerunParentInstanceInfo,proto3,oneof" json:"rerunParentInstanceInfo,omitempty"` + // If set, provides additional context attached to this timer. + // + // Types that are assignable to Origin: + // + // *TimerCreatedEvent_CreateTimer + // *TimerCreatedEvent_ExternalEvent + Origin isTimerCreatedEvent_Origin `protobuf_oneof:"origin"` +} + +func (x *TimerCreatedEvent) Reset() { + *x = TimerCreatedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimerCreatedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimerCreatedEvent) ProtoMessage() {} + +func (x *TimerCreatedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimerCreatedEvent.ProtoReflect.Descriptor instead. +func (*TimerCreatedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{11} +} + +func (x *TimerCreatedEvent) GetFireAt() *timestamppb.Timestamp { + if x != nil { + return x.FireAt + } + return nil +} + +func (x *TimerCreatedEvent) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *TimerCreatedEvent) GetRerunParentInstanceInfo() *RerunParentInstanceInfo { + if x != nil { + return x.RerunParentInstanceInfo + } + return nil +} + +func (m *TimerCreatedEvent) GetOrigin() isTimerCreatedEvent_Origin { + if m != nil { + return m.Origin + } + return nil +} + +func (x *TimerCreatedEvent) GetCreateTimer() *TimerOriginCreateTimer { + if x, ok := x.GetOrigin().(*TimerCreatedEvent_CreateTimer); ok { + return x.CreateTimer + } + return nil +} + +func (x *TimerCreatedEvent) GetExternalEvent() *TimerOriginExternalEvent { + if x, ok := x.GetOrigin().(*TimerCreatedEvent_ExternalEvent); ok { + return x.ExternalEvent + } + return nil +} + +type isTimerCreatedEvent_Origin interface { + isTimerCreatedEvent_Origin() +} + +type TimerCreatedEvent_CreateTimer struct { + CreateTimer *TimerOriginCreateTimer `protobuf:"bytes,4,opt,name=createTimer,proto3,oneof"` +} + +type TimerCreatedEvent_ExternalEvent struct { + ExternalEvent *TimerOriginExternalEvent `protobuf:"bytes,5,opt,name=externalEvent,proto3,oneof"` +} + +func (*TimerCreatedEvent_CreateTimer) isTimerCreatedEvent_Origin() {} + +func (*TimerCreatedEvent_ExternalEvent) isTimerCreatedEvent_Origin() {} + +type TimerFiredEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FireAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=fireAt,proto3" json:"fireAt,omitempty"` + TimerId int32 `protobuf:"varint,2,opt,name=timerId,proto3" json:"timerId,omitempty"` +} + +func (x *TimerFiredEvent) Reset() { + *x = TimerFiredEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimerFiredEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimerFiredEvent) ProtoMessage() {} + +func (x *TimerFiredEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimerFiredEvent.ProtoReflect.Descriptor instead. +func (*TimerFiredEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{12} +} + +func (x *TimerFiredEvent) GetFireAt() *timestamppb.Timestamp { + if x != nil { + return x.FireAt + } + return nil +} + +func (x *TimerFiredEvent) GetTimerId() int32 { + if x != nil { + return x.TimerId + } + return 0 +} + +type WorkflowStartedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version *WorkflowVersion `protobuf:"bytes,1,opt,name=version,proto3,oneof" json:"version,omitempty"` +} + +func (x *WorkflowStartedEvent) Reset() { + *x = WorkflowStartedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowStartedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowStartedEvent) ProtoMessage() {} + +func (x *WorkflowStartedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowStartedEvent.ProtoReflect.Descriptor instead. +func (*WorkflowStartedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{13} +} + +func (x *WorkflowStartedEvent) GetVersion() *WorkflowVersion { + if x != nil { + return x.Version + } + return nil +} + +type WorkflowCompletedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WorkflowCompletedEvent) Reset() { + *x = WorkflowCompletedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowCompletedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowCompletedEvent) ProtoMessage() {} + +func (x *WorkflowCompletedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowCompletedEvent.ProtoReflect.Descriptor instead. +func (*WorkflowCompletedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{14} +} + +type EventSentEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *EventSentEvent) Reset() { + *x = EventSentEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventSentEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventSentEvent) ProtoMessage() {} + +func (x *EventSentEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventSentEvent.ProtoReflect.Descriptor instead. +func (*EventSentEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{15} +} + +func (x *EventSentEvent) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *EventSentEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EventSentEvent) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +type EventRaisedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *EventRaisedEvent) Reset() { + *x = EventRaisedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventRaisedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventRaisedEvent) ProtoMessage() {} + +func (x *EventRaisedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventRaisedEvent.ProtoReflect.Descriptor instead. +func (*EventRaisedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{16} +} + +func (x *EventRaisedEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EventRaisedEvent) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +type ContinueAsNewEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Input *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *ContinueAsNewEvent) Reset() { + *x = ContinueAsNewEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContinueAsNewEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContinueAsNewEvent) ProtoMessage() {} + +func (x *ContinueAsNewEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContinueAsNewEvent.ProtoReflect.Descriptor instead. +func (*ContinueAsNewEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{17} +} + +func (x *ContinueAsNewEvent) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +type ExecutionSuspendedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Input *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *ExecutionSuspendedEvent) Reset() { + *x = ExecutionSuspendedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionSuspendedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionSuspendedEvent) ProtoMessage() {} + +func (x *ExecutionSuspendedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionSuspendedEvent.ProtoReflect.Descriptor instead. +func (*ExecutionSuspendedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{18} +} + +func (x *ExecutionSuspendedEvent) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +type ExecutionResumedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Input *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *ExecutionResumedEvent) Reset() { + *x = ExecutionResumedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionResumedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionResumedEvent) ProtoMessage() {} + +func (x *ExecutionResumedEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionResumedEvent.ProtoReflect.Descriptor instead. +func (*ExecutionResumedEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{19} +} + +func (x *ExecutionResumedEvent) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +type ExecutionStalledEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reason StalledReason `protobuf:"varint,1,opt,name=reason,proto3,enum=StalledReason" json:"reason,omitempty"` + Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` +} + +func (x *ExecutionStalledEvent) Reset() { + *x = ExecutionStalledEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionStalledEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionStalledEvent) ProtoMessage() {} + +func (x *ExecutionStalledEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionStalledEvent.ProtoReflect.Descriptor instead. +func (*ExecutionStalledEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{20} +} + +func (x *ExecutionStalledEvent) GetReason() StalledReason { + if x != nil { + return x.Reason + } + return StalledReason_PATCH_MISMATCH +} + +func (x *ExecutionStalledEvent) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +type HistoryEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EventId int32 `protobuf:"varint,1,opt,name=eventId,proto3" json:"eventId,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Types that are assignable to EventType: + // + // *HistoryEvent_ExecutionStarted + // *HistoryEvent_ExecutionCompleted + // *HistoryEvent_ExecutionTerminated + // *HistoryEvent_TaskScheduled + // *HistoryEvent_TaskCompleted + // *HistoryEvent_TaskFailed + // *HistoryEvent_ChildWorkflowInstanceCreated + // *HistoryEvent_ChildWorkflowInstanceCompleted + // *HistoryEvent_ChildWorkflowInstanceFailed + // *HistoryEvent_TimerCreated + // *HistoryEvent_TimerFired + // *HistoryEvent_WorkflowStarted + // *HistoryEvent_WorkflowCompleted + // *HistoryEvent_EventSent + // *HistoryEvent_EventRaised + // *HistoryEvent_ContinueAsNew + // *HistoryEvent_ExecutionSuspended + // *HistoryEvent_ExecutionResumed + // *HistoryEvent_ExecutionStalled + EventType isHistoryEvent_EventType `protobuf_oneof:"eventType"` + Router *TaskRouter `protobuf:"bytes,30,opt,name=router,proto3,oneof" json:"router,omitempty"` +} + +func (x *HistoryEvent) Reset() { + *x = HistoryEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_history_events_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HistoryEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HistoryEvent) ProtoMessage() {} + +func (x *HistoryEvent) ProtoReflect() protoreflect.Message { + mi := &file_history_events_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HistoryEvent.ProtoReflect.Descriptor instead. +func (*HistoryEvent) Descriptor() ([]byte, []int) { + return file_history_events_proto_rawDescGZIP(), []int{21} +} + +func (x *HistoryEvent) GetEventId() int32 { + if x != nil { + return x.EventId + } + return 0 +} + +func (x *HistoryEvent) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (m *HistoryEvent) GetEventType() isHistoryEvent_EventType { + if m != nil { + return m.EventType + } + return nil +} + +func (x *HistoryEvent) GetExecutionStarted() *ExecutionStartedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ExecutionStarted); ok { + return x.ExecutionStarted + } + return nil +} + +func (x *HistoryEvent) GetExecutionCompleted() *ExecutionCompletedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ExecutionCompleted); ok { + return x.ExecutionCompleted + } + return nil +} + +func (x *HistoryEvent) GetExecutionTerminated() *ExecutionTerminatedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ExecutionTerminated); ok { + return x.ExecutionTerminated + } + return nil +} + +func (x *HistoryEvent) GetTaskScheduled() *TaskScheduledEvent { + if x, ok := x.GetEventType().(*HistoryEvent_TaskScheduled); ok { + return x.TaskScheduled + } + return nil +} + +func (x *HistoryEvent) GetTaskCompleted() *TaskCompletedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_TaskCompleted); ok { + return x.TaskCompleted + } + return nil +} + +func (x *HistoryEvent) GetTaskFailed() *TaskFailedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_TaskFailed); ok { + return x.TaskFailed + } + return nil +} + +func (x *HistoryEvent) GetChildWorkflowInstanceCreated() *ChildWorkflowInstanceCreatedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ChildWorkflowInstanceCreated); ok { + return x.ChildWorkflowInstanceCreated + } + return nil +} + +func (x *HistoryEvent) GetChildWorkflowInstanceCompleted() *ChildWorkflowInstanceCompletedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ChildWorkflowInstanceCompleted); ok { + return x.ChildWorkflowInstanceCompleted + } + return nil +} + +func (x *HistoryEvent) GetChildWorkflowInstanceFailed() *ChildWorkflowInstanceFailedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ChildWorkflowInstanceFailed); ok { + return x.ChildWorkflowInstanceFailed + } + return nil +} + +func (x *HistoryEvent) GetTimerCreated() *TimerCreatedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_TimerCreated); ok { + return x.TimerCreated + } + return nil +} + +func (x *HistoryEvent) GetTimerFired() *TimerFiredEvent { + if x, ok := x.GetEventType().(*HistoryEvent_TimerFired); ok { + return x.TimerFired + } + return nil +} + +func (x *HistoryEvent) GetWorkflowStarted() *WorkflowStartedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_WorkflowStarted); ok { + return x.WorkflowStarted + } + return nil +} + +func (x *HistoryEvent) GetWorkflowCompleted() *WorkflowCompletedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_WorkflowCompleted); ok { + return x.WorkflowCompleted + } + return nil +} + +func (x *HistoryEvent) GetEventSent() *EventSentEvent { + if x, ok := x.GetEventType().(*HistoryEvent_EventSent); ok { + return x.EventSent + } + return nil +} + +func (x *HistoryEvent) GetEventRaised() *EventRaisedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_EventRaised); ok { + return x.EventRaised + } + return nil +} + +func (x *HistoryEvent) GetContinueAsNew() *ContinueAsNewEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ContinueAsNew); ok { + return x.ContinueAsNew + } + return nil +} + +func (x *HistoryEvent) GetExecutionSuspended() *ExecutionSuspendedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ExecutionSuspended); ok { + return x.ExecutionSuspended + } + return nil +} + +func (x *HistoryEvent) GetExecutionResumed() *ExecutionResumedEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ExecutionResumed); ok { + return x.ExecutionResumed + } + return nil +} + +func (x *HistoryEvent) GetExecutionStalled() *ExecutionStalledEvent { + if x, ok := x.GetEventType().(*HistoryEvent_ExecutionStalled); ok { + return x.ExecutionStalled + } + return nil +} + +func (x *HistoryEvent) GetRouter() *TaskRouter { + if x != nil { + return x.Router + } + return nil +} + +type isHistoryEvent_EventType interface { + isHistoryEvent_EventType() +} + +type HistoryEvent_ExecutionStarted struct { + ExecutionStarted *ExecutionStartedEvent `protobuf:"bytes,3,opt,name=executionStarted,proto3,oneof"` +} + +type HistoryEvent_ExecutionCompleted struct { + ExecutionCompleted *ExecutionCompletedEvent `protobuf:"bytes,4,opt,name=executionCompleted,proto3,oneof"` +} + +type HistoryEvent_ExecutionTerminated struct { + ExecutionTerminated *ExecutionTerminatedEvent `protobuf:"bytes,5,opt,name=executionTerminated,proto3,oneof"` +} + +type HistoryEvent_TaskScheduled struct { + TaskScheduled *TaskScheduledEvent `protobuf:"bytes,6,opt,name=taskScheduled,proto3,oneof"` +} + +type HistoryEvent_TaskCompleted struct { + TaskCompleted *TaskCompletedEvent `protobuf:"bytes,7,opt,name=taskCompleted,proto3,oneof"` +} + +type HistoryEvent_TaskFailed struct { + TaskFailed *TaskFailedEvent `protobuf:"bytes,8,opt,name=taskFailed,proto3,oneof"` +} + +type HistoryEvent_ChildWorkflowInstanceCreated struct { + ChildWorkflowInstanceCreated *ChildWorkflowInstanceCreatedEvent `protobuf:"bytes,9,opt,name=childWorkflowInstanceCreated,proto3,oneof"` +} + +type HistoryEvent_ChildWorkflowInstanceCompleted struct { + ChildWorkflowInstanceCompleted *ChildWorkflowInstanceCompletedEvent `protobuf:"bytes,10,opt,name=childWorkflowInstanceCompleted,proto3,oneof"` +} + +type HistoryEvent_ChildWorkflowInstanceFailed struct { + ChildWorkflowInstanceFailed *ChildWorkflowInstanceFailedEvent `protobuf:"bytes,11,opt,name=childWorkflowInstanceFailed,proto3,oneof"` +} + +type HistoryEvent_TimerCreated struct { + TimerCreated *TimerCreatedEvent `protobuf:"bytes,12,opt,name=timerCreated,proto3,oneof"` +} + +type HistoryEvent_TimerFired struct { + TimerFired *TimerFiredEvent `protobuf:"bytes,13,opt,name=timerFired,proto3,oneof"` +} + +type HistoryEvent_WorkflowStarted struct { + WorkflowStarted *WorkflowStartedEvent `protobuf:"bytes,14,opt,name=workflowStarted,proto3,oneof"` +} + +type HistoryEvent_WorkflowCompleted struct { + WorkflowCompleted *WorkflowCompletedEvent `protobuf:"bytes,15,opt,name=workflowCompleted,proto3,oneof"` +} + +type HistoryEvent_EventSent struct { + EventSent *EventSentEvent `protobuf:"bytes,16,opt,name=eventSent,proto3,oneof"` +} + +type HistoryEvent_EventRaised struct { + EventRaised *EventRaisedEvent `protobuf:"bytes,17,opt,name=eventRaised,proto3,oneof"` +} + +type HistoryEvent_ContinueAsNew struct { + ContinueAsNew *ContinueAsNewEvent `protobuf:"bytes,20,opt,name=continueAsNew,proto3,oneof"` +} + +type HistoryEvent_ExecutionSuspended struct { + ExecutionSuspended *ExecutionSuspendedEvent `protobuf:"bytes,21,opt,name=executionSuspended,proto3,oneof"` +} + +type HistoryEvent_ExecutionResumed struct { + ExecutionResumed *ExecutionResumedEvent `protobuf:"bytes,22,opt,name=executionResumed,proto3,oneof"` +} + +type HistoryEvent_ExecutionStalled struct { + ExecutionStalled *ExecutionStalledEvent `protobuf:"bytes,31,opt,name=executionStalled,proto3,oneof"` +} + +func (*HistoryEvent_ExecutionStarted) isHistoryEvent_EventType() {} + +func (*HistoryEvent_ExecutionCompleted) isHistoryEvent_EventType() {} + +func (*HistoryEvent_ExecutionTerminated) isHistoryEvent_EventType() {} + +func (*HistoryEvent_TaskScheduled) isHistoryEvent_EventType() {} + +func (*HistoryEvent_TaskCompleted) isHistoryEvent_EventType() {} + +func (*HistoryEvent_TaskFailed) isHistoryEvent_EventType() {} + +func (*HistoryEvent_ChildWorkflowInstanceCreated) isHistoryEvent_EventType() {} + +func (*HistoryEvent_ChildWorkflowInstanceCompleted) isHistoryEvent_EventType() {} + +func (*HistoryEvent_ChildWorkflowInstanceFailed) isHistoryEvent_EventType() {} + +func (*HistoryEvent_TimerCreated) isHistoryEvent_EventType() {} + +func (*HistoryEvent_TimerFired) isHistoryEvent_EventType() {} + +func (*HistoryEvent_WorkflowStarted) isHistoryEvent_EventType() {} + +func (*HistoryEvent_WorkflowCompleted) isHistoryEvent_EventType() {} + +func (*HistoryEvent_EventSent) isHistoryEvent_EventType() {} + +func (*HistoryEvent_EventRaised) isHistoryEvent_EventType() {} + +func (*HistoryEvent_ContinueAsNew) isHistoryEvent_EventType() {} + +func (*HistoryEvent_ExecutionSuspended) isHistoryEvent_EventType() {} + +func (*HistoryEvent_ExecutionResumed) isHistoryEvent_EventType() {} + +func (*HistoryEvent_ExecutionStalled) isHistoryEvent_EventType() {} + +var File_history_events_proto protoreflect.FileDescriptor + +var file_history_events_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x04, 0x0a, + 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3d, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x54, 0x0a, 0x17, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x17, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3d, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x53, 0x70, 0x61, 0x6e, 0x49, 0x44, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x70, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x34, 0x0a, + 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, + 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xca, 0x01, 0x0a, + 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x0e, + 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x68, 0x0a, 0x18, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x63, + 0x75, 0x72, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x63, 0x75, + 0x72, 0x73, 0x65, 0x22, 0xf2, 0x02, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3d, 0x0a, 0x12, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, + 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x57, 0x0a, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, + 0x52, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, + 0x5f, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x9e, 0x01, 0x0a, 0x12, 0x54, 0x61, 0x73, + 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xa2, 0x01, 0x0a, 0x0f, 0x54, 0x61, + 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, + 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, + 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xf7, + 0x02, 0x0a, 0x21, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3d, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, + 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x12, 0x57, 0x0a, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, + 0x52, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, + 0x5f, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x23, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0x89, 0x01, 0x0a, 0x20, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, + 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x12, + 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x18, 0x0a, 0x16, + 0x54, 0x69, 0x6d, 0x65, 0x72, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x22, 0x2e, 0x0a, 0x18, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe8, 0x02, 0x0a, 0x11, 0x54, 0x69, 0x6d, 0x65, 0x72, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, + 0x66, 0x69, 0x72, 0x65, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x06, 0x66, 0x69, 0x72, 0x65, 0x41, 0x74, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x57, 0x0a, 0x17, 0x72, 0x65, 0x72, + 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x72, + 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x02, 0x52, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x88, + 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, + 0x41, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x5f, 0x0a, 0x0f, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x46, 0x69, 0x72, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x66, 0x69, 0x72, 0x65, 0x41, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x06, 0x66, 0x69, 0x72, 0x65, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x72, + 0x49, 0x64, 0x22, 0x53, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x18, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x22, 0x78, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x5a, 0x0a, 0x10, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x69, 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x48, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x65, 0x41, 0x73, 0x4e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, + 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x22, 0x4d, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, + 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x05, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6d, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x76, 0x0a, + 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x25, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa1, 0x0c, 0x0a, 0x0c, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x44, 0x0a, 0x10, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x10, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x12, 0x4a, 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x13, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x0d, 0x74, + 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, + 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x74, + 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x68, 0x0a, 0x1c, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x6e, 0x0a, 0x1e, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x1e, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x12, 0x65, 0x0a, 0x1b, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x69, 0x6c, + 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1b, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x69, + 0x6d, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x46, 0x69, 0x72, + 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, + 0x46, 0x69, 0x72, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x69, + 0x6d, 0x65, 0x72, 0x46, 0x69, 0x72, 0x65, 0x64, 0x12, 0x41, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x11, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, + 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, + 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x61, + 0x69, 0x73, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x61, 0x69, 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x69, 0x73, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x0d, + 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x73, 0x4e, 0x65, 0x77, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x73, + 0x4e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x65, 0x41, 0x73, 0x4e, 0x65, 0x77, 0x12, 0x4a, 0x0a, 0x12, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x73, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x44, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, + 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x44, 0x0a, 0x10, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x18, + 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, + 0x64, 0x12, 0x28, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x48, 0x01, + 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, + 0x04, 0x08, 0x17, 0x10, 0x18, 0x4a, 0x04, 0x08, 0x18, 0x10, 0x19, 0x4a, 0x04, 0x08, 0x19, 0x10, + 0x1a, 0x4a, 0x04, 0x08, 0x1a, 0x10, 0x1b, 0x4a, 0x04, 0x08, 0x1b, 0x10, 0x1c, 0x4a, 0x04, 0x08, + 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x42, 0x56, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, + 0x64, 0x61, 0x70, 0x72, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, + 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5a, 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xaa, 0x02, 0x19, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_history_events_proto_rawDescOnce sync.Once + file_history_events_proto_rawDescData = file_history_events_proto_rawDesc +) + +func file_history_events_proto_rawDescGZIP() []byte { + file_history_events_proto_rawDescOnce.Do(func() { + file_history_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_history_events_proto_rawDescData) + }) + return file_history_events_proto_rawDescData +} + +var file_history_events_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_history_events_proto_goTypes = []interface{}{ + (*ExecutionStartedEvent)(nil), // 0: ExecutionStartedEvent + (*ExecutionCompletedEvent)(nil), // 1: ExecutionCompletedEvent + (*ExecutionTerminatedEvent)(nil), // 2: ExecutionTerminatedEvent + (*TaskScheduledEvent)(nil), // 3: TaskScheduledEvent + (*TaskCompletedEvent)(nil), // 4: TaskCompletedEvent + (*TaskFailedEvent)(nil), // 5: TaskFailedEvent + (*ChildWorkflowInstanceCreatedEvent)(nil), // 6: ChildWorkflowInstanceCreatedEvent + (*ChildWorkflowInstanceCompletedEvent)(nil), // 7: ChildWorkflowInstanceCompletedEvent + (*ChildWorkflowInstanceFailedEvent)(nil), // 8: ChildWorkflowInstanceFailedEvent + (*TimerOriginCreateTimer)(nil), // 9: TimerOriginCreateTimer + (*TimerOriginExternalEvent)(nil), // 10: TimerOriginExternalEvent + (*TimerCreatedEvent)(nil), // 11: TimerCreatedEvent + (*TimerFiredEvent)(nil), // 12: TimerFiredEvent + (*WorkflowStartedEvent)(nil), // 13: WorkflowStartedEvent + (*WorkflowCompletedEvent)(nil), // 14: WorkflowCompletedEvent + (*EventSentEvent)(nil), // 15: EventSentEvent + (*EventRaisedEvent)(nil), // 16: EventRaisedEvent + (*ContinueAsNewEvent)(nil), // 17: ContinueAsNewEvent + (*ExecutionSuspendedEvent)(nil), // 18: ExecutionSuspendedEvent + (*ExecutionResumedEvent)(nil), // 19: ExecutionResumedEvent + (*ExecutionStalledEvent)(nil), // 20: ExecutionStalledEvent + (*HistoryEvent)(nil), // 21: HistoryEvent + nil, // 22: ExecutionStartedEvent.TagsEntry + (*wrapperspb.StringValue)(nil), // 23: google.protobuf.StringValue + (*WorkflowInstance)(nil), // 24: WorkflowInstance + (*ParentInstanceInfo)(nil), // 25: ParentInstanceInfo + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp + (*TraceContext)(nil), // 27: TraceContext + (OrchestrationStatus)(0), // 28: OrchestrationStatus + (*TaskFailureDetails)(nil), // 29: TaskFailureDetails + (*RerunParentInstanceInfo)(nil), // 30: RerunParentInstanceInfo + (*WorkflowVersion)(nil), // 31: WorkflowVersion + (StalledReason)(0), // 32: StalledReason + (*TaskRouter)(nil), // 33: TaskRouter +} +var file_history_events_proto_depIdxs = []int32{ + 23, // 0: ExecutionStartedEvent.version:type_name -> google.protobuf.StringValue + 23, // 1: ExecutionStartedEvent.input:type_name -> google.protobuf.StringValue + 24, // 2: ExecutionStartedEvent.workflowInstance:type_name -> WorkflowInstance + 25, // 3: ExecutionStartedEvent.parentInstance:type_name -> ParentInstanceInfo + 26, // 4: ExecutionStartedEvent.scheduledStartTimestamp:type_name -> google.protobuf.Timestamp + 27, // 5: ExecutionStartedEvent.parentTraceContext:type_name -> TraceContext + 23, // 6: ExecutionStartedEvent.workflowSpanID:type_name -> google.protobuf.StringValue + 22, // 7: ExecutionStartedEvent.tags:type_name -> ExecutionStartedEvent.TagsEntry + 28, // 8: ExecutionCompletedEvent.workflowStatus:type_name -> OrchestrationStatus + 23, // 9: ExecutionCompletedEvent.result:type_name -> google.protobuf.StringValue + 29, // 10: ExecutionCompletedEvent.failureDetails:type_name -> TaskFailureDetails + 23, // 11: ExecutionTerminatedEvent.input:type_name -> google.protobuf.StringValue + 23, // 12: TaskScheduledEvent.version:type_name -> google.protobuf.StringValue + 23, // 13: TaskScheduledEvent.input:type_name -> google.protobuf.StringValue + 27, // 14: TaskScheduledEvent.parentTraceContext:type_name -> TraceContext + 30, // 15: TaskScheduledEvent.rerunParentInstanceInfo:type_name -> RerunParentInstanceInfo + 23, // 16: TaskCompletedEvent.result:type_name -> google.protobuf.StringValue + 29, // 17: TaskFailedEvent.failureDetails:type_name -> TaskFailureDetails + 23, // 18: ChildWorkflowInstanceCreatedEvent.version:type_name -> google.protobuf.StringValue + 23, // 19: ChildWorkflowInstanceCreatedEvent.input:type_name -> google.protobuf.StringValue + 27, // 20: ChildWorkflowInstanceCreatedEvent.parentTraceContext:type_name -> TraceContext + 30, // 21: ChildWorkflowInstanceCreatedEvent.rerunParentInstanceInfo:type_name -> RerunParentInstanceInfo + 23, // 22: ChildWorkflowInstanceCompletedEvent.result:type_name -> google.protobuf.StringValue + 29, // 23: ChildWorkflowInstanceFailedEvent.failureDetails:type_name -> TaskFailureDetails + 26, // 24: TimerCreatedEvent.fireAt:type_name -> google.protobuf.Timestamp + 30, // 25: TimerCreatedEvent.rerunParentInstanceInfo:type_name -> RerunParentInstanceInfo + 9, // 26: TimerCreatedEvent.createTimer:type_name -> TimerOriginCreateTimer + 10, // 27: TimerCreatedEvent.externalEvent:type_name -> TimerOriginExternalEvent + 26, // 28: TimerFiredEvent.fireAt:type_name -> google.protobuf.Timestamp + 31, // 29: WorkflowStartedEvent.version:type_name -> WorkflowVersion + 23, // 30: EventSentEvent.input:type_name -> google.protobuf.StringValue + 23, // 31: EventRaisedEvent.input:type_name -> google.protobuf.StringValue + 23, // 32: ContinueAsNewEvent.input:type_name -> google.protobuf.StringValue + 23, // 33: ExecutionSuspendedEvent.input:type_name -> google.protobuf.StringValue + 23, // 34: ExecutionResumedEvent.input:type_name -> google.protobuf.StringValue + 32, // 35: ExecutionStalledEvent.reason:type_name -> StalledReason + 26, // 36: HistoryEvent.timestamp:type_name -> google.protobuf.Timestamp + 0, // 37: HistoryEvent.executionStarted:type_name -> ExecutionStartedEvent + 1, // 38: HistoryEvent.executionCompleted:type_name -> ExecutionCompletedEvent + 2, // 39: HistoryEvent.executionTerminated:type_name -> ExecutionTerminatedEvent + 3, // 40: HistoryEvent.taskScheduled:type_name -> TaskScheduledEvent + 4, // 41: HistoryEvent.taskCompleted:type_name -> TaskCompletedEvent + 5, // 42: HistoryEvent.taskFailed:type_name -> TaskFailedEvent + 6, // 43: HistoryEvent.childWorkflowInstanceCreated:type_name -> ChildWorkflowInstanceCreatedEvent + 7, // 44: HistoryEvent.childWorkflowInstanceCompleted:type_name -> ChildWorkflowInstanceCompletedEvent + 8, // 45: HistoryEvent.childWorkflowInstanceFailed:type_name -> ChildWorkflowInstanceFailedEvent + 11, // 46: HistoryEvent.timerCreated:type_name -> TimerCreatedEvent + 12, // 47: HistoryEvent.timerFired:type_name -> TimerFiredEvent + 13, // 48: HistoryEvent.workflowStarted:type_name -> WorkflowStartedEvent + 14, // 49: HistoryEvent.workflowCompleted:type_name -> WorkflowCompletedEvent + 15, // 50: HistoryEvent.eventSent:type_name -> EventSentEvent + 16, // 51: HistoryEvent.eventRaised:type_name -> EventRaisedEvent + 17, // 52: HistoryEvent.continueAsNew:type_name -> ContinueAsNewEvent + 18, // 53: HistoryEvent.executionSuspended:type_name -> ExecutionSuspendedEvent + 19, // 54: HistoryEvent.executionResumed:type_name -> ExecutionResumedEvent + 20, // 55: HistoryEvent.executionStalled:type_name -> ExecutionStalledEvent + 33, // 56: HistoryEvent.router:type_name -> TaskRouter + 57, // [57:57] is the sub-list for method output_type + 57, // [57:57] is the sub-list for method input_type + 57, // [57:57] is the sub-list for extension type_name + 57, // [57:57] is the sub-list for extension extendee + 0, // [0:57] is the sub-list for field type_name +} + +func init() { file_history_events_proto_init() } +func file_history_events_proto_init() { + if File_history_events_proto != nil { + return + } + file_orchestration_proto_init() + if !protoimpl.UnsafeEnabled { + file_history_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionStartedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionCompletedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionTerminatedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskScheduledEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskCompletedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskFailedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChildWorkflowInstanceCreatedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChildWorkflowInstanceCompletedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChildWorkflowInstanceFailedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimerOriginCreateTimer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimerOriginExternalEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimerCreatedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimerFiredEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowStartedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowCompletedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventSentEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventRaisedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContinueAsNewEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionSuspendedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionResumedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionStalledEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_history_events_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HistoryEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_history_events_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_history_events_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_history_events_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*TimerCreatedEvent_CreateTimer)(nil), + (*TimerCreatedEvent_ExternalEvent)(nil), + } + file_history_events_proto_msgTypes[13].OneofWrappers = []interface{}{} + file_history_events_proto_msgTypes[20].OneofWrappers = []interface{}{} + file_history_events_proto_msgTypes[21].OneofWrappers = []interface{}{ + (*HistoryEvent_ExecutionStarted)(nil), + (*HistoryEvent_ExecutionCompleted)(nil), + (*HistoryEvent_ExecutionTerminated)(nil), + (*HistoryEvent_TaskScheduled)(nil), + (*HistoryEvent_TaskCompleted)(nil), + (*HistoryEvent_TaskFailed)(nil), + (*HistoryEvent_ChildWorkflowInstanceCreated)(nil), + (*HistoryEvent_ChildWorkflowInstanceCompleted)(nil), + (*HistoryEvent_ChildWorkflowInstanceFailed)(nil), + (*HistoryEvent_TimerCreated)(nil), + (*HistoryEvent_TimerFired)(nil), + (*HistoryEvent_WorkflowStarted)(nil), + (*HistoryEvent_WorkflowCompleted)(nil), + (*HistoryEvent_EventSent)(nil), + (*HistoryEvent_EventRaised)(nil), + (*HistoryEvent_ContinueAsNew)(nil), + (*HistoryEvent_ExecutionSuspended)(nil), + (*HistoryEvent_ExecutionResumed)(nil), + (*HistoryEvent_ExecutionStalled)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_history_events_proto_rawDesc, + NumEnums: 0, + NumMessages: 23, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_history_events_proto_goTypes, + DependencyIndexes: file_history_events_proto_depIdxs, + MessageInfos: file_history_events_proto_msgTypes, + }.Build() + File_history_events_proto = out.File + file_history_events_proto_rawDesc = nil + file_history_events_proto_goTypes = nil + file_history_events_proto_depIdxs = nil +} diff --git a/api/protos/orchestration.pb.go b/api/protos/orchestration.pb.go new file mode 100644 index 00000000..fe4aa7dd --- /dev/null +++ b/api/protos/orchestration.pb.go @@ -0,0 +1,1090 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.4 +// source: orchestration.proto + +package protos + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StalledReason int32 + +const ( + StalledReason_PATCH_MISMATCH StalledReason = 0 + StalledReason_VERSION_NOT_AVAILABLE StalledReason = 1 +) + +// Enum value maps for StalledReason. +var ( + StalledReason_name = map[int32]string{ + 0: "PATCH_MISMATCH", + 1: "VERSION_NOT_AVAILABLE", + } + StalledReason_value = map[string]int32{ + "PATCH_MISMATCH": 0, + "VERSION_NOT_AVAILABLE": 1, + } +) + +func (x StalledReason) Enum() *StalledReason { + p := new(StalledReason) + *p = x + return p +} + +func (x StalledReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StalledReason) Descriptor() protoreflect.EnumDescriptor { + return file_orchestration_proto_enumTypes[0].Descriptor() +} + +func (StalledReason) Type() protoreflect.EnumType { + return &file_orchestration_proto_enumTypes[0] +} + +func (x StalledReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StalledReason.Descriptor instead. +func (StalledReason) EnumDescriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{0} +} + +type OrchestrationStatus int32 + +const ( + OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING OrchestrationStatus = 0 + OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED OrchestrationStatus = 1 + OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW OrchestrationStatus = 2 + OrchestrationStatus_ORCHESTRATION_STATUS_FAILED OrchestrationStatus = 3 + OrchestrationStatus_ORCHESTRATION_STATUS_CANCELED OrchestrationStatus = 4 + OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED OrchestrationStatus = 5 + OrchestrationStatus_ORCHESTRATION_STATUS_PENDING OrchestrationStatus = 6 + OrchestrationStatus_ORCHESTRATION_STATUS_SUSPENDED OrchestrationStatus = 7 + OrchestrationStatus_ORCHESTRATION_STATUS_STALLED OrchestrationStatus = 8 +) + +// Enum value maps for OrchestrationStatus. +var ( + OrchestrationStatus_name = map[int32]string{ + 0: "ORCHESTRATION_STATUS_RUNNING", + 1: "ORCHESTRATION_STATUS_COMPLETED", + 2: "ORCHESTRATION_STATUS_CONTINUED_AS_NEW", + 3: "ORCHESTRATION_STATUS_FAILED", + 4: "ORCHESTRATION_STATUS_CANCELED", + 5: "ORCHESTRATION_STATUS_TERMINATED", + 6: "ORCHESTRATION_STATUS_PENDING", + 7: "ORCHESTRATION_STATUS_SUSPENDED", + 8: "ORCHESTRATION_STATUS_STALLED", + } + OrchestrationStatus_value = map[string]int32{ + "ORCHESTRATION_STATUS_RUNNING": 0, + "ORCHESTRATION_STATUS_COMPLETED": 1, + "ORCHESTRATION_STATUS_CONTINUED_AS_NEW": 2, + "ORCHESTRATION_STATUS_FAILED": 3, + "ORCHESTRATION_STATUS_CANCELED": 4, + "ORCHESTRATION_STATUS_TERMINATED": 5, + "ORCHESTRATION_STATUS_PENDING": 6, + "ORCHESTRATION_STATUS_SUSPENDED": 7, + "ORCHESTRATION_STATUS_STALLED": 8, + } +) + +func (x OrchestrationStatus) Enum() *OrchestrationStatus { + p := new(OrchestrationStatus) + *p = x + return p +} + +func (x OrchestrationStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OrchestrationStatus) Descriptor() protoreflect.EnumDescriptor { + return file_orchestration_proto_enumTypes[1].Descriptor() +} + +func (OrchestrationStatus) Type() protoreflect.EnumType { + return &file_orchestration_proto_enumTypes[1] +} + +func (x OrchestrationStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OrchestrationStatus.Descriptor instead. +func (OrchestrationStatus) EnumDescriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{1} +} + +type TaskRouter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceAppID string `protobuf:"bytes,1,opt,name=sourceAppID,proto3" json:"sourceAppID,omitempty"` + TargetAppID *string `protobuf:"bytes,2,opt,name=targetAppID,proto3,oneof" json:"targetAppID,omitempty"` +} + +func (x *TaskRouter) Reset() { + *x = TaskRouter{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskRouter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskRouter) ProtoMessage() {} + +func (x *TaskRouter) ProtoReflect() protoreflect.Message { + mi := &file_orchestration_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskRouter.ProtoReflect.Descriptor instead. +func (*TaskRouter) Descriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{0} +} + +func (x *TaskRouter) GetSourceAppID() string { + if x != nil { + return x.SourceAppID + } + return "" +} + +func (x *TaskRouter) GetTargetAppID() string { + if x != nil && x.TargetAppID != nil { + return *x.TargetAppID + } + return "" +} + +type WorkflowVersion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Patches []string `protobuf:"bytes,1,rep,name=patches,proto3" json:"patches,omitempty"` + // The name of the executed workflow + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` +} + +func (x *WorkflowVersion) Reset() { + *x = WorkflowVersion{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestration_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowVersion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowVersion) ProtoMessage() {} + +func (x *WorkflowVersion) ProtoReflect() protoreflect.Message { + mi := &file_orchestration_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowVersion.ProtoReflect.Descriptor instead. +func (*WorkflowVersion) Descriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{1} +} + +func (x *WorkflowVersion) GetPatches() []string { + if x != nil { + return x.Patches + } + return nil +} + +func (x *WorkflowVersion) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +type WorkflowInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + ExecutionId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=executionId,proto3" json:"executionId,omitempty"` +} + +func (x *WorkflowInstance) Reset() { + *x = WorkflowInstance{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestration_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowInstance) ProtoMessage() {} + +func (x *WorkflowInstance) ProtoReflect() protoreflect.Message { + mi := &file_orchestration_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowInstance.ProtoReflect.Descriptor instead. +func (*WorkflowInstance) Descriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{2} +} + +func (x *WorkflowInstance) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *WorkflowInstance) GetExecutionId() *wrapperspb.StringValue { + if x != nil { + return x.ExecutionId + } + return nil +} + +type TaskFailureDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ErrorType string `protobuf:"bytes,1,opt,name=errorType,proto3" json:"errorType,omitempty"` + ErrorMessage string `protobuf:"bytes,2,opt,name=errorMessage,proto3" json:"errorMessage,omitempty"` + StackTrace *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=stackTrace,proto3" json:"stackTrace,omitempty"` + InnerFailure *TaskFailureDetails `protobuf:"bytes,4,opt,name=innerFailure,proto3" json:"innerFailure,omitempty"` + IsNonRetriable bool `protobuf:"varint,5,opt,name=isNonRetriable,proto3" json:"isNonRetriable,omitempty"` +} + +func (x *TaskFailureDetails) Reset() { + *x = TaskFailureDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestration_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskFailureDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskFailureDetails) ProtoMessage() {} + +func (x *TaskFailureDetails) ProtoReflect() protoreflect.Message { + mi := &file_orchestration_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskFailureDetails.ProtoReflect.Descriptor instead. +func (*TaskFailureDetails) Descriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{3} +} + +func (x *TaskFailureDetails) GetErrorType() string { + if x != nil { + return x.ErrorType + } + return "" +} + +func (x *TaskFailureDetails) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *TaskFailureDetails) GetStackTrace() *wrapperspb.StringValue { + if x != nil { + return x.StackTrace + } + return nil +} + +func (x *TaskFailureDetails) GetInnerFailure() *TaskFailureDetails { + if x != nil { + return x.InnerFailure + } + return nil +} + +func (x *TaskFailureDetails) GetIsNonRetriable() bool { + if x != nil { + return x.IsNonRetriable + } + return false +} + +type ParentInstanceInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` + Name *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + WorkflowInstance *WorkflowInstance `protobuf:"bytes,4,opt,name=workflowInstance,proto3" json:"workflowInstance,omitempty"` + AppID *string `protobuf:"bytes,5,opt,name=appID,proto3,oneof" json:"appID,omitempty"` +} + +func (x *ParentInstanceInfo) Reset() { + *x = ParentInstanceInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestration_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParentInstanceInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParentInstanceInfo) ProtoMessage() {} + +func (x *ParentInstanceInfo) ProtoReflect() protoreflect.Message { + mi := &file_orchestration_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParentInstanceInfo.ProtoReflect.Descriptor instead. +func (*ParentInstanceInfo) Descriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{4} +} + +func (x *ParentInstanceInfo) GetTaskScheduledId() int32 { + if x != nil { + return x.TaskScheduledId + } + return 0 +} + +func (x *ParentInstanceInfo) GetName() *wrapperspb.StringValue { + if x != nil { + return x.Name + } + return nil +} + +func (x *ParentInstanceInfo) GetVersion() *wrapperspb.StringValue { + if x != nil { + return x.Version + } + return nil +} + +func (x *ParentInstanceInfo) GetWorkflowInstance() *WorkflowInstance { + if x != nil { + return x.WorkflowInstance + } + return nil +} + +func (x *ParentInstanceInfo) GetAppID() string { + if x != nil && x.AppID != nil { + return *x.AppID + } + return "" +} + +// RerunParentInstanceInfo is used to indicate that this workflow was +// started as part of a rerun operation. Contains information about the parent +// workflow instance which was rerun. +type RerunParentInstanceInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // instanceID is the workflow instance ID this workflow has been + // rerun from. + InstanceID string `protobuf:"bytes,1,opt,name=instanceID,proto3" json:"instanceID,omitempty"` +} + +func (x *RerunParentInstanceInfo) Reset() { + *x = RerunParentInstanceInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestration_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RerunParentInstanceInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RerunParentInstanceInfo) ProtoMessage() {} + +func (x *RerunParentInstanceInfo) ProtoReflect() protoreflect.Message { + mi := &file_orchestration_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RerunParentInstanceInfo.ProtoReflect.Descriptor instead. +func (*RerunParentInstanceInfo) Descriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{5} +} + +func (x *RerunParentInstanceInfo) GetInstanceID() string { + if x != nil { + return x.InstanceID + } + return "" +} + +type TraceContext struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TraceParent string `protobuf:"bytes,1,opt,name=traceParent,proto3" json:"traceParent,omitempty"` + // Deprecated: Marked as deprecated in orchestration.proto. + SpanID string `protobuf:"bytes,2,opt,name=spanID,proto3" json:"spanID,omitempty"` + TraceState *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=traceState,proto3" json:"traceState,omitempty"` +} + +func (x *TraceContext) Reset() { + *x = TraceContext{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestration_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TraceContext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TraceContext) ProtoMessage() {} + +func (x *TraceContext) ProtoReflect() protoreflect.Message { + mi := &file_orchestration_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TraceContext.ProtoReflect.Descriptor instead. +func (*TraceContext) Descriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{6} +} + +func (x *TraceContext) GetTraceParent() string { + if x != nil { + return x.TraceParent + } + return "" +} + +// Deprecated: Marked as deprecated in orchestration.proto. +func (x *TraceContext) GetSpanID() string { + if x != nil { + return x.SpanID + } + return "" +} + +func (x *TraceContext) GetTraceState() *wrapperspb.StringValue { + if x != nil { + return x.TraceState + } + return nil +} + +type WorkflowState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + WorkflowStatus OrchestrationStatus `protobuf:"varint,4,opt,name=workflowStatus,proto3,enum=OrchestrationStatus" json:"workflowStatus,omitempty"` + ScheduledStartTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=scheduledStartTimestamp,proto3" json:"scheduledStartTimestamp,omitempty"` + CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=createdTimestamp,proto3" json:"createdTimestamp,omitempty"` + LastUpdatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=lastUpdatedTimestamp,proto3" json:"lastUpdatedTimestamp,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=input,proto3" json:"input,omitempty"` + Output *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=output,proto3" json:"output,omitempty"` + CustomStatus *wrapperspb.StringValue `protobuf:"bytes,10,opt,name=customStatus,proto3" json:"customStatus,omitempty"` + FailureDetails *TaskFailureDetails `protobuf:"bytes,11,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` + ExecutionId *wrapperspb.StringValue `protobuf:"bytes,12,opt,name=executionId,proto3" json:"executionId,omitempty"` + CompletedTimestamp *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=completedTimestamp,proto3" json:"completedTimestamp,omitempty"` + ParentInstanceId *wrapperspb.StringValue `protobuf:"bytes,14,opt,name=parentInstanceId,proto3" json:"parentInstanceId,omitempty"` + Tags map[string]string `protobuf:"bytes,15,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *WorkflowState) Reset() { + *x = WorkflowState{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestration_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowState) ProtoMessage() {} + +func (x *WorkflowState) ProtoReflect() protoreflect.Message { + mi := &file_orchestration_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowState.ProtoReflect.Descriptor instead. +func (*WorkflowState) Descriptor() ([]byte, []int) { + return file_orchestration_proto_rawDescGZIP(), []int{7} +} + +func (x *WorkflowState) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *WorkflowState) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkflowState) GetVersion() *wrapperspb.StringValue { + if x != nil { + return x.Version + } + return nil +} + +func (x *WorkflowState) GetWorkflowStatus() OrchestrationStatus { + if x != nil { + return x.WorkflowStatus + } + return OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING +} + +func (x *WorkflowState) GetScheduledStartTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.ScheduledStartTimestamp + } + return nil +} + +func (x *WorkflowState) GetCreatedTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.CreatedTimestamp + } + return nil +} + +func (x *WorkflowState) GetLastUpdatedTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdatedTimestamp + } + return nil +} + +func (x *WorkflowState) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +func (x *WorkflowState) GetOutput() *wrapperspb.StringValue { + if x != nil { + return x.Output + } + return nil +} + +func (x *WorkflowState) GetCustomStatus() *wrapperspb.StringValue { + if x != nil { + return x.CustomStatus + } + return nil +} + +func (x *WorkflowState) GetFailureDetails() *TaskFailureDetails { + if x != nil { + return x.FailureDetails + } + return nil +} + +func (x *WorkflowState) GetExecutionId() *wrapperspb.StringValue { + if x != nil { + return x.ExecutionId + } + return nil +} + +func (x *WorkflowState) GetCompletedTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.CompletedTimestamp + } + return nil +} + +func (x *WorkflowState) GetParentInstanceId() *wrapperspb.StringValue { + if x != nil { + return x.ParentInstanceId + } + return nil +} + +func (x *WorkflowState) GetTags() map[string]string { + if x != nil { + return x.Tags + } + return nil +} + +var File_orchestration_proto protoreflect.FileDescriptor + +var file_orchestration_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x65, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x70, + 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x41, 0x70, 0x70, 0x49, 0x44, 0x12, 0x25, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x41, 0x70, 0x70, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x70, 0x70, 0x49, 0x44, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, + 0x0c, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x70, 0x70, 0x49, 0x44, 0x22, 0x4d, 0x0a, + 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x72, 0x0a, 0x10, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0xf5, 0x01, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x69, 0x6e, 0x6e, 0x65, 0x72, + 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x52, 0x0c, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x73, 0x4e, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x4e, 0x6f, 0x6e, 0x52, + 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x8c, 0x02, 0x0a, 0x12, 0x50, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x39, 0x0a, 0x17, 0x52, 0x65, 0x72, 0x75, 0x6e, + 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x49, 0x44, 0x22, 0x8a, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x50, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x44, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, + 0x44, 0x12, 0x3c, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, + 0xcd, 0x07, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, + 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x54, 0x0a, 0x17, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x17, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x46, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4e, 0x0a, 0x14, 0x6c, 0x61, 0x73, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x34, 0x0a, + 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x48, + 0x0a, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, + 0x3e, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, + 0x43, 0x48, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x2a, + 0xd7, 0x02, 0x0a, 0x13, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x52, 0x43, 0x48, 0x45, + 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x4f, 0x52, 0x43, + 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x29, 0x0a, + 0x25, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x45, 0x44, 0x5f, + 0x41, 0x53, 0x5f, 0x4e, 0x45, 0x57, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x52, 0x43, 0x48, + 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x4f, 0x52, 0x43, + 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x23, 0x0a, 0x1f, + 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x05, 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x10, 0x06, 0x12, 0x22, 0x0a, 0x1e, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x53, 0x50, + 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x07, 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x52, 0x43, 0x48, 0x45, + 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x42, 0x56, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, + 0x64, 0x61, 0x70, 0x72, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, + 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5a, 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xaa, 0x02, 0x19, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_orchestration_proto_rawDescOnce sync.Once + file_orchestration_proto_rawDescData = file_orchestration_proto_rawDesc +) + +func file_orchestration_proto_rawDescGZIP() []byte { + file_orchestration_proto_rawDescOnce.Do(func() { + file_orchestration_proto_rawDescData = protoimpl.X.CompressGZIP(file_orchestration_proto_rawDescData) + }) + return file_orchestration_proto_rawDescData +} + +var file_orchestration_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_orchestration_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_orchestration_proto_goTypes = []interface{}{ + (StalledReason)(0), // 0: StalledReason + (OrchestrationStatus)(0), // 1: OrchestrationStatus + (*TaskRouter)(nil), // 2: TaskRouter + (*WorkflowVersion)(nil), // 3: WorkflowVersion + (*WorkflowInstance)(nil), // 4: WorkflowInstance + (*TaskFailureDetails)(nil), // 5: TaskFailureDetails + (*ParentInstanceInfo)(nil), // 6: ParentInstanceInfo + (*RerunParentInstanceInfo)(nil), // 7: RerunParentInstanceInfo + (*TraceContext)(nil), // 8: TraceContext + (*WorkflowState)(nil), // 9: WorkflowState + nil, // 10: WorkflowState.TagsEntry + (*wrapperspb.StringValue)(nil), // 11: google.protobuf.StringValue + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp +} +var file_orchestration_proto_depIdxs = []int32{ + 11, // 0: WorkflowInstance.executionId:type_name -> google.protobuf.StringValue + 11, // 1: TaskFailureDetails.stackTrace:type_name -> google.protobuf.StringValue + 5, // 2: TaskFailureDetails.innerFailure:type_name -> TaskFailureDetails + 11, // 3: ParentInstanceInfo.name:type_name -> google.protobuf.StringValue + 11, // 4: ParentInstanceInfo.version:type_name -> google.protobuf.StringValue + 4, // 5: ParentInstanceInfo.workflowInstance:type_name -> WorkflowInstance + 11, // 6: TraceContext.traceState:type_name -> google.protobuf.StringValue + 11, // 7: WorkflowState.version:type_name -> google.protobuf.StringValue + 1, // 8: WorkflowState.workflowStatus:type_name -> OrchestrationStatus + 12, // 9: WorkflowState.scheduledStartTimestamp:type_name -> google.protobuf.Timestamp + 12, // 10: WorkflowState.createdTimestamp:type_name -> google.protobuf.Timestamp + 12, // 11: WorkflowState.lastUpdatedTimestamp:type_name -> google.protobuf.Timestamp + 11, // 12: WorkflowState.input:type_name -> google.protobuf.StringValue + 11, // 13: WorkflowState.output:type_name -> google.protobuf.StringValue + 11, // 14: WorkflowState.customStatus:type_name -> google.protobuf.StringValue + 5, // 15: WorkflowState.failureDetails:type_name -> TaskFailureDetails + 11, // 16: WorkflowState.executionId:type_name -> google.protobuf.StringValue + 12, // 17: WorkflowState.completedTimestamp:type_name -> google.protobuf.Timestamp + 11, // 18: WorkflowState.parentInstanceId:type_name -> google.protobuf.StringValue + 10, // 19: WorkflowState.tags:type_name -> WorkflowState.TagsEntry + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name +} + +func init() { file_orchestration_proto_init() } +func file_orchestration_proto_init() { + if File_orchestration_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_orchestration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskRouter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowVersion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestration_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowInstance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestration_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskFailureDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestration_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParentInstanceInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestration_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RerunParentInstanceInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestration_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TraceContext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestration_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_orchestration_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_orchestration_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_orchestration_proto_msgTypes[4].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_orchestration_proto_rawDesc, + NumEnums: 2, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_orchestration_proto_goTypes, + DependencyIndexes: file_orchestration_proto_depIdxs, + EnumInfos: file_orchestration_proto_enumTypes, + MessageInfos: file_orchestration_proto_msgTypes, + }.Build() + File_orchestration_proto = out.File + file_orchestration_proto_rawDesc = nil + file_orchestration_proto_goTypes = nil + file_orchestration_proto_depIdxs = nil +} diff --git a/api/protos/orchestrator_actions.pb.go b/api/protos/orchestrator_actions.pb.go new file mode 100644 index 00000000..10ac22f6 --- /dev/null +++ b/api/protos/orchestrator_actions.pb.go @@ -0,0 +1,1054 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.4 +// source: orchestrator_actions.proto + +package protos + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ScheduleTaskAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` + Router *TaskRouter `protobuf:"bytes,4,opt,name=router,proto3,oneof" json:"router,omitempty"` + TaskExecutionId string `protobuf:"bytes,5,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` +} + +func (x *ScheduleTaskAction) Reset() { + *x = ScheduleTaskAction{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_actions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScheduleTaskAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleTaskAction) ProtoMessage() {} + +func (x *ScheduleTaskAction) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_actions_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleTaskAction.ProtoReflect.Descriptor instead. +func (*ScheduleTaskAction) Descriptor() ([]byte, []int) { + return file_orchestrator_actions_proto_rawDescGZIP(), []int{0} +} + +func (x *ScheduleTaskAction) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ScheduleTaskAction) GetVersion() *wrapperspb.StringValue { + if x != nil { + return x.Version + } + return nil +} + +func (x *ScheduleTaskAction) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +func (x *ScheduleTaskAction) GetRouter() *TaskRouter { + if x != nil { + return x.Router + } + return nil +} + +func (x *ScheduleTaskAction) GetTaskExecutionId() string { + if x != nil { + return x.TaskExecutionId + } + return "" +} + +type CreateChildWorkflowAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"` + Router *TaskRouter `protobuf:"bytes,5,opt,name=router,proto3,oneof" json:"router,omitempty"` +} + +func (x *CreateChildWorkflowAction) Reset() { + *x = CreateChildWorkflowAction{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_actions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateChildWorkflowAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateChildWorkflowAction) ProtoMessage() {} + +func (x *CreateChildWorkflowAction) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_actions_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateChildWorkflowAction.ProtoReflect.Descriptor instead. +func (*CreateChildWorkflowAction) Descriptor() ([]byte, []int) { + return file_orchestrator_actions_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateChildWorkflowAction) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *CreateChildWorkflowAction) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateChildWorkflowAction) GetVersion() *wrapperspb.StringValue { + if x != nil { + return x.Version + } + return nil +} + +func (x *CreateChildWorkflowAction) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input + } + return nil +} + +func (x *CreateChildWorkflowAction) GetRouter() *TaskRouter { + if x != nil { + return x.Router + } + return nil +} + +type CreateTimerAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FireAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=fireAt,proto3" json:"fireAt,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` + // If set, provides additional context attached to this timer. + // + // Types that are assignable to Origin: + // + // *CreateTimerAction_CreateTimer + // *CreateTimerAction_ExternalEvent + Origin isCreateTimerAction_Origin `protobuf_oneof:"origin"` +} + +func (x *CreateTimerAction) Reset() { + *x = CreateTimerAction{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_actions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTimerAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTimerAction) ProtoMessage() {} + +func (x *CreateTimerAction) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_actions_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTimerAction.ProtoReflect.Descriptor instead. +func (*CreateTimerAction) Descriptor() ([]byte, []int) { + return file_orchestrator_actions_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateTimerAction) GetFireAt() *timestamppb.Timestamp { + if x != nil { + return x.FireAt + } + return nil +} + +func (x *CreateTimerAction) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (m *CreateTimerAction) GetOrigin() isCreateTimerAction_Origin { + if m != nil { + return m.Origin + } + return nil +} + +func (x *CreateTimerAction) GetCreateTimer() *TimerOriginCreateTimer { + if x, ok := x.GetOrigin().(*CreateTimerAction_CreateTimer); ok { + return x.CreateTimer + } + return nil +} + +func (x *CreateTimerAction) GetExternalEvent() *TimerOriginExternalEvent { + if x, ok := x.GetOrigin().(*CreateTimerAction_ExternalEvent); ok { + return x.ExternalEvent + } + return nil +} + +type isCreateTimerAction_Origin interface { + isCreateTimerAction_Origin() +} + +type CreateTimerAction_CreateTimer struct { + CreateTimer *TimerOriginCreateTimer `protobuf:"bytes,3,opt,name=createTimer,proto3,oneof"` +} + +type CreateTimerAction_ExternalEvent struct { + ExternalEvent *TimerOriginExternalEvent `protobuf:"bytes,4,opt,name=externalEvent,proto3,oneof"` +} + +func (*CreateTimerAction_CreateTimer) isCreateTimerAction_Origin() {} + +func (*CreateTimerAction_ExternalEvent) isCreateTimerAction_Origin() {} + +type SendEventAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Instance *WorkflowInstance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Data *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *SendEventAction) Reset() { + *x = SendEventAction{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_actions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendEventAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendEventAction) ProtoMessage() {} + +func (x *SendEventAction) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_actions_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendEventAction.ProtoReflect.Descriptor instead. +func (*SendEventAction) Descriptor() ([]byte, []int) { + return file_orchestrator_actions_proto_rawDescGZIP(), []int{3} +} + +func (x *SendEventAction) GetInstance() *WorkflowInstance { + if x != nil { + return x.Instance + } + return nil +} + +func (x *SendEventAction) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SendEventAction) GetData() *wrapperspb.StringValue { + if x != nil { + return x.Data + } + return nil +} + +type CompleteWorkflowAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkflowStatus OrchestrationStatus `protobuf:"varint,1,opt,name=workflowStatus,proto3,enum=OrchestrationStatus" json:"workflowStatus,omitempty"` + Result *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + Details *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` + NewVersion *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=newVersion,proto3" json:"newVersion,omitempty"` + CarryoverEvents []*HistoryEvent `protobuf:"bytes,5,rep,name=carryoverEvents,proto3" json:"carryoverEvents,omitempty"` + FailureDetails *TaskFailureDetails `protobuf:"bytes,6,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` +} + +func (x *CompleteWorkflowAction) Reset() { + *x = CompleteWorkflowAction{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_actions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompleteWorkflowAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompleteWorkflowAction) ProtoMessage() {} + +func (x *CompleteWorkflowAction) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_actions_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompleteWorkflowAction.ProtoReflect.Descriptor instead. +func (*CompleteWorkflowAction) Descriptor() ([]byte, []int) { + return file_orchestrator_actions_proto_rawDescGZIP(), []int{4} +} + +func (x *CompleteWorkflowAction) GetWorkflowStatus() OrchestrationStatus { + if x != nil { + return x.WorkflowStatus + } + return OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING +} + +func (x *CompleteWorkflowAction) GetResult() *wrapperspb.StringValue { + if x != nil { + return x.Result + } + return nil +} + +func (x *CompleteWorkflowAction) GetDetails() *wrapperspb.StringValue { + if x != nil { + return x.Details + } + return nil +} + +func (x *CompleteWorkflowAction) GetNewVersion() *wrapperspb.StringValue { + if x != nil { + return x.NewVersion + } + return nil +} + +func (x *CompleteWorkflowAction) GetCarryoverEvents() []*HistoryEvent { + if x != nil { + return x.CarryoverEvents + } + return nil +} + +func (x *CompleteWorkflowAction) GetFailureDetails() *TaskFailureDetails { + if x != nil { + return x.FailureDetails + } + return nil +} + +type TerminateWorkflowAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Reason *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` + Recurse bool `protobuf:"varint,3,opt,name=recurse,proto3" json:"recurse,omitempty"` +} + +func (x *TerminateWorkflowAction) Reset() { + *x = TerminateWorkflowAction{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_actions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TerminateWorkflowAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TerminateWorkflowAction) ProtoMessage() {} + +func (x *TerminateWorkflowAction) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_actions_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TerminateWorkflowAction.ProtoReflect.Descriptor instead. +func (*TerminateWorkflowAction) Descriptor() ([]byte, []int) { + return file_orchestrator_actions_proto_rawDescGZIP(), []int{5} +} + +func (x *TerminateWorkflowAction) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *TerminateWorkflowAction) GetReason() *wrapperspb.StringValue { + if x != nil { + return x.Reason + } + return nil +} + +func (x *TerminateWorkflowAction) GetRecurse() bool { + if x != nil { + return x.Recurse + } + return false +} + +type WorkflowVersionNotAvailableAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WorkflowVersionNotAvailableAction) Reset() { + *x = WorkflowVersionNotAvailableAction{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_actions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowVersionNotAvailableAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowVersionNotAvailableAction) ProtoMessage() {} + +func (x *WorkflowVersionNotAvailableAction) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_actions_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowVersionNotAvailableAction.ProtoReflect.Descriptor instead. +func (*WorkflowVersionNotAvailableAction) Descriptor() ([]byte, []int) { + return file_orchestrator_actions_proto_rawDescGZIP(), []int{6} +} + +type WorkflowAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Types that are assignable to WorkflowActionType: + // + // *WorkflowAction_ScheduleTask + // *WorkflowAction_CreateChildWorkflow + // *WorkflowAction_CreateTimer + // *WorkflowAction_SendEvent + // *WorkflowAction_CompleteWorkflow + // *WorkflowAction_TerminateWorkflow + // *WorkflowAction_WorkflowVersionNotAvailable + WorkflowActionType isWorkflowAction_WorkflowActionType `protobuf_oneof:"workflowActionType"` + Router *TaskRouter `protobuf:"bytes,9,opt,name=router,proto3,oneof" json:"router,omitempty"` +} + +func (x *WorkflowAction) Reset() { + *x = WorkflowAction{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_actions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowAction) ProtoMessage() {} + +func (x *WorkflowAction) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_actions_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowAction.ProtoReflect.Descriptor instead. +func (*WorkflowAction) Descriptor() ([]byte, []int) { + return file_orchestrator_actions_proto_rawDescGZIP(), []int{7} +} + +func (x *WorkflowAction) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (m *WorkflowAction) GetWorkflowActionType() isWorkflowAction_WorkflowActionType { + if m != nil { + return m.WorkflowActionType + } + return nil +} + +func (x *WorkflowAction) GetScheduleTask() *ScheduleTaskAction { + if x, ok := x.GetWorkflowActionType().(*WorkflowAction_ScheduleTask); ok { + return x.ScheduleTask + } + return nil +} + +func (x *WorkflowAction) GetCreateChildWorkflow() *CreateChildWorkflowAction { + if x, ok := x.GetWorkflowActionType().(*WorkflowAction_CreateChildWorkflow); ok { + return x.CreateChildWorkflow + } + return nil +} + +func (x *WorkflowAction) GetCreateTimer() *CreateTimerAction { + if x, ok := x.GetWorkflowActionType().(*WorkflowAction_CreateTimer); ok { + return x.CreateTimer + } + return nil +} + +func (x *WorkflowAction) GetSendEvent() *SendEventAction { + if x, ok := x.GetWorkflowActionType().(*WorkflowAction_SendEvent); ok { + return x.SendEvent + } + return nil +} + +func (x *WorkflowAction) GetCompleteWorkflow() *CompleteWorkflowAction { + if x, ok := x.GetWorkflowActionType().(*WorkflowAction_CompleteWorkflow); ok { + return x.CompleteWorkflow + } + return nil +} + +func (x *WorkflowAction) GetTerminateWorkflow() *TerminateWorkflowAction { + if x, ok := x.GetWorkflowActionType().(*WorkflowAction_TerminateWorkflow); ok { + return x.TerminateWorkflow + } + return nil +} + +func (x *WorkflowAction) GetWorkflowVersionNotAvailable() *WorkflowVersionNotAvailableAction { + if x, ok := x.GetWorkflowActionType().(*WorkflowAction_WorkflowVersionNotAvailable); ok { + return x.WorkflowVersionNotAvailable + } + return nil +} + +func (x *WorkflowAction) GetRouter() *TaskRouter { + if x != nil { + return x.Router + } + return nil +} + +type isWorkflowAction_WorkflowActionType interface { + isWorkflowAction_WorkflowActionType() +} + +type WorkflowAction_ScheduleTask struct { + ScheduleTask *ScheduleTaskAction `protobuf:"bytes,2,opt,name=scheduleTask,proto3,oneof"` +} + +type WorkflowAction_CreateChildWorkflow struct { + CreateChildWorkflow *CreateChildWorkflowAction `protobuf:"bytes,3,opt,name=createChildWorkflow,proto3,oneof"` +} + +type WorkflowAction_CreateTimer struct { + CreateTimer *CreateTimerAction `protobuf:"bytes,4,opt,name=createTimer,proto3,oneof"` +} + +type WorkflowAction_SendEvent struct { + SendEvent *SendEventAction `protobuf:"bytes,5,opt,name=sendEvent,proto3,oneof"` +} + +type WorkflowAction_CompleteWorkflow struct { + CompleteWorkflow *CompleteWorkflowAction `protobuf:"bytes,6,opt,name=completeWorkflow,proto3,oneof"` +} + +type WorkflowAction_TerminateWorkflow struct { + TerminateWorkflow *TerminateWorkflowAction `protobuf:"bytes,7,opt,name=terminateWorkflow,proto3,oneof"` +} + +type WorkflowAction_WorkflowVersionNotAvailable struct { + WorkflowVersionNotAvailable *WorkflowVersionNotAvailableAction `protobuf:"bytes,10,opt,name=workflowVersionNotAvailable,proto3,oneof"` +} + +func (*WorkflowAction_ScheduleTask) isWorkflowAction_WorkflowActionType() {} + +func (*WorkflowAction_CreateChildWorkflow) isWorkflowAction_WorkflowActionType() {} + +func (*WorkflowAction_CreateTimer) isWorkflowAction_WorkflowActionType() {} + +func (*WorkflowAction_SendEvent) isWorkflowAction_WorkflowActionType() {} + +func (*WorkflowAction_CompleteWorkflow) isWorkflowAction_WorkflowActionType() {} + +func (*WorkflowAction_TerminateWorkflow) isWorkflowAction_WorkflowActionType() {} + +func (*WorkflowAction_WorkflowVersionNotAvailable) isWorkflowAction_WorkflowActionType() {} + +var File_orchestrator_actions_proto protoreflect.FileDescriptor + +var file_orchestrator_actions_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x6f, 0x72, + 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x14, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf3, 0x01, 0x0a, 0x12, 0x53, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, + 0x28, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, + 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x22, 0xf0, + 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x28, 0x0a, 0x06, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x22, 0xf3, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x06, 0x66, 0x69, 0x72, 0x65, 0x41, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x06, 0x66, 0x69, 0x72, 0x65, 0x41, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x72, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x72, 0x12, 0x41, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x86, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0xf8, 0x02, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x0e, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x36, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0f, 0x63, 0x61, 0x72, 0x72, 0x79, 0x6f, 0x76, + 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x63, + 0x61, 0x72, 0x72, 0x79, 0x6f, 0x76, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3b, + 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x17, + 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x65, 0x22, 0x23, 0x0a, 0x21, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xdf, 0x04, 0x0a, + 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x39, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x4e, 0x0a, 0x13, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x72, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x48, 0x0a, 0x11, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x11, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x66, 0x0a, 0x1b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x1b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x4e, 0x6f, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, + 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x48, 0x01, 0x52, 0x06, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x42, 0x56, + 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5a, 0x0b, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xaa, 0x02, 0x19, 0x44, 0x61, 0x70, + 0x72, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_orchestrator_actions_proto_rawDescOnce sync.Once + file_orchestrator_actions_proto_rawDescData = file_orchestrator_actions_proto_rawDesc +) + +func file_orchestrator_actions_proto_rawDescGZIP() []byte { + file_orchestrator_actions_proto_rawDescOnce.Do(func() { + file_orchestrator_actions_proto_rawDescData = protoimpl.X.CompressGZIP(file_orchestrator_actions_proto_rawDescData) + }) + return file_orchestrator_actions_proto_rawDescData +} + +var file_orchestrator_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_orchestrator_actions_proto_goTypes = []interface{}{ + (*ScheduleTaskAction)(nil), // 0: ScheduleTaskAction + (*CreateChildWorkflowAction)(nil), // 1: CreateChildWorkflowAction + (*CreateTimerAction)(nil), // 2: CreateTimerAction + (*SendEventAction)(nil), // 3: SendEventAction + (*CompleteWorkflowAction)(nil), // 4: CompleteWorkflowAction + (*TerminateWorkflowAction)(nil), // 5: TerminateWorkflowAction + (*WorkflowVersionNotAvailableAction)(nil), // 6: WorkflowVersionNotAvailableAction + (*WorkflowAction)(nil), // 7: WorkflowAction + (*wrapperspb.StringValue)(nil), // 8: google.protobuf.StringValue + (*TaskRouter)(nil), // 9: TaskRouter + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*TimerOriginCreateTimer)(nil), // 11: TimerOriginCreateTimer + (*TimerOriginExternalEvent)(nil), // 12: TimerOriginExternalEvent + (*WorkflowInstance)(nil), // 13: WorkflowInstance + (OrchestrationStatus)(0), // 14: OrchestrationStatus + (*HistoryEvent)(nil), // 15: HistoryEvent + (*TaskFailureDetails)(nil), // 16: TaskFailureDetails +} +var file_orchestrator_actions_proto_depIdxs = []int32{ + 8, // 0: ScheduleTaskAction.version:type_name -> google.protobuf.StringValue + 8, // 1: ScheduleTaskAction.input:type_name -> google.protobuf.StringValue + 9, // 2: ScheduleTaskAction.router:type_name -> TaskRouter + 8, // 3: CreateChildWorkflowAction.version:type_name -> google.protobuf.StringValue + 8, // 4: CreateChildWorkflowAction.input:type_name -> google.protobuf.StringValue + 9, // 5: CreateChildWorkflowAction.router:type_name -> TaskRouter + 10, // 6: CreateTimerAction.fireAt:type_name -> google.protobuf.Timestamp + 11, // 7: CreateTimerAction.createTimer:type_name -> TimerOriginCreateTimer + 12, // 8: CreateTimerAction.externalEvent:type_name -> TimerOriginExternalEvent + 13, // 9: SendEventAction.instance:type_name -> WorkflowInstance + 8, // 10: SendEventAction.data:type_name -> google.protobuf.StringValue + 14, // 11: CompleteWorkflowAction.workflowStatus:type_name -> OrchestrationStatus + 8, // 12: CompleteWorkflowAction.result:type_name -> google.protobuf.StringValue + 8, // 13: CompleteWorkflowAction.details:type_name -> google.protobuf.StringValue + 8, // 14: CompleteWorkflowAction.newVersion:type_name -> google.protobuf.StringValue + 15, // 15: CompleteWorkflowAction.carryoverEvents:type_name -> HistoryEvent + 16, // 16: CompleteWorkflowAction.failureDetails:type_name -> TaskFailureDetails + 8, // 17: TerminateWorkflowAction.reason:type_name -> google.protobuf.StringValue + 0, // 18: WorkflowAction.scheduleTask:type_name -> ScheduleTaskAction + 1, // 19: WorkflowAction.createChildWorkflow:type_name -> CreateChildWorkflowAction + 2, // 20: WorkflowAction.createTimer:type_name -> CreateTimerAction + 3, // 21: WorkflowAction.sendEvent:type_name -> SendEventAction + 4, // 22: WorkflowAction.completeWorkflow:type_name -> CompleteWorkflowAction + 5, // 23: WorkflowAction.terminateWorkflow:type_name -> TerminateWorkflowAction + 6, // 24: WorkflowAction.workflowVersionNotAvailable:type_name -> WorkflowVersionNotAvailableAction + 9, // 25: WorkflowAction.router:type_name -> TaskRouter + 26, // [26:26] is the sub-list for method output_type + 26, // [26:26] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name +} + +func init() { file_orchestrator_actions_proto_init() } +func file_orchestrator_actions_proto_init() { + if File_orchestrator_actions_proto != nil { + return + } + file_orchestration_proto_init() + file_history_events_proto_init() + if !protoimpl.UnsafeEnabled { + file_orchestrator_actions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScheduleTaskAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestrator_actions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateChildWorkflowAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestrator_actions_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTimerAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestrator_actions_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendEventAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestrator_actions_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompleteWorkflowAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestrator_actions_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TerminateWorkflowAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestrator_actions_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowVersionNotAvailableAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_orchestrator_actions_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_orchestrator_actions_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_orchestrator_actions_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_orchestrator_actions_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*CreateTimerAction_CreateTimer)(nil), + (*CreateTimerAction_ExternalEvent)(nil), + } + file_orchestrator_actions_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*WorkflowAction_ScheduleTask)(nil), + (*WorkflowAction_CreateChildWorkflow)(nil), + (*WorkflowAction_CreateTimer)(nil), + (*WorkflowAction_SendEvent)(nil), + (*WorkflowAction_CompleteWorkflow)(nil), + (*WorkflowAction_TerminateWorkflow)(nil), + (*WorkflowAction_WorkflowVersionNotAvailable)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_orchestrator_actions_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_orchestrator_actions_proto_goTypes, + DependencyIndexes: file_orchestrator_actions_proto_depIdxs, + MessageInfos: file_orchestrator_actions_proto_msgTypes, + }.Build() + File_orchestrator_actions_proto = out.File + file_orchestrator_actions_proto_rawDesc = nil + file_orchestrator_actions_proto_goTypes = nil + file_orchestrator_actions_proto_depIdxs = nil +} diff --git a/api/protos/orchestrator_service.pb.go b/api/protos/orchestrator_service.pb.go index 94551bc0..268f253e 100644 --- a/api/protos/orchestrator_service.pb.go +++ b/api/protos/orchestrator_service.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v6.32.1 +// protoc v4.25.4 // source: orchestrator_service.proto package protos @@ -26,352 +26,74 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type StalledReason int32 +type WorkerCapability int32 const ( - StalledReason_PATCH_MISMATCH StalledReason = 0 - StalledReason_VERSION_NOT_AVAILABLE StalledReason = 1 + WorkerCapability_WORKER_CAPABILITY_UNSPECIFIED WorkerCapability = 0 + // Indicates that the worker is capable of streaming instance history as a more optimized + // alternative to receiving the full history embedded in the workflow work-item. + // When set, the service may return work items without any history events as an optimization. + // It is strongly recommended that all SDKs support this capability. + WorkerCapability_WORKER_CAPABILITY_HISTORY_STREAMING WorkerCapability = 1 ) -// Enum value maps for StalledReason. +// Enum value maps for WorkerCapability. var ( - StalledReason_name = map[int32]string{ - 0: "PATCH_MISMATCH", - 1: "VERSION_NOT_AVAILABLE", + WorkerCapability_name = map[int32]string{ + 0: "WORKER_CAPABILITY_UNSPECIFIED", + 1: "WORKER_CAPABILITY_HISTORY_STREAMING", } - StalledReason_value = map[string]int32{ - "PATCH_MISMATCH": 0, - "VERSION_NOT_AVAILABLE": 1, + WorkerCapability_value = map[string]int32{ + "WORKER_CAPABILITY_UNSPECIFIED": 0, + "WORKER_CAPABILITY_HISTORY_STREAMING": 1, } ) -func (x StalledReason) Enum() *StalledReason { - p := new(StalledReason) +func (x WorkerCapability) Enum() *WorkerCapability { + p := new(WorkerCapability) *p = x return p } -func (x StalledReason) String() string { +func (x WorkerCapability) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (StalledReason) Descriptor() protoreflect.EnumDescriptor { +func (WorkerCapability) Descriptor() protoreflect.EnumDescriptor { return file_orchestrator_service_proto_enumTypes[0].Descriptor() } -func (StalledReason) Type() protoreflect.EnumType { +func (WorkerCapability) Type() protoreflect.EnumType { return &file_orchestrator_service_proto_enumTypes[0] } -func (x StalledReason) Number() protoreflect.EnumNumber { +func (x WorkerCapability) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use StalledReason.Descriptor instead. -func (StalledReason) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use WorkerCapability.Descriptor instead. +func (WorkerCapability) EnumDescriptor() ([]byte, []int) { return file_orchestrator_service_proto_rawDescGZIP(), []int{0} } -type OrchestrationStatus int32 - -const ( - OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING OrchestrationStatus = 0 - OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED OrchestrationStatus = 1 - OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW OrchestrationStatus = 2 - OrchestrationStatus_ORCHESTRATION_STATUS_FAILED OrchestrationStatus = 3 - OrchestrationStatus_ORCHESTRATION_STATUS_CANCELED OrchestrationStatus = 4 - OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED OrchestrationStatus = 5 - OrchestrationStatus_ORCHESTRATION_STATUS_PENDING OrchestrationStatus = 6 - OrchestrationStatus_ORCHESTRATION_STATUS_SUSPENDED OrchestrationStatus = 7 - OrchestrationStatus_ORCHESTRATION_STATUS_STALLED OrchestrationStatus = 8 -) - -// Enum value maps for OrchestrationStatus. -var ( - OrchestrationStatus_name = map[int32]string{ - 0: "ORCHESTRATION_STATUS_RUNNING", - 1: "ORCHESTRATION_STATUS_COMPLETED", - 2: "ORCHESTRATION_STATUS_CONTINUED_AS_NEW", - 3: "ORCHESTRATION_STATUS_FAILED", - 4: "ORCHESTRATION_STATUS_CANCELED", - 5: "ORCHESTRATION_STATUS_TERMINATED", - 6: "ORCHESTRATION_STATUS_PENDING", - 7: "ORCHESTRATION_STATUS_SUSPENDED", - 8: "ORCHESTRATION_STATUS_STALLED", - } - OrchestrationStatus_value = map[string]int32{ - "ORCHESTRATION_STATUS_RUNNING": 0, - "ORCHESTRATION_STATUS_COMPLETED": 1, - "ORCHESTRATION_STATUS_CONTINUED_AS_NEW": 2, - "ORCHESTRATION_STATUS_FAILED": 3, - "ORCHESTRATION_STATUS_CANCELED": 4, - "ORCHESTRATION_STATUS_TERMINATED": 5, - "ORCHESTRATION_STATUS_PENDING": 6, - "ORCHESTRATION_STATUS_SUSPENDED": 7, - "ORCHESTRATION_STATUS_STALLED": 8, - } -) - -func (x OrchestrationStatus) Enum() *OrchestrationStatus { - p := new(OrchestrationStatus) - *p = x - return p -} - -func (x OrchestrationStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (OrchestrationStatus) Descriptor() protoreflect.EnumDescriptor { - return file_orchestrator_service_proto_enumTypes[1].Descriptor() -} - -func (OrchestrationStatus) Type() protoreflect.EnumType { - return &file_orchestrator_service_proto_enumTypes[1] -} - -func (x OrchestrationStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use OrchestrationStatus.Descriptor instead. -func (OrchestrationStatus) EnumDescriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{1} -} - -type CreateOrchestrationAction int32 - -const ( - CreateOrchestrationAction_ERROR CreateOrchestrationAction = 0 - CreateOrchestrationAction_IGNORE CreateOrchestrationAction = 1 - CreateOrchestrationAction_TERMINATE CreateOrchestrationAction = 2 -) - -// Enum value maps for CreateOrchestrationAction. -var ( - CreateOrchestrationAction_name = map[int32]string{ - 0: "ERROR", - 1: "IGNORE", - 2: "TERMINATE", - } - CreateOrchestrationAction_value = map[string]int32{ - "ERROR": 0, - "IGNORE": 1, - "TERMINATE": 2, - } -) - -func (x CreateOrchestrationAction) Enum() *CreateOrchestrationAction { - p := new(CreateOrchestrationAction) - *p = x - return p -} - -func (x CreateOrchestrationAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CreateOrchestrationAction) Descriptor() protoreflect.EnumDescriptor { - return file_orchestrator_service_proto_enumTypes[2].Descriptor() -} - -func (CreateOrchestrationAction) Type() protoreflect.EnumType { - return &file_orchestrator_service_proto_enumTypes[2] -} - -func (x CreateOrchestrationAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CreateOrchestrationAction.Descriptor instead. -func (CreateOrchestrationAction) EnumDescriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{2} -} - -type TaskRouter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SourceAppID string `protobuf:"bytes,1,opt,name=sourceAppID,proto3" json:"sourceAppID,omitempty"` - TargetAppID *string `protobuf:"bytes,2,opt,name=targetAppID,proto3,oneof" json:"targetAppID,omitempty"` -} - -func (x *TaskRouter) Reset() { - *x = TaskRouter{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskRouter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskRouter) ProtoMessage() {} - -func (x *TaskRouter) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskRouter.ProtoReflect.Descriptor instead. -func (*TaskRouter) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{0} -} - -func (x *TaskRouter) GetSourceAppID() string { - if x != nil { - return x.SourceAppID - } - return "" -} - -func (x *TaskRouter) GetTargetAppID() string { - if x != nil && x.TargetAppID != nil { - return *x.TargetAppID - } - return "" -} - -type OrchestrationVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Patches []string `protobuf:"bytes,1,rep,name=patches,proto3" json:"patches,omitempty"` - // The name of the executed workflow - Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` -} - -func (x *OrchestrationVersion) Reset() { - *x = OrchestrationVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrchestrationVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrchestrationVersion) ProtoMessage() {} - -func (x *OrchestrationVersion) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrchestrationVersion.ProtoReflect.Descriptor instead. -func (*OrchestrationVersion) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{1} -} - -func (x *OrchestrationVersion) GetPatches() []string { - if x != nil { - return x.Patches - } - return nil -} - -func (x *OrchestrationVersion) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -type OrchestrationInstance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - ExecutionId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=executionId,proto3" json:"executionId,omitempty"` -} - -func (x *OrchestrationInstance) Reset() { - *x = OrchestrationInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrchestrationInstance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrchestrationInstance) ProtoMessage() {} - -func (x *OrchestrationInstance) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrchestrationInstance.ProtoReflect.Descriptor instead. -func (*OrchestrationInstance) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{2} -} - -func (x *OrchestrationInstance) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *OrchestrationInstance) GetExecutionId() *wrapperspb.StringValue { - if x != nil { - return x.ExecutionId - } - return nil -} - type ActivityRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` - OrchestrationInstance *OrchestrationInstance `protobuf:"bytes,4,opt,name=orchestrationInstance,proto3" json:"orchestrationInstance,omitempty"` - TaskId int32 `protobuf:"varint,5,opt,name=taskId,proto3" json:"taskId,omitempty"` - ParentTraceContext *TraceContext `protobuf:"bytes,6,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` - TaskExecutionId string `protobuf:"bytes,7,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` + WorkflowInstance *WorkflowInstance `protobuf:"bytes,4,opt,name=workflowInstance,proto3" json:"workflowInstance,omitempty"` + TaskId int32 `protobuf:"varint,5,opt,name=taskId,proto3" json:"taskId,omitempty"` + ParentTraceContext *TraceContext `protobuf:"bytes,6,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` + TaskExecutionId string `protobuf:"bytes,7,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` } func (x *ActivityRequest) Reset() { *x = ActivityRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[3] + mi := &file_orchestrator_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -384,7 +106,7 @@ func (x *ActivityRequest) String() string { func (*ActivityRequest) ProtoMessage() {} func (x *ActivityRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[3] + mi := &file_orchestrator_service_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -397,7 +119,7 @@ func (x *ActivityRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityRequest.ProtoReflect.Descriptor instead. func (*ActivityRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{3} + return file_orchestrator_service_proto_rawDescGZIP(), []int{0} } func (x *ActivityRequest) GetName() string { @@ -421,9 +143,9 @@ func (x *ActivityRequest) GetInput() *wrapperspb.StringValue { return nil } -func (x *ActivityRequest) GetOrchestrationInstance() *OrchestrationInstance { +func (x *ActivityRequest) GetWorkflowInstance() *WorkflowInstance { if x != nil { - return x.OrchestrationInstance + return x.WorkflowInstance } return nil } @@ -464,7 +186,7 @@ type ActivityResponse struct { func (x *ActivityResponse) Reset() { *x = ActivityResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[4] + mi := &file_orchestrator_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -477,7 +199,7 @@ func (x *ActivityResponse) String() string { func (*ActivityResponse) ProtoMessage() {} func (x *ActivityResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[4] + mi := &file_orchestrator_service_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -490,7 +212,7 @@ func (x *ActivityResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityResponse.ProtoReflect.Descriptor instead. func (*ActivityResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{4} + return file_orchestrator_service_proto_rawDescGZIP(), []int{1} } func (x *ActivityResponse) GetInstanceId() string { @@ -528,35 +250,36 @@ func (x *ActivityResponse) GetCompletionToken() string { return "" } -type TaskFailureDetails struct { +type WorkflowRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ErrorType string `protobuf:"bytes,1,opt,name=errorType,proto3" json:"errorType,omitempty"` - ErrorMessage string `protobuf:"bytes,2,opt,name=errorMessage,proto3" json:"errorMessage,omitempty"` - StackTrace *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=stackTrace,proto3" json:"stackTrace,omitempty"` - InnerFailure *TaskFailureDetails `protobuf:"bytes,4,opt,name=innerFailure,proto3" json:"innerFailure,omitempty"` - IsNonRetriable bool `protobuf:"varint,5,opt,name=isNonRetriable,proto3" json:"isNonRetriable,omitempty"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + ExecutionId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=executionId,proto3" json:"executionId,omitempty"` + PastEvents []*HistoryEvent `protobuf:"bytes,3,rep,name=pastEvents,proto3" json:"pastEvents,omitempty"` + NewEvents []*HistoryEvent `protobuf:"bytes,4,rep,name=newEvents,proto3" json:"newEvents,omitempty"` + RequiresHistoryStreaming bool `protobuf:"varint,6,opt,name=requiresHistoryStreaming,proto3" json:"requiresHistoryStreaming,omitempty"` + Router *TaskRouter `protobuf:"bytes,7,opt,name=router,proto3,oneof" json:"router,omitempty"` } -func (x *TaskFailureDetails) Reset() { - *x = TaskFailureDetails{} +func (x *WorkflowRequest) Reset() { + *x = WorkflowRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[5] + mi := &file_orchestrator_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TaskFailureDetails) String() string { +func (x *WorkflowRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TaskFailureDetails) ProtoMessage() {} +func (*WorkflowRequest) ProtoMessage() {} -func (x *TaskFailureDetails) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[5] +func (x *WorkflowRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -567,75 +290,85 @@ func (x *TaskFailureDetails) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TaskFailureDetails.ProtoReflect.Descriptor instead. -func (*TaskFailureDetails) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{5} +// Deprecated: Use WorkflowRequest.ProtoReflect.Descriptor instead. +func (*WorkflowRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{2} } -func (x *TaskFailureDetails) GetErrorType() string { +func (x *WorkflowRequest) GetInstanceId() string { if x != nil { - return x.ErrorType + return x.InstanceId } return "" } -func (x *TaskFailureDetails) GetErrorMessage() string { +func (x *WorkflowRequest) GetExecutionId() *wrapperspb.StringValue { if x != nil { - return x.ErrorMessage + return x.ExecutionId } - return "" + return nil } -func (x *TaskFailureDetails) GetStackTrace() *wrapperspb.StringValue { +func (x *WorkflowRequest) GetPastEvents() []*HistoryEvent { if x != nil { - return x.StackTrace + return x.PastEvents } return nil } -func (x *TaskFailureDetails) GetInnerFailure() *TaskFailureDetails { +func (x *WorkflowRequest) GetNewEvents() []*HistoryEvent { if x != nil { - return x.InnerFailure + return x.NewEvents } return nil } -func (x *TaskFailureDetails) GetIsNonRetriable() bool { +func (x *WorkflowRequest) GetRequiresHistoryStreaming() bool { if x != nil { - return x.IsNonRetriable + return x.RequiresHistoryStreaming } return false } -type ParentInstanceInfo struct { +func (x *WorkflowRequest) GetRouter() *TaskRouter { + if x != nil { + return x.Router + } + return nil +} + +type WorkflowResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` - Name *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - OrchestrationInstance *OrchestrationInstance `protobuf:"bytes,4,opt,name=orchestrationInstance,proto3" json:"orchestrationInstance,omitempty"` - AppID *string `protobuf:"bytes,5,opt,name=appID,proto3,oneof" json:"appID,omitempty"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Actions []*WorkflowAction `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"` + CustomStatus *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=customStatus,proto3" json:"customStatus,omitempty"` + CompletionToken string `protobuf:"bytes,4,opt,name=completionToken,proto3" json:"completionToken,omitempty"` + // The number of work item events that were processed by the workflow. + // This field is optional. If not set, the service should assume that the workflow processed all events. + NumEventsProcessed *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=numEventsProcessed,proto3" json:"numEventsProcessed,omitempty"` + Version *WorkflowVersion `protobuf:"bytes,6,opt,name=version,proto3,oneof" json:"version,omitempty"` } -func (x *ParentInstanceInfo) Reset() { - *x = ParentInstanceInfo{} +func (x *WorkflowResponse) Reset() { + *x = WorkflowResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[6] + mi := &file_orchestrator_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ParentInstanceInfo) String() string { +func (x *WorkflowResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ParentInstanceInfo) ProtoMessage() {} +func (*WorkflowResponse) ProtoMessage() {} -func (x *ParentInstanceInfo) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[6] +func (x *WorkflowResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -646,76 +379,85 @@ func (x *ParentInstanceInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ParentInstanceInfo.ProtoReflect.Descriptor instead. -func (*ParentInstanceInfo) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{6} +// Deprecated: Use WorkflowResponse.ProtoReflect.Descriptor instead. +func (*WorkflowResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{3} } -func (x *ParentInstanceInfo) GetTaskScheduledId() int32 { +func (x *WorkflowResponse) GetInstanceId() string { if x != nil { - return x.TaskScheduledId + return x.InstanceId } - return 0 + return "" } -func (x *ParentInstanceInfo) GetName() *wrapperspb.StringValue { +func (x *WorkflowResponse) GetActions() []*WorkflowAction { if x != nil { - return x.Name + return x.Actions } return nil } -func (x *ParentInstanceInfo) GetVersion() *wrapperspb.StringValue { +func (x *WorkflowResponse) GetCustomStatus() *wrapperspb.StringValue { if x != nil { - return x.Version + return x.CustomStatus } return nil } -func (x *ParentInstanceInfo) GetOrchestrationInstance() *OrchestrationInstance { +func (x *WorkflowResponse) GetCompletionToken() string { + if x != nil { + return x.CompletionToken + } + return "" +} + +func (x *WorkflowResponse) GetNumEventsProcessed() *wrapperspb.Int32Value { if x != nil { - return x.OrchestrationInstance + return x.NumEventsProcessed } return nil } -func (x *ParentInstanceInfo) GetAppID() string { - if x != nil && x.AppID != nil { - return *x.AppID +func (x *WorkflowResponse) GetVersion() *WorkflowVersion { + if x != nil { + return x.Version } - return "" + return nil } -// RerunParentInstanceInfo is used to indicate that this orchestration was -// started as part of a rerun operation. Contains information about the parent -// orchestration instance which was rerun. -type RerunParentInstanceInfo struct { +type CreateInstanceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // instanceID is the orchestration instance ID this orchestration has been - // rerun from. - InstanceID string `protobuf:"bytes,1,opt,name=instanceID,proto3" json:"instanceID,omitempty"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"` + ScheduledStartTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=scheduledStartTimestamp,proto3" json:"scheduledStartTimestamp,omitempty"` + ExecutionId *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=executionId,proto3" json:"executionId,omitempty"` + Tags map[string]string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ParentTraceContext *TraceContext `protobuf:"bytes,9,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` } -func (x *RerunParentInstanceInfo) Reset() { - *x = RerunParentInstanceInfo{} +func (x *CreateInstanceRequest) Reset() { + *x = CreateInstanceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[7] + mi := &file_orchestrator_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RerunParentInstanceInfo) String() string { +func (x *CreateInstanceRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RerunParentInstanceInfo) ProtoMessage() {} +func (*CreateInstanceRequest) ProtoMessage() {} -func (x *RerunParentInstanceInfo) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[7] +func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -726,116 +468,92 @@ func (x *RerunParentInstanceInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RerunParentInstanceInfo.ProtoReflect.Descriptor instead. -func (*RerunParentInstanceInfo) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{7} +// Deprecated: Use CreateInstanceRequest.ProtoReflect.Descriptor instead. +func (*CreateInstanceRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{4} } -func (x *RerunParentInstanceInfo) GetInstanceID() string { +func (x *CreateInstanceRequest) GetInstanceId() string { if x != nil { - return x.InstanceID + return x.InstanceId } return "" } -type TraceContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TraceParent string `protobuf:"bytes,1,opt,name=traceParent,proto3" json:"traceParent,omitempty"` - // Deprecated: Marked as deprecated in orchestrator_service.proto. - SpanID string `protobuf:"bytes,2,opt,name=spanID,proto3" json:"spanID,omitempty"` - TraceState *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=traceState,proto3" json:"traceState,omitempty"` -} - -func (x *TraceContext) Reset() { - *x = TraceContext{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *CreateInstanceRequest) GetName() string { + if x != nil { + return x.Name } + return "" } -func (x *TraceContext) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *CreateInstanceRequest) GetVersion() *wrapperspb.StringValue { + if x != nil { + return x.Version + } + return nil } -func (*TraceContext) ProtoMessage() {} - -func (x *TraceContext) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *CreateInstanceRequest) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input } - return mi.MessageOf(x) + return nil } -// Deprecated: Use TraceContext.ProtoReflect.Descriptor instead. -func (*TraceContext) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{8} +func (x *CreateInstanceRequest) GetScheduledStartTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.ScheduledStartTimestamp + } + return nil } -func (x *TraceContext) GetTraceParent() string { +func (x *CreateInstanceRequest) GetExecutionId() *wrapperspb.StringValue { if x != nil { - return x.TraceParent + return x.ExecutionId } - return "" + return nil } -// Deprecated: Marked as deprecated in orchestrator_service.proto. -func (x *TraceContext) GetSpanID() string { +func (x *CreateInstanceRequest) GetTags() map[string]string { if x != nil { - return x.SpanID + return x.Tags } - return "" + return nil } -func (x *TraceContext) GetTraceState() *wrapperspb.StringValue { +func (x *CreateInstanceRequest) GetParentTraceContext() *TraceContext { if x != nil { - return x.TraceState + return x.ParentTraceContext } return nil } -type ExecutionStartedEvent struct { +type CreateInstanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` - OrchestrationInstance *OrchestrationInstance `protobuf:"bytes,4,opt,name=orchestrationInstance,proto3" json:"orchestrationInstance,omitempty"` - ParentInstance *ParentInstanceInfo `protobuf:"bytes,5,opt,name=parentInstance,proto3" json:"parentInstance,omitempty"` - ScheduledStartTimestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=scheduledStartTimestamp,proto3" json:"scheduledStartTimestamp,omitempty"` - ParentTraceContext *TraceContext `protobuf:"bytes,7,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` - OrchestrationSpanID *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=orchestrationSpanID,proto3" json:"orchestrationSpanID,omitempty"` - Tags map[string]string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` } -func (x *ExecutionStartedEvent) Reset() { - *x = ExecutionStartedEvent{} +func (x *CreateInstanceResponse) Reset() { + *x = CreateInstanceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[9] + mi := &file_orchestrator_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ExecutionStartedEvent) String() string { +func (x *CreateInstanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExecutionStartedEvent) ProtoMessage() {} +func (*CreateInstanceResponse) ProtoMessage() {} -func (x *ExecutionStartedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[9] +func (x *CreateInstanceResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -846,101 +564,44 @@ func (x *ExecutionStartedEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExecutionStartedEvent.ProtoReflect.Descriptor instead. -func (*ExecutionStartedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{9} +// Deprecated: Use CreateInstanceResponse.ProtoReflect.Descriptor instead. +func (*CreateInstanceResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{5} } -func (x *ExecutionStartedEvent) GetName() string { +func (x *CreateInstanceResponse) GetInstanceId() string { if x != nil { - return x.Name + return x.InstanceId } return "" } -func (x *ExecutionStartedEvent) GetVersion() *wrapperspb.StringValue { - if x != nil { - return x.Version - } - return nil -} - -func (x *ExecutionStartedEvent) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil -} - -func (x *ExecutionStartedEvent) GetOrchestrationInstance() *OrchestrationInstance { - if x != nil { - return x.OrchestrationInstance - } - return nil -} - -func (x *ExecutionStartedEvent) GetParentInstance() *ParentInstanceInfo { - if x != nil { - return x.ParentInstance - } - return nil -} - -func (x *ExecutionStartedEvent) GetScheduledStartTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.ScheduledStartTimestamp - } - return nil -} - -func (x *ExecutionStartedEvent) GetParentTraceContext() *TraceContext { - if x != nil { - return x.ParentTraceContext - } - return nil -} - -func (x *ExecutionStartedEvent) GetOrchestrationSpanID() *wrapperspb.StringValue { - if x != nil { - return x.OrchestrationSpanID - } - return nil -} - -func (x *ExecutionStartedEvent) GetTags() map[string]string { - if x != nil { - return x.Tags - } - return nil -} - -type ExecutionCompletedEvent struct { +type GetInstanceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - OrchestrationStatus OrchestrationStatus `protobuf:"varint,1,opt,name=orchestrationStatus,proto3,enum=OrchestrationStatus" json:"orchestrationStatus,omitempty"` - Result *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` - FailureDetails *TaskFailureDetails `protobuf:"bytes,3,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + GetInputsAndOutputs bool `protobuf:"varint,2,opt,name=getInputsAndOutputs,proto3" json:"getInputsAndOutputs,omitempty"` } -func (x *ExecutionCompletedEvent) Reset() { - *x = ExecutionCompletedEvent{} +func (x *GetInstanceRequest) Reset() { + *x = GetInstanceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[10] + mi := &file_orchestrator_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ExecutionCompletedEvent) String() string { +func (x *GetInstanceRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExecutionCompletedEvent) ProtoMessage() {} +func (*GetInstanceRequest) ProtoMessage() {} -func (x *ExecutionCompletedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[10] +func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -951,58 +612,51 @@ func (x *ExecutionCompletedEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExecutionCompletedEvent.ProtoReflect.Descriptor instead. -func (*ExecutionCompletedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{10} -} - -func (x *ExecutionCompletedEvent) GetOrchestrationStatus() OrchestrationStatus { - if x != nil { - return x.OrchestrationStatus - } - return OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING +// Deprecated: Use GetInstanceRequest.ProtoReflect.Descriptor instead. +func (*GetInstanceRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{6} } -func (x *ExecutionCompletedEvent) GetResult() *wrapperspb.StringValue { +func (x *GetInstanceRequest) GetInstanceId() string { if x != nil { - return x.Result + return x.InstanceId } - return nil + return "" } -func (x *ExecutionCompletedEvent) GetFailureDetails() *TaskFailureDetails { +func (x *GetInstanceRequest) GetGetInputsAndOutputs() bool { if x != nil { - return x.FailureDetails + return x.GetInputsAndOutputs } - return nil + return false } -type ExecutionTerminatedEvent struct { +type GetInstanceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Input *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - Recurse bool `protobuf:"varint,2,opt,name=recurse,proto3" json:"recurse,omitempty"` + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` + WorkflowState *WorkflowState `protobuf:"bytes,2,opt,name=workflowState,proto3" json:"workflowState,omitempty"` } -func (x *ExecutionTerminatedEvent) Reset() { - *x = ExecutionTerminatedEvent{} +func (x *GetInstanceResponse) Reset() { + *x = GetInstanceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[11] + mi := &file_orchestrator_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ExecutionTerminatedEvent) String() string { +func (x *GetInstanceResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExecutionTerminatedEvent) ProtoMessage() {} +func (*GetInstanceResponse) ProtoMessage() {} -func (x *ExecutionTerminatedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[11] +func (x *GetInstanceResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1013,57 +667,52 @@ func (x *ExecutionTerminatedEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExecutionTerminatedEvent.ProtoReflect.Descriptor instead. -func (*ExecutionTerminatedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{11} +// Deprecated: Use GetInstanceResponse.ProtoReflect.Descriptor instead. +func (*GetInstanceResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{7} } -func (x *ExecutionTerminatedEvent) GetInput() *wrapperspb.StringValue { +func (x *GetInstanceResponse) GetExists() bool { if x != nil { - return x.Input + return x.Exists } - return nil + return false } -func (x *ExecutionTerminatedEvent) GetRecurse() bool { +func (x *GetInstanceResponse) GetWorkflowState() *WorkflowState { if x != nil { - return x.Recurse + return x.WorkflowState } - return false + return nil } -type TaskScheduledEvent struct { +type RaiseEventRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` - ParentTraceContext *TraceContext `protobuf:"bytes,4,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` - TaskExecutionId string `protobuf:"bytes,5,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` - // If defined, indicates that this task was the starting point of a new - // workflow execution as the result of a rerun operation. - RerunParentInstanceInfo *RerunParentInstanceInfo `protobuf:"bytes,6,opt,name=rerunParentInstanceInfo,proto3,oneof" json:"rerunParentInstanceInfo,omitempty"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` } -func (x *TaskScheduledEvent) Reset() { - *x = TaskScheduledEvent{} +func (x *RaiseEventRequest) Reset() { + *x = RaiseEventRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[12] + mi := &file_orchestrator_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TaskScheduledEvent) String() string { +func (x *RaiseEventRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TaskScheduledEvent) ProtoMessage() {} +func (*RaiseEventRequest) ProtoMessage() {} -func (x *TaskScheduledEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[12] +func (x *RaiseEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1074,80 +723,55 @@ func (x *TaskScheduledEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TaskScheduledEvent.ProtoReflect.Descriptor instead. -func (*TaskScheduledEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{12} +// Deprecated: Use RaiseEventRequest.ProtoReflect.Descriptor instead. +func (*RaiseEventRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{8} } -func (x *TaskScheduledEvent) GetName() string { +func (x *RaiseEventRequest) GetInstanceId() string { if x != nil { - return x.Name + return x.InstanceId } return "" } -func (x *TaskScheduledEvent) GetVersion() *wrapperspb.StringValue { - if x != nil { - return x.Version - } - return nil -} - -func (x *TaskScheduledEvent) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil -} - -func (x *TaskScheduledEvent) GetParentTraceContext() *TraceContext { - if x != nil { - return x.ParentTraceContext - } - return nil -} - -func (x *TaskScheduledEvent) GetTaskExecutionId() string { +func (x *RaiseEventRequest) GetName() string { if x != nil { - return x.TaskExecutionId + return x.Name } return "" } -func (x *TaskScheduledEvent) GetRerunParentInstanceInfo() *RerunParentInstanceInfo { +func (x *RaiseEventRequest) GetInput() *wrapperspb.StringValue { if x != nil { - return x.RerunParentInstanceInfo + return x.Input } return nil } -type TaskCompletedEvent struct { +type RaiseEventResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` - Result *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` - TaskExecutionId string `protobuf:"bytes,3,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` } -func (x *TaskCompletedEvent) Reset() { - *x = TaskCompletedEvent{} +func (x *RaiseEventResponse) Reset() { + *x = RaiseEventResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[13] + mi := &file_orchestrator_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TaskCompletedEvent) String() string { +func (x *RaiseEventResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TaskCompletedEvent) ProtoMessage() {} +func (*RaiseEventResponse) ProtoMessage() {} -func (x *TaskCompletedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[13] +func (x *RaiseEventResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1158,59 +782,38 @@ func (x *TaskCompletedEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TaskCompletedEvent.ProtoReflect.Descriptor instead. -func (*TaskCompletedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{13} -} - -func (x *TaskCompletedEvent) GetTaskScheduledId() int32 { - if x != nil { - return x.TaskScheduledId - } - return 0 -} - -func (x *TaskCompletedEvent) GetResult() *wrapperspb.StringValue { - if x != nil { - return x.Result - } - return nil -} - -func (x *TaskCompletedEvent) GetTaskExecutionId() string { - if x != nil { - return x.TaskExecutionId - } - return "" +// Deprecated: Use RaiseEventResponse.ProtoReflect.Descriptor instead. +func (*RaiseEventResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{9} } -type TaskFailedEvent struct { +type TerminateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` - FailureDetails *TaskFailureDetails `protobuf:"bytes,2,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` - TaskExecutionId string `protobuf:"bytes,3,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Output *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` + Recursive bool `protobuf:"varint,3,opt,name=recursive,proto3" json:"recursive,omitempty"` } -func (x *TaskFailedEvent) Reset() { - *x = TaskFailedEvent{} +func (x *TerminateRequest) Reset() { + *x = TerminateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[14] + mi := &file_orchestrator_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TaskFailedEvent) String() string { +func (x *TerminateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TaskFailedEvent) ProtoMessage() {} +func (*TerminateRequest) ProtoMessage() {} -func (x *TaskFailedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[14] +func (x *TerminateRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1221,64 +824,55 @@ func (x *TaskFailedEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TaskFailedEvent.ProtoReflect.Descriptor instead. -func (*TaskFailedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{14} +// Deprecated: Use TerminateRequest.ProtoReflect.Descriptor instead. +func (*TerminateRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{10} } -func (x *TaskFailedEvent) GetTaskScheduledId() int32 { +func (x *TerminateRequest) GetInstanceId() string { if x != nil { - return x.TaskScheduledId + return x.InstanceId } - return 0 + return "" } -func (x *TaskFailedEvent) GetFailureDetails() *TaskFailureDetails { +func (x *TerminateRequest) GetOutput() *wrapperspb.StringValue { if x != nil { - return x.FailureDetails + return x.Output } return nil } -func (x *TaskFailedEvent) GetTaskExecutionId() string { +func (x *TerminateRequest) GetRecursive() bool { if x != nil { - return x.TaskExecutionId + return x.Recursive } - return "" + return false } -type SubOrchestrationInstanceCreatedEvent struct { +type TerminateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"` - ParentTraceContext *TraceContext `protobuf:"bytes,5,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` - // If defined, indicates that this task was the starting point of a new - // workflow execution as the result of a rerun operation. - RerunParentInstanceInfo *RerunParentInstanceInfo `protobuf:"bytes,6,opt,name=rerunParentInstanceInfo,proto3,oneof" json:"rerunParentInstanceInfo,omitempty"` } -func (x *SubOrchestrationInstanceCreatedEvent) Reset() { - *x = SubOrchestrationInstanceCreatedEvent{} +func (x *TerminateResponse) Reset() { + *x = TerminateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[15] + mi := &file_orchestrator_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SubOrchestrationInstanceCreatedEvent) String() string { +func (x *TerminateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SubOrchestrationInstanceCreatedEvent) ProtoMessage() {} +func (*TerminateResponse) ProtoMessage() {} -func (x *SubOrchestrationInstanceCreatedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[15] +func (x *TerminateResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1289,79 +883,37 @@ func (x *SubOrchestrationInstanceCreatedEvent) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use SubOrchestrationInstanceCreatedEvent.ProtoReflect.Descriptor instead. -func (*SubOrchestrationInstanceCreatedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{15} -} - -func (x *SubOrchestrationInstanceCreatedEvent) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *SubOrchestrationInstanceCreatedEvent) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SubOrchestrationInstanceCreatedEvent) GetVersion() *wrapperspb.StringValue { - if x != nil { - return x.Version - } - return nil -} - -func (x *SubOrchestrationInstanceCreatedEvent) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil -} - -func (x *SubOrchestrationInstanceCreatedEvent) GetParentTraceContext() *TraceContext { - if x != nil { - return x.ParentTraceContext - } - return nil -} - -func (x *SubOrchestrationInstanceCreatedEvent) GetRerunParentInstanceInfo() *RerunParentInstanceInfo { - if x != nil { - return x.RerunParentInstanceInfo - } - return nil +// Deprecated: Use TerminateResponse.ProtoReflect.Descriptor instead. +func (*TerminateResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{11} } -type SubOrchestrationInstanceCompletedEvent struct { +type SuspendRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` - Result *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Reason *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` } -func (x *SubOrchestrationInstanceCompletedEvent) Reset() { - *x = SubOrchestrationInstanceCompletedEvent{} +func (x *SuspendRequest) Reset() { + *x = SuspendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[16] + mi := &file_orchestrator_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SubOrchestrationInstanceCompletedEvent) String() string { +func (x *SuspendRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SubOrchestrationInstanceCompletedEvent) ProtoMessage() {} +func (*SuspendRequest) ProtoMessage() {} -func (x *SubOrchestrationInstanceCompletedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[16] +func (x *SuspendRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1372,51 +924,48 @@ func (x *SubOrchestrationInstanceCompletedEvent) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use SubOrchestrationInstanceCompletedEvent.ProtoReflect.Descriptor instead. -func (*SubOrchestrationInstanceCompletedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{16} +// Deprecated: Use SuspendRequest.ProtoReflect.Descriptor instead. +func (*SuspendRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{12} } -func (x *SubOrchestrationInstanceCompletedEvent) GetTaskScheduledId() int32 { +func (x *SuspendRequest) GetInstanceId() string { if x != nil { - return x.TaskScheduledId + return x.InstanceId } - return 0 + return "" } -func (x *SubOrchestrationInstanceCompletedEvent) GetResult() *wrapperspb.StringValue { +func (x *SuspendRequest) GetReason() *wrapperspb.StringValue { if x != nil { - return x.Result + return x.Reason } return nil } -type SubOrchestrationInstanceFailedEvent struct { +type SuspendResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - TaskScheduledId int32 `protobuf:"varint,1,opt,name=taskScheduledId,proto3" json:"taskScheduledId,omitempty"` - FailureDetails *TaskFailureDetails `protobuf:"bytes,2,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` } -func (x *SubOrchestrationInstanceFailedEvent) Reset() { - *x = SubOrchestrationInstanceFailedEvent{} +func (x *SuspendResponse) Reset() { + *x = SuspendResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[17] + mi := &file_orchestrator_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SubOrchestrationInstanceFailedEvent) String() string { +func (x *SuspendResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SubOrchestrationInstanceFailedEvent) ProtoMessage() {} +func (*SuspendResponse) ProtoMessage() {} -func (x *SubOrchestrationInstanceFailedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[17] +func (x *SuspendResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1427,54 +976,37 @@ func (x *SubOrchestrationInstanceFailedEvent) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use SubOrchestrationInstanceFailedEvent.ProtoReflect.Descriptor instead. -func (*SubOrchestrationInstanceFailedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{17} -} - -func (x *SubOrchestrationInstanceFailedEvent) GetTaskScheduledId() int32 { - if x != nil { - return x.TaskScheduledId - } - return 0 -} - -func (x *SubOrchestrationInstanceFailedEvent) GetFailureDetails() *TaskFailureDetails { - if x != nil { - return x.FailureDetails - } - return nil +// Deprecated: Use SuspendResponse.ProtoReflect.Descriptor instead. +func (*SuspendResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{13} } -type TimerCreatedEvent struct { +type ResumeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FireAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=fireAt,proto3" json:"fireAt,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` - // If defined, indicates that this task was the starting point of a new - // workflow execution as the result of a rerun operation. - RerunParentInstanceInfo *RerunParentInstanceInfo `protobuf:"bytes,3,opt,name=rerunParentInstanceInfo,proto3,oneof" json:"rerunParentInstanceInfo,omitempty"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + Reason *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` } -func (x *TimerCreatedEvent) Reset() { - *x = TimerCreatedEvent{} +func (x *ResumeRequest) Reset() { + *x = ResumeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[18] + mi := &file_orchestrator_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TimerCreatedEvent) String() string { +func (x *ResumeRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TimerCreatedEvent) ProtoMessage() {} +func (*ResumeRequest) ProtoMessage() {} -func (x *TimerCreatedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[18] +func (x *ResumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1485,58 +1017,48 @@ func (x *TimerCreatedEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TimerCreatedEvent.ProtoReflect.Descriptor instead. -func (*TimerCreatedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{18} +// Deprecated: Use ResumeRequest.ProtoReflect.Descriptor instead. +func (*ResumeRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{14} } -func (x *TimerCreatedEvent) GetFireAt() *timestamppb.Timestamp { +func (x *ResumeRequest) GetInstanceId() string { if x != nil { - return x.FireAt - } - return nil -} - -func (x *TimerCreatedEvent) GetName() string { - if x != nil && x.Name != nil { - return *x.Name + return x.InstanceId } return "" } -func (x *TimerCreatedEvent) GetRerunParentInstanceInfo() *RerunParentInstanceInfo { +func (x *ResumeRequest) GetReason() *wrapperspb.StringValue { if x != nil { - return x.RerunParentInstanceInfo + return x.Reason } return nil } -type TimerFiredEvent struct { +type ResumeResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - FireAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=fireAt,proto3" json:"fireAt,omitempty"` - TimerId int32 `protobuf:"varint,2,opt,name=timerId,proto3" json:"timerId,omitempty"` } -func (x *TimerFiredEvent) Reset() { - *x = TimerFiredEvent{} +func (x *ResumeResponse) Reset() { + *x = ResumeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[19] + mi := &file_orchestrator_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TimerFiredEvent) String() string { +func (x *ResumeResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TimerFiredEvent) ProtoMessage() {} +func (*ResumeResponse) ProtoMessage() {} -func (x *TimerFiredEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[19] +func (x *ResumeResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1547,50 +1069,51 @@ func (x *TimerFiredEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TimerFiredEvent.ProtoReflect.Descriptor instead. -func (*TimerFiredEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{19} -} - -func (x *TimerFiredEvent) GetFireAt() *timestamppb.Timestamp { - if x != nil { - return x.FireAt - } - return nil -} - -func (x *TimerFiredEvent) GetTimerId() int32 { - if x != nil { - return x.TimerId - } - return 0 +// Deprecated: Use ResumeResponse.ProtoReflect.Descriptor instead. +func (*ResumeResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{15} } -type OrchestratorStartedEvent struct { +type PurgeInstancesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version *OrchestrationVersion `protobuf:"bytes,1,opt,name=version,proto3,oneof" json:"version,omitempty"` + // Types that are assignable to Request: + // + // *PurgeInstancesRequest_InstanceId + // *PurgeInstancesRequest_PurgeInstanceFilter + Request isPurgeInstancesRequest_Request `protobuf_oneof:"request"` + Recursive bool `protobuf:"varint,3,opt,name=recursive,proto3" json:"recursive,omitempty"` + // force will force a purge of a workflow, regardless of its current + // runtime state, or whether an active worker can process it, the backend + // will attempt to delete it anyway. This neccessarily means the purging is + // executed out side of the workflow state machine, and therefore, can lead + // to corrupt state or broken workflow execution. Usage of this should + // _only_ be used when the client knows the workflow is not being currently + // processed. It is highly recommended to avoid using this flag unless + // absolutely necessary. + // Defaults to false. + Force *bool `protobuf:"varint,4,opt,name=force,proto3,oneof" json:"force,omitempty"` } -func (x *OrchestratorStartedEvent) Reset() { - *x = OrchestratorStartedEvent{} +func (x *PurgeInstancesRequest) Reset() { + *x = PurgeInstancesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[20] + mi := &file_orchestrator_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *OrchestratorStartedEvent) String() string { +func (x *PurgeInstancesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OrchestratorStartedEvent) ProtoMessage() {} +func (*PurgeInstancesRequest) ProtoMessage() {} -func (x *OrchestratorStartedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[20] +func (x *PurgeInstancesRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1601,83 +1124,89 @@ func (x *OrchestratorStartedEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OrchestratorStartedEvent.ProtoReflect.Descriptor instead. -func (*OrchestratorStartedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{20} +// Deprecated: Use PurgeInstancesRequest.ProtoReflect.Descriptor instead. +func (*PurgeInstancesRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{16} } -func (x *OrchestratorStartedEvent) GetVersion() *OrchestrationVersion { - if x != nil { - return x.Version +func (m *PurgeInstancesRequest) GetRequest() isPurgeInstancesRequest_Request { + if m != nil { + return m.Request } return nil } -type OrchestratorCompletedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PurgeInstancesRequest) GetInstanceId() string { + if x, ok := x.GetRequest().(*PurgeInstancesRequest_InstanceId); ok { + return x.InstanceId + } + return "" } -func (x *OrchestratorCompletedEvent) Reset() { - *x = OrchestratorCompletedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PurgeInstancesRequest) GetPurgeInstanceFilter() *PurgeInstanceFilter { + if x, ok := x.GetRequest().(*PurgeInstancesRequest_PurgeInstanceFilter); ok { + return x.PurgeInstanceFilter } + return nil } -func (x *OrchestratorCompletedEvent) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PurgeInstancesRequest) GetRecursive() bool { + if x != nil { + return x.Recursive + } + return false } -func (*OrchestratorCompletedEvent) ProtoMessage() {} - -func (x *OrchestratorCompletedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PurgeInstancesRequest) GetForce() bool { + if x != nil && x.Force != nil { + return *x.Force } - return mi.MessageOf(x) + return false } -// Deprecated: Use OrchestratorCompletedEvent.ProtoReflect.Descriptor instead. -func (*OrchestratorCompletedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{21} +type isPurgeInstancesRequest_Request interface { + isPurgeInstancesRequest_Request() +} + +type PurgeInstancesRequest_InstanceId struct { + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3,oneof"` +} + +type PurgeInstancesRequest_PurgeInstanceFilter struct { + PurgeInstanceFilter *PurgeInstanceFilter `protobuf:"bytes,2,opt,name=purgeInstanceFilter,proto3,oneof"` } -type EventSentEvent struct { +func (*PurgeInstancesRequest_InstanceId) isPurgeInstancesRequest_Request() {} + +func (*PurgeInstancesRequest_PurgeInstanceFilter) isPurgeInstancesRequest_Request() {} + +type PurgeInstanceFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` + CreatedTimeFrom *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=createdTimeFrom,proto3" json:"createdTimeFrom,omitempty"` + CreatedTimeTo *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdTimeTo,proto3" json:"createdTimeTo,omitempty"` + RuntimeStatus []OrchestrationStatus `protobuf:"varint,3,rep,packed,name=runtimeStatus,proto3,enum=OrchestrationStatus" json:"runtimeStatus,omitempty"` } -func (x *EventSentEvent) Reset() { - *x = EventSentEvent{} +func (x *PurgeInstanceFilter) Reset() { + *x = PurgeInstanceFilter{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[22] + mi := &file_orchestrator_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EventSentEvent) String() string { +func (x *PurgeInstanceFilter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EventSentEvent) ProtoMessage() {} +func (*PurgeInstanceFilter) ProtoMessage() {} -func (x *EventSentEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[22] +func (x *PurgeInstanceFilter) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1688,58 +1217,58 @@ func (x *EventSentEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EventSentEvent.ProtoReflect.Descriptor instead. -func (*EventSentEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{22} +// Deprecated: Use PurgeInstanceFilter.ProtoReflect.Descriptor instead. +func (*PurgeInstanceFilter) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{17} } -func (x *EventSentEvent) GetInstanceId() string { +func (x *PurgeInstanceFilter) GetCreatedTimeFrom() *timestamppb.Timestamp { if x != nil { - return x.InstanceId + return x.CreatedTimeFrom } - return "" + return nil } -func (x *EventSentEvent) GetName() string { +func (x *PurgeInstanceFilter) GetCreatedTimeTo() *timestamppb.Timestamp { if x != nil { - return x.Name + return x.CreatedTimeTo } - return "" + return nil } -func (x *EventSentEvent) GetInput() *wrapperspb.StringValue { +func (x *PurgeInstanceFilter) GetRuntimeStatus() []OrchestrationStatus { if x != nil { - return x.Input + return x.RuntimeStatus } return nil } -type EventRaisedEvent struct { +type PurgeInstancesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` + DeletedInstanceCount int32 `protobuf:"varint,1,opt,name=deletedInstanceCount,proto3" json:"deletedInstanceCount,omitempty"` + IsComplete *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=isComplete,proto3" json:"isComplete,omitempty"` } -func (x *EventRaisedEvent) Reset() { - *x = EventRaisedEvent{} +func (x *PurgeInstancesResponse) Reset() { + *x = PurgeInstancesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[23] + mi := &file_orchestrator_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EventRaisedEvent) String() string { +func (x *PurgeInstancesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EventRaisedEvent) ProtoMessage() {} +func (*PurgeInstancesResponse) ProtoMessage() {} -func (x *EventRaisedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[23] +func (x *PurgeInstancesResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1750,50 +1279,48 @@ func (x *EventRaisedEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EventRaisedEvent.ProtoReflect.Descriptor instead. -func (*EventRaisedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{23} +// Deprecated: Use PurgeInstancesResponse.ProtoReflect.Descriptor instead. +func (*PurgeInstancesResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{18} } -func (x *EventRaisedEvent) GetName() string { +func (x *PurgeInstancesResponse) GetDeletedInstanceCount() int32 { if x != nil { - return x.Name + return x.DeletedInstanceCount } - return "" + return 0 } -func (x *EventRaisedEvent) GetInput() *wrapperspb.StringValue { +func (x *PurgeInstancesResponse) GetIsComplete() *wrapperspb.BoolValue { if x != nil { - return x.Input + return x.IsComplete } return nil } -type ContinueAsNewEvent struct { +type GetWorkItemsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Input *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` } -func (x *ContinueAsNewEvent) Reset() { - *x = ContinueAsNewEvent{} +func (x *GetWorkItemsRequest) Reset() { + *x = GetWorkItemsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[24] + mi := &file_orchestrator_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ContinueAsNewEvent) String() string { +func (x *GetWorkItemsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ContinueAsNewEvent) ProtoMessage() {} +func (*GetWorkItemsRequest) ProtoMessage() {} -func (x *ContinueAsNewEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[24] +func (x *GetWorkItemsRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1804,43 +1331,41 @@ func (x *ContinueAsNewEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ContinueAsNewEvent.ProtoReflect.Descriptor instead. -func (*ContinueAsNewEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{24} -} - -func (x *ContinueAsNewEvent) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil +// Deprecated: Use GetWorkItemsRequest.ProtoReflect.Descriptor instead. +func (*GetWorkItemsRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{19} } -type ExecutionSuspendedEvent struct { +type WorkItem struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Input *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + // Types that are assignable to Request: + // + // *WorkItem_WorkflowRequest + // *WorkItem_ActivityRequest + Request isWorkItem_Request `protobuf_oneof:"request"` + CompletionToken string `protobuf:"bytes,10,opt,name=completionToken,proto3" json:"completionToken,omitempty"` } -func (x *ExecutionSuspendedEvent) Reset() { - *x = ExecutionSuspendedEvent{} +func (x *WorkItem) Reset() { + *x = WorkItem{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[25] + mi := &file_orchestrator_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ExecutionSuspendedEvent) String() string { +func (x *WorkItem) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExecutionSuspendedEvent) ProtoMessage() {} +func (*WorkItem) ProtoMessage() {} -func (x *ExecutionSuspendedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[25] +func (x *WorkItem) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1851,91 +1376,78 @@ func (x *ExecutionSuspendedEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExecutionSuspendedEvent.ProtoReflect.Descriptor instead. -func (*ExecutionSuspendedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{25} +// Deprecated: Use WorkItem.ProtoReflect.Descriptor instead. +func (*WorkItem) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{20} } -func (x *ExecutionSuspendedEvent) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input +func (m *WorkItem) GetRequest() isWorkItem_Request { + if m != nil { + return m.Request } return nil } -type ExecutionResumedEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Input *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` +func (x *WorkItem) GetWorkflowRequest() *WorkflowRequest { + if x, ok := x.GetRequest().(*WorkItem_WorkflowRequest); ok { + return x.WorkflowRequest + } + return nil } -func (x *ExecutionResumedEvent) Reset() { - *x = ExecutionResumedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *WorkItem) GetActivityRequest() *ActivityRequest { + if x, ok := x.GetRequest().(*WorkItem_ActivityRequest); ok { + return x.ActivityRequest } + return nil } -func (x *ExecutionResumedEvent) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *WorkItem) GetCompletionToken() string { + if x != nil { + return x.CompletionToken + } + return "" } -func (*ExecutionResumedEvent) ProtoMessage() {} - -func (x *ExecutionResumedEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +type isWorkItem_Request interface { + isWorkItem_Request() } -// Deprecated: Use ExecutionResumedEvent.ProtoReflect.Descriptor instead. -func (*ExecutionResumedEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{26} +type WorkItem_WorkflowRequest struct { + WorkflowRequest *WorkflowRequest `protobuf:"bytes,1,opt,name=workflowRequest,proto3,oneof"` } -func (x *ExecutionResumedEvent) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil +type WorkItem_ActivityRequest struct { + ActivityRequest *ActivityRequest `protobuf:"bytes,2,opt,name=activityRequest,proto3,oneof"` } -type ExecutionStalledEvent struct { +func (*WorkItem_WorkflowRequest) isWorkItem_Request() {} + +func (*WorkItem_ActivityRequest) isWorkItem_Request() {} + +type CompleteTaskResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Reason StalledReason `protobuf:"varint,1,opt,name=reason,proto3,enum=StalledReason" json:"reason,omitempty"` - Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` } -func (x *ExecutionStalledEvent) Reset() { - *x = ExecutionStalledEvent{} +func (x *CompleteTaskResponse) Reset() { + *x = CompleteTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[27] + mi := &file_orchestrator_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ExecutionStalledEvent) String() string { +func (x *CompleteTaskResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExecutionStalledEvent) ProtoMessage() {} +func (*CompleteTaskResponse) ProtoMessage() {} -func (x *ExecutionStalledEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[27] +func (x *CompleteTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1946,74 +1458,57 @@ func (x *ExecutionStalledEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExecutionStalledEvent.ProtoReflect.Descriptor instead. -func (*ExecutionStalledEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{27} -} - -func (x *ExecutionStalledEvent) GetReason() StalledReason { - if x != nil { - return x.Reason - } - return StalledReason_PATCH_MISMATCH -} - -func (x *ExecutionStalledEvent) GetDescription() string { - if x != nil && x.Description != nil { - return *x.Description - } - return "" +// Deprecated: Use CompleteTaskResponse.ProtoReflect.Descriptor instead. +func (*CompleteTaskResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{21} } -type HistoryEvent struct { +// RerunWorkflowFromEventRequest is used to rerun a workflow instance from a +// specific event ID. +type RerunWorkflowFromEventRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - EventId int32 `protobuf:"varint,1,opt,name=eventId,proto3" json:"eventId,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // Types that are assignable to EventType: - // - // *HistoryEvent_ExecutionStarted - // *HistoryEvent_ExecutionCompleted - // *HistoryEvent_ExecutionTerminated - // *HistoryEvent_TaskScheduled - // *HistoryEvent_TaskCompleted - // *HistoryEvent_TaskFailed - // *HistoryEvent_SubOrchestrationInstanceCreated - // *HistoryEvent_SubOrchestrationInstanceCompleted - // *HistoryEvent_SubOrchestrationInstanceFailed - // *HistoryEvent_TimerCreated - // *HistoryEvent_TimerFired - // *HistoryEvent_OrchestratorStarted - // *HistoryEvent_OrchestratorCompleted - // *HistoryEvent_EventSent - // *HistoryEvent_EventRaised - // *HistoryEvent_ContinueAsNew - // *HistoryEvent_ExecutionSuspended - // *HistoryEvent_ExecutionResumed - // *HistoryEvent_ExecutionStalled - EventType isHistoryEvent_EventType `protobuf_oneof:"eventType"` - Router *TaskRouter `protobuf:"bytes,30,opt,name=router,proto3,oneof" json:"router,omitempty"` -} - -func (x *HistoryEvent) Reset() { - *x = HistoryEvent{} + // sourceInstanceID is the workflow instance ID to rerun. Can be a top + // level instance, or child workflow instance. + SourceInstanceID string `protobuf:"bytes,1,opt,name=sourceInstanceID,proto3" json:"sourceInstanceID,omitempty"` + // the event id to start the new workflow instance from. + EventID uint32 `protobuf:"varint,2,opt,name=eventID,proto3" json:"eventID,omitempty"` + // newInstanceID is the new instance ID to use for the new workflow instance. + // If not given, a random instance ID will be given. + NewInstanceID *string `protobuf:"bytes,3,opt,name=newInstanceID,proto3,oneof" json:"newInstanceID,omitempty"` + // input can optionally given to give the new instance a different input to + // the next Activity event. + Input *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"` + // overwrite_input signals that the input to the rerun activity should be + // written with input. This is required because of the incorrect typing of + // inputs being `StringValue` which cannot be optional, and therefore no nil + // value can be signalled or overwritten. + OverwriteInput bool `protobuf:"varint,5,opt,name=overwriteInput,proto3" json:"overwriteInput,omitempty"` + // newChildWorkflowInstanceID is an optional instance ID to use when + // rerunning from a child workflow. Only accepted if the event ID given is + // targeting a child workflow creation event. + NewChildWorkflowInstanceID *string `protobuf:"bytes,6,opt,name=newChildWorkflowInstanceID,proto3,oneof" json:"newChildWorkflowInstanceID,omitempty"` +} + +func (x *RerunWorkflowFromEventRequest) Reset() { + *x = RerunWorkflowFromEventRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[28] + mi := &file_orchestrator_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *HistoryEvent) String() string { +func (x *RerunWorkflowFromEventRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*HistoryEvent) ProtoMessage() {} +func (*RerunWorkflowFromEventRequest) ProtoMessage() {} -func (x *HistoryEvent) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[28] +func (x *RerunWorkflowFromEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2024,319 +1519,80 @@ func (x *HistoryEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use HistoryEvent.ProtoReflect.Descriptor instead. -func (*HistoryEvent) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{28} +// Deprecated: Use RerunWorkflowFromEventRequest.ProtoReflect.Descriptor instead. +func (*RerunWorkflowFromEventRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{22} } -func (x *HistoryEvent) GetEventId() int32 { +func (x *RerunWorkflowFromEventRequest) GetSourceInstanceID() string { if x != nil { - return x.EventId + return x.SourceInstanceID } - return 0 + return "" } -func (x *HistoryEvent) GetTimestamp() *timestamppb.Timestamp { +func (x *RerunWorkflowFromEventRequest) GetEventID() uint32 { if x != nil { - return x.Timestamp + return x.EventID } - return nil + return 0 } -func (m *HistoryEvent) GetEventType() isHistoryEvent_EventType { - if m != nil { - return m.EventType +func (x *RerunWorkflowFromEventRequest) GetNewInstanceID() string { + if x != nil && x.NewInstanceID != nil { + return *x.NewInstanceID } - return nil + return "" } -func (x *HistoryEvent) GetExecutionStarted() *ExecutionStartedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_ExecutionStarted); ok { - return x.ExecutionStarted +func (x *RerunWorkflowFromEventRequest) GetInput() *wrapperspb.StringValue { + if x != nil { + return x.Input } return nil } -func (x *HistoryEvent) GetExecutionCompleted() *ExecutionCompletedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_ExecutionCompleted); ok { - return x.ExecutionCompleted +func (x *RerunWorkflowFromEventRequest) GetOverwriteInput() bool { + if x != nil { + return x.OverwriteInput } - return nil + return false } -func (x *HistoryEvent) GetExecutionTerminated() *ExecutionTerminatedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_ExecutionTerminated); ok { - return x.ExecutionTerminated +func (x *RerunWorkflowFromEventRequest) GetNewChildWorkflowInstanceID() string { + if x != nil && x.NewChildWorkflowInstanceID != nil { + return *x.NewChildWorkflowInstanceID } - return nil + return "" } -func (x *HistoryEvent) GetTaskScheduled() *TaskScheduledEvent { - if x, ok := x.GetEventType().(*HistoryEvent_TaskScheduled); ok { - return x.TaskScheduled - } - return nil -} +// RerunWorkflowFromEventResponse is the response to executing +// RerunWorkflowFromEvent. +type RerunWorkflowFromEventResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *HistoryEvent) GetTaskCompleted() *TaskCompletedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_TaskCompleted); ok { - return x.TaskCompleted - } - return nil + NewInstanceID string `protobuf:"bytes,1,opt,name=newInstanceID,proto3" json:"newInstanceID,omitempty"` } -func (x *HistoryEvent) GetTaskFailed() *TaskFailedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_TaskFailed); ok { - return x.TaskFailed +func (x *RerunWorkflowFromEventResponse) Reset() { + *x = RerunWorkflowFromEventResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *HistoryEvent) GetSubOrchestrationInstanceCreated() *SubOrchestrationInstanceCreatedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_SubOrchestrationInstanceCreated); ok { - return x.SubOrchestrationInstanceCreated - } - return nil +func (x *RerunWorkflowFromEventResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *HistoryEvent) GetSubOrchestrationInstanceCompleted() *SubOrchestrationInstanceCompletedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_SubOrchestrationInstanceCompleted); ok { - return x.SubOrchestrationInstanceCompleted - } - return nil -} +func (*RerunWorkflowFromEventResponse) ProtoMessage() {} -func (x *HistoryEvent) GetSubOrchestrationInstanceFailed() *SubOrchestrationInstanceFailedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_SubOrchestrationInstanceFailed); ok { - return x.SubOrchestrationInstanceFailed - } - return nil -} - -func (x *HistoryEvent) GetTimerCreated() *TimerCreatedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_TimerCreated); ok { - return x.TimerCreated - } - return nil -} - -func (x *HistoryEvent) GetTimerFired() *TimerFiredEvent { - if x, ok := x.GetEventType().(*HistoryEvent_TimerFired); ok { - return x.TimerFired - } - return nil -} - -func (x *HistoryEvent) GetOrchestratorStarted() *OrchestratorStartedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_OrchestratorStarted); ok { - return x.OrchestratorStarted - } - return nil -} - -func (x *HistoryEvent) GetOrchestratorCompleted() *OrchestratorCompletedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_OrchestratorCompleted); ok { - return x.OrchestratorCompleted - } - return nil -} - -func (x *HistoryEvent) GetEventSent() *EventSentEvent { - if x, ok := x.GetEventType().(*HistoryEvent_EventSent); ok { - return x.EventSent - } - return nil -} - -func (x *HistoryEvent) GetEventRaised() *EventRaisedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_EventRaised); ok { - return x.EventRaised - } - return nil -} - -func (x *HistoryEvent) GetContinueAsNew() *ContinueAsNewEvent { - if x, ok := x.GetEventType().(*HistoryEvent_ContinueAsNew); ok { - return x.ContinueAsNew - } - return nil -} - -func (x *HistoryEvent) GetExecutionSuspended() *ExecutionSuspendedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_ExecutionSuspended); ok { - return x.ExecutionSuspended - } - return nil -} - -func (x *HistoryEvent) GetExecutionResumed() *ExecutionResumedEvent { - if x, ok := x.GetEventType().(*HistoryEvent_ExecutionResumed); ok { - return x.ExecutionResumed - } - return nil -} - -func (x *HistoryEvent) GetExecutionStalled() *ExecutionStalledEvent { - if x, ok := x.GetEventType().(*HistoryEvent_ExecutionStalled); ok { - return x.ExecutionStalled - } - return nil -} - -func (x *HistoryEvent) GetRouter() *TaskRouter { - if x != nil { - return x.Router - } - return nil -} - -type isHistoryEvent_EventType interface { - isHistoryEvent_EventType() -} - -type HistoryEvent_ExecutionStarted struct { - ExecutionStarted *ExecutionStartedEvent `protobuf:"bytes,3,opt,name=executionStarted,proto3,oneof"` -} - -type HistoryEvent_ExecutionCompleted struct { - ExecutionCompleted *ExecutionCompletedEvent `protobuf:"bytes,4,opt,name=executionCompleted,proto3,oneof"` -} - -type HistoryEvent_ExecutionTerminated struct { - ExecutionTerminated *ExecutionTerminatedEvent `protobuf:"bytes,5,opt,name=executionTerminated,proto3,oneof"` -} - -type HistoryEvent_TaskScheduled struct { - TaskScheduled *TaskScheduledEvent `protobuf:"bytes,6,opt,name=taskScheduled,proto3,oneof"` -} - -type HistoryEvent_TaskCompleted struct { - TaskCompleted *TaskCompletedEvent `protobuf:"bytes,7,opt,name=taskCompleted,proto3,oneof"` -} - -type HistoryEvent_TaskFailed struct { - TaskFailed *TaskFailedEvent `protobuf:"bytes,8,opt,name=taskFailed,proto3,oneof"` -} - -type HistoryEvent_SubOrchestrationInstanceCreated struct { - SubOrchestrationInstanceCreated *SubOrchestrationInstanceCreatedEvent `protobuf:"bytes,9,opt,name=subOrchestrationInstanceCreated,proto3,oneof"` -} - -type HistoryEvent_SubOrchestrationInstanceCompleted struct { - SubOrchestrationInstanceCompleted *SubOrchestrationInstanceCompletedEvent `protobuf:"bytes,10,opt,name=subOrchestrationInstanceCompleted,proto3,oneof"` -} - -type HistoryEvent_SubOrchestrationInstanceFailed struct { - SubOrchestrationInstanceFailed *SubOrchestrationInstanceFailedEvent `protobuf:"bytes,11,opt,name=subOrchestrationInstanceFailed,proto3,oneof"` -} - -type HistoryEvent_TimerCreated struct { - TimerCreated *TimerCreatedEvent `protobuf:"bytes,12,opt,name=timerCreated,proto3,oneof"` -} - -type HistoryEvent_TimerFired struct { - TimerFired *TimerFiredEvent `protobuf:"bytes,13,opt,name=timerFired,proto3,oneof"` -} - -type HistoryEvent_OrchestratorStarted struct { - OrchestratorStarted *OrchestratorStartedEvent `protobuf:"bytes,14,opt,name=orchestratorStarted,proto3,oneof"` -} - -type HistoryEvent_OrchestratorCompleted struct { - OrchestratorCompleted *OrchestratorCompletedEvent `protobuf:"bytes,15,opt,name=orchestratorCompleted,proto3,oneof"` -} - -type HistoryEvent_EventSent struct { - EventSent *EventSentEvent `protobuf:"bytes,16,opt,name=eventSent,proto3,oneof"` -} - -type HistoryEvent_EventRaised struct { - EventRaised *EventRaisedEvent `protobuf:"bytes,17,opt,name=eventRaised,proto3,oneof"` -} - -type HistoryEvent_ContinueAsNew struct { - ContinueAsNew *ContinueAsNewEvent `protobuf:"bytes,20,opt,name=continueAsNew,proto3,oneof"` -} - -type HistoryEvent_ExecutionSuspended struct { - ExecutionSuspended *ExecutionSuspendedEvent `protobuf:"bytes,21,opt,name=executionSuspended,proto3,oneof"` -} - -type HistoryEvent_ExecutionResumed struct { - ExecutionResumed *ExecutionResumedEvent `protobuf:"bytes,22,opt,name=executionResumed,proto3,oneof"` -} - -type HistoryEvent_ExecutionStalled struct { - ExecutionStalled *ExecutionStalledEvent `protobuf:"bytes,31,opt,name=executionStalled,proto3,oneof"` -} - -func (*HistoryEvent_ExecutionStarted) isHistoryEvent_EventType() {} - -func (*HistoryEvent_ExecutionCompleted) isHistoryEvent_EventType() {} - -func (*HistoryEvent_ExecutionTerminated) isHistoryEvent_EventType() {} - -func (*HistoryEvent_TaskScheduled) isHistoryEvent_EventType() {} - -func (*HistoryEvent_TaskCompleted) isHistoryEvent_EventType() {} - -func (*HistoryEvent_TaskFailed) isHistoryEvent_EventType() {} - -func (*HistoryEvent_SubOrchestrationInstanceCreated) isHistoryEvent_EventType() {} - -func (*HistoryEvent_SubOrchestrationInstanceCompleted) isHistoryEvent_EventType() {} - -func (*HistoryEvent_SubOrchestrationInstanceFailed) isHistoryEvent_EventType() {} - -func (*HistoryEvent_TimerCreated) isHistoryEvent_EventType() {} - -func (*HistoryEvent_TimerFired) isHistoryEvent_EventType() {} - -func (*HistoryEvent_OrchestratorStarted) isHistoryEvent_EventType() {} - -func (*HistoryEvent_OrchestratorCompleted) isHistoryEvent_EventType() {} - -func (*HistoryEvent_EventSent) isHistoryEvent_EventType() {} - -func (*HistoryEvent_EventRaised) isHistoryEvent_EventType() {} - -func (*HistoryEvent_ContinueAsNew) isHistoryEvent_EventType() {} - -func (*HistoryEvent_ExecutionSuspended) isHistoryEvent_EventType() {} - -func (*HistoryEvent_ExecutionResumed) isHistoryEvent_EventType() {} - -func (*HistoryEvent_ExecutionStalled) isHistoryEvent_EventType() {} - -type ScheduleTaskAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` - Router *TaskRouter `protobuf:"bytes,4,opt,name=router,proto3,oneof" json:"router,omitempty"` - TaskExecutionId string `protobuf:"bytes,5,opt,name=taskExecutionId,proto3" json:"taskExecutionId,omitempty"` -} - -func (x *ScheduleTaskAction) Reset() { - *x = ScheduleTaskAction{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScheduleTaskAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScheduleTaskAction) ProtoMessage() {} - -func (x *ScheduleTaskAction) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[29] +func (x *RerunWorkflowFromEventResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2347,75 +1603,50 @@ func (x *ScheduleTaskAction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ScheduleTaskAction.ProtoReflect.Descriptor instead. -func (*ScheduleTaskAction) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{29} -} - -func (x *ScheduleTaskAction) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ScheduleTaskAction) GetVersion() *wrapperspb.StringValue { - if x != nil { - return x.Version - } - return nil -} - -func (x *ScheduleTaskAction) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil -} - -func (x *ScheduleTaskAction) GetRouter() *TaskRouter { - if x != nil { - return x.Router - } - return nil +// Deprecated: Use RerunWorkflowFromEventResponse.ProtoReflect.Descriptor instead. +func (*RerunWorkflowFromEventResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{23} } -func (x *ScheduleTaskAction) GetTaskExecutionId() string { +func (x *RerunWorkflowFromEventResponse) GetNewInstanceID() string { if x != nil { - return x.TaskExecutionId + return x.NewInstanceID } return "" } -type CreateSubOrchestrationAction struct { +// ListInstanceIDsRequest is used to list all workflow instances. +type ListInstanceIDsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"` - Router *TaskRouter `protobuf:"bytes,5,opt,name=router,proto3,oneof" json:"router,omitempty"` + // continuationToken is the continuation token to use for pagination. This + // is the token which the next page should start from. If not given, the + // first page will be returned. + ContinuationToken *string `protobuf:"bytes,1,opt,name=continuationToken,proto3,oneof" json:"continuationToken,omitempty"` + // pageSize is the maximum number of instances to return for this page. If + // not given, all instances will be attempted to be returned. + PageSize *uint32 `protobuf:"varint,2,opt,name=pageSize,proto3,oneof" json:"pageSize,omitempty"` } -func (x *CreateSubOrchestrationAction) Reset() { - *x = CreateSubOrchestrationAction{} +func (x *ListInstanceIDsRequest) Reset() { + *x = ListInstanceIDsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[30] + mi := &file_orchestrator_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CreateSubOrchestrationAction) String() string { +func (x *ListInstanceIDsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateSubOrchestrationAction) ProtoMessage() {} +func (*ListInstanceIDsRequest) ProtoMessage() {} -func (x *CreateSubOrchestrationAction) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[30] +func (x *ListInstanceIDsRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2426,72 +1657,55 @@ func (x *CreateSubOrchestrationAction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateSubOrchestrationAction.ProtoReflect.Descriptor instead. -func (*CreateSubOrchestrationAction) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{30} -} - -func (x *CreateSubOrchestrationAction) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" +// Deprecated: Use ListInstanceIDsRequest.ProtoReflect.Descriptor instead. +func (*ListInstanceIDsRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{24} } -func (x *CreateSubOrchestrationAction) GetName() string { - if x != nil { - return x.Name +func (x *ListInstanceIDsRequest) GetContinuationToken() string { + if x != nil && x.ContinuationToken != nil { + return *x.ContinuationToken } return "" } -func (x *CreateSubOrchestrationAction) GetVersion() *wrapperspb.StringValue { - if x != nil { - return x.Version - } - return nil -} - -func (x *CreateSubOrchestrationAction) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil -} - -func (x *CreateSubOrchestrationAction) GetRouter() *TaskRouter { - if x != nil { - return x.Router +func (x *ListInstanceIDsRequest) GetPageSize() uint32 { + if x != nil && x.PageSize != nil { + return *x.PageSize } - return nil + return 0 } -type CreateTimerAction struct { +// ListInstanceIDsResponse is the response to executing ListInstanceIDs. +type ListInstanceIDsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FireAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=fireAt,proto3" json:"fireAt,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` + // instanceIds is the list of instance IDs returned. + InstanceIds []string `protobuf:"bytes,1,rep,name=instanceIds,proto3" json:"instanceIds,omitempty"` + // continuationToken is the continuation token to use for pagination. If + // there are no more pages, this will be null. + ContinuationToken *string `protobuf:"bytes,2,opt,name=continuationToken,proto3,oneof" json:"continuationToken,omitempty"` } -func (x *CreateTimerAction) Reset() { - *x = CreateTimerAction{} +func (x *ListInstanceIDsResponse) Reset() { + *x = ListInstanceIDsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[31] + mi := &file_orchestrator_service_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CreateTimerAction) String() string { +func (x *ListInstanceIDsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateTimerAction) ProtoMessage() {} +func (*ListInstanceIDsResponse) ProtoMessage() {} -func (x *CreateTimerAction) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[31] +func (x *ListInstanceIDsResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2502,3905 +1716,637 @@ func (x *CreateTimerAction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateTimerAction.ProtoReflect.Descriptor instead. -func (*CreateTimerAction) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{31} +// Deprecated: Use ListInstanceIDsResponse.ProtoReflect.Descriptor instead. +func (*ListInstanceIDsResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{25} } -func (x *CreateTimerAction) GetFireAt() *timestamppb.Timestamp { +func (x *ListInstanceIDsResponse) GetInstanceIds() []string { if x != nil { - return x.FireAt + return x.InstanceIds } return nil } -func (x *CreateTimerAction) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *ListInstanceIDsResponse) GetContinuationToken() string { + if x != nil && x.ContinuationToken != nil { + return *x.ContinuationToken } return "" } -type SendEventAction struct { +// GetInstanceHistoryRequest is used to get the full history of a +// workflow instance. +type GetInstanceHistoryRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Instance *OrchestrationInstance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Data *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` } -func (x *SendEventAction) Reset() { - *x = SendEventAction{} +func (x *GetInstanceHistoryRequest) Reset() { + *x = GetInstanceHistoryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[32] + mi := &file_orchestrator_service_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -} - -func (x *SendEventAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendEventAction) ProtoMessage() {} - -func (x *SendEventAction) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendEventAction.ProtoReflect.Descriptor instead. -func (*SendEventAction) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{32} -} - -func (x *SendEventAction) GetInstance() *OrchestrationInstance { - if x != nil { - return x.Instance - } - return nil -} - -func (x *SendEventAction) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SendEventAction) GetData() *wrapperspb.StringValue { - if x != nil { - return x.Data - } - return nil -} - -type CompleteOrchestrationAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OrchestrationStatus OrchestrationStatus `protobuf:"varint,1,opt,name=orchestrationStatus,proto3,enum=OrchestrationStatus" json:"orchestrationStatus,omitempty"` - Result *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` - Details *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` - NewVersion *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=newVersion,proto3" json:"newVersion,omitempty"` - CarryoverEvents []*HistoryEvent `protobuf:"bytes,5,rep,name=carryoverEvents,proto3" json:"carryoverEvents,omitempty"` - FailureDetails *TaskFailureDetails `protobuf:"bytes,6,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` -} - -func (x *CompleteOrchestrationAction) Reset() { - *x = CompleteOrchestrationAction{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompleteOrchestrationAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompleteOrchestrationAction) ProtoMessage() {} - -func (x *CompleteOrchestrationAction) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CompleteOrchestrationAction.ProtoReflect.Descriptor instead. -func (*CompleteOrchestrationAction) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{33} -} - -func (x *CompleteOrchestrationAction) GetOrchestrationStatus() OrchestrationStatus { - if x != nil { - return x.OrchestrationStatus - } - return OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING -} - -func (x *CompleteOrchestrationAction) GetResult() *wrapperspb.StringValue { - if x != nil { - return x.Result - } - return nil -} - -func (x *CompleteOrchestrationAction) GetDetails() *wrapperspb.StringValue { - if x != nil { - return x.Details - } - return nil -} - -func (x *CompleteOrchestrationAction) GetNewVersion() *wrapperspb.StringValue { - if x != nil { - return x.NewVersion - } - return nil -} - -func (x *CompleteOrchestrationAction) GetCarryoverEvents() []*HistoryEvent { - if x != nil { - return x.CarryoverEvents - } - return nil -} - -func (x *CompleteOrchestrationAction) GetFailureDetails() *TaskFailureDetails { - if x != nil { - return x.FailureDetails - } - return nil -} - -type TerminateOrchestrationAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Reason *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` - Recurse bool `protobuf:"varint,3,opt,name=recurse,proto3" json:"recurse,omitempty"` -} - -func (x *TerminateOrchestrationAction) Reset() { - *x = TerminateOrchestrationAction{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TerminateOrchestrationAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TerminateOrchestrationAction) ProtoMessage() {} - -func (x *TerminateOrchestrationAction) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TerminateOrchestrationAction.ProtoReflect.Descriptor instead. -func (*TerminateOrchestrationAction) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{34} -} - -func (x *TerminateOrchestrationAction) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *TerminateOrchestrationAction) GetReason() *wrapperspb.StringValue { - if x != nil { - return x.Reason - } - return nil -} - -func (x *TerminateOrchestrationAction) GetRecurse() bool { - if x != nil { - return x.Recurse - } - return false -} - -type OrchestratorVersionNotAvailableAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *OrchestratorVersionNotAvailableAction) Reset() { - *x = OrchestratorVersionNotAvailableAction{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrchestratorVersionNotAvailableAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrchestratorVersionNotAvailableAction) ProtoMessage() {} - -func (x *OrchestratorVersionNotAvailableAction) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrchestratorVersionNotAvailableAction.ProtoReflect.Descriptor instead. -func (*OrchestratorVersionNotAvailableAction) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{35} -} - -type OrchestratorAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // Types that are assignable to OrchestratorActionType: - // - // *OrchestratorAction_ScheduleTask - // *OrchestratorAction_CreateSubOrchestration - // *OrchestratorAction_CreateTimer - // *OrchestratorAction_SendEvent - // *OrchestratorAction_CompleteOrchestration - // *OrchestratorAction_TerminateOrchestration - // *OrchestratorAction_OrchestratorVersionNotAvailable - OrchestratorActionType isOrchestratorAction_OrchestratorActionType `protobuf_oneof:"orchestratorActionType"` - Router *TaskRouter `protobuf:"bytes,9,opt,name=router,proto3,oneof" json:"router,omitempty"` -} - -func (x *OrchestratorAction) Reset() { - *x = OrchestratorAction{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrchestratorAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrchestratorAction) ProtoMessage() {} - -func (x *OrchestratorAction) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrchestratorAction.ProtoReflect.Descriptor instead. -func (*OrchestratorAction) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{36} -} - -func (x *OrchestratorAction) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (m *OrchestratorAction) GetOrchestratorActionType() isOrchestratorAction_OrchestratorActionType { - if m != nil { - return m.OrchestratorActionType - } - return nil -} - -func (x *OrchestratorAction) GetScheduleTask() *ScheduleTaskAction { - if x, ok := x.GetOrchestratorActionType().(*OrchestratorAction_ScheduleTask); ok { - return x.ScheduleTask - } - return nil -} - -func (x *OrchestratorAction) GetCreateSubOrchestration() *CreateSubOrchestrationAction { - if x, ok := x.GetOrchestratorActionType().(*OrchestratorAction_CreateSubOrchestration); ok { - return x.CreateSubOrchestration - } - return nil -} - -func (x *OrchestratorAction) GetCreateTimer() *CreateTimerAction { - if x, ok := x.GetOrchestratorActionType().(*OrchestratorAction_CreateTimer); ok { - return x.CreateTimer - } - return nil -} - -func (x *OrchestratorAction) GetSendEvent() *SendEventAction { - if x, ok := x.GetOrchestratorActionType().(*OrchestratorAction_SendEvent); ok { - return x.SendEvent - } - return nil -} - -func (x *OrchestratorAction) GetCompleteOrchestration() *CompleteOrchestrationAction { - if x, ok := x.GetOrchestratorActionType().(*OrchestratorAction_CompleteOrchestration); ok { - return x.CompleteOrchestration - } - return nil -} - -func (x *OrchestratorAction) GetTerminateOrchestration() *TerminateOrchestrationAction { - if x, ok := x.GetOrchestratorActionType().(*OrchestratorAction_TerminateOrchestration); ok { - return x.TerminateOrchestration - } - return nil -} - -func (x *OrchestratorAction) GetOrchestratorVersionNotAvailable() *OrchestratorVersionNotAvailableAction { - if x, ok := x.GetOrchestratorActionType().(*OrchestratorAction_OrchestratorVersionNotAvailable); ok { - return x.OrchestratorVersionNotAvailable - } - return nil -} - -func (x *OrchestratorAction) GetRouter() *TaskRouter { - if x != nil { - return x.Router - } - return nil -} - -type isOrchestratorAction_OrchestratorActionType interface { - isOrchestratorAction_OrchestratorActionType() -} - -type OrchestratorAction_ScheduleTask struct { - ScheduleTask *ScheduleTaskAction `protobuf:"bytes,2,opt,name=scheduleTask,proto3,oneof"` -} - -type OrchestratorAction_CreateSubOrchestration struct { - CreateSubOrchestration *CreateSubOrchestrationAction `protobuf:"bytes,3,opt,name=createSubOrchestration,proto3,oneof"` -} - -type OrchestratorAction_CreateTimer struct { - CreateTimer *CreateTimerAction `protobuf:"bytes,4,opt,name=createTimer,proto3,oneof"` -} - -type OrchestratorAction_SendEvent struct { - SendEvent *SendEventAction `protobuf:"bytes,5,opt,name=sendEvent,proto3,oneof"` -} - -type OrchestratorAction_CompleteOrchestration struct { - CompleteOrchestration *CompleteOrchestrationAction `protobuf:"bytes,6,opt,name=completeOrchestration,proto3,oneof"` -} - -type OrchestratorAction_TerminateOrchestration struct { - TerminateOrchestration *TerminateOrchestrationAction `protobuf:"bytes,7,opt,name=terminateOrchestration,proto3,oneof"` -} - -type OrchestratorAction_OrchestratorVersionNotAvailable struct { - OrchestratorVersionNotAvailable *OrchestratorVersionNotAvailableAction `protobuf:"bytes,10,opt,name=orchestratorVersionNotAvailable,proto3,oneof"` -} - -func (*OrchestratorAction_ScheduleTask) isOrchestratorAction_OrchestratorActionType() {} - -func (*OrchestratorAction_CreateSubOrchestration) isOrchestratorAction_OrchestratorActionType() {} - -func (*OrchestratorAction_CreateTimer) isOrchestratorAction_OrchestratorActionType() {} - -func (*OrchestratorAction_SendEvent) isOrchestratorAction_OrchestratorActionType() {} - -func (*OrchestratorAction_CompleteOrchestration) isOrchestratorAction_OrchestratorActionType() {} - -func (*OrchestratorAction_TerminateOrchestration) isOrchestratorAction_OrchestratorActionType() {} - -func (*OrchestratorAction_OrchestratorVersionNotAvailable) isOrchestratorAction_OrchestratorActionType() { -} - -type OrchestratorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - ExecutionId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=executionId,proto3" json:"executionId,omitempty"` - PastEvents []*HistoryEvent `protobuf:"bytes,3,rep,name=pastEvents,proto3" json:"pastEvents,omitempty"` - NewEvents []*HistoryEvent `protobuf:"bytes,4,rep,name=newEvents,proto3" json:"newEvents,omitempty"` - RequiresHistoryStreaming bool `protobuf:"varint,6,opt,name=requiresHistoryStreaming,proto3" json:"requiresHistoryStreaming,omitempty"` - Router *TaskRouter `protobuf:"bytes,7,opt,name=router,proto3,oneof" json:"router,omitempty"` -} - -func (x *OrchestratorRequest) Reset() { - *x = OrchestratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrchestratorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrchestratorRequest) ProtoMessage() {} - -func (x *OrchestratorRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrchestratorRequest.ProtoReflect.Descriptor instead. -func (*OrchestratorRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{37} -} - -func (x *OrchestratorRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *OrchestratorRequest) GetExecutionId() *wrapperspb.StringValue { - if x != nil { - return x.ExecutionId - } - return nil -} - -func (x *OrchestratorRequest) GetPastEvents() []*HistoryEvent { - if x != nil { - return x.PastEvents - } - return nil -} - -func (x *OrchestratorRequest) GetNewEvents() []*HistoryEvent { - if x != nil { - return x.NewEvents - } - return nil -} - -func (x *OrchestratorRequest) GetRequiresHistoryStreaming() bool { - if x != nil { - return x.RequiresHistoryStreaming - } - return false -} - -func (x *OrchestratorRequest) GetRouter() *TaskRouter { - if x != nil { - return x.Router - } - return nil -} - -type OrchestratorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Actions []*OrchestratorAction `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"` - CustomStatus *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=customStatus,proto3" json:"customStatus,omitempty"` - CompletionToken string `protobuf:"bytes,4,opt,name=completionToken,proto3" json:"completionToken,omitempty"` - // The number of work item events that were processed by the orchestrator. - // This field is optional. If not set, the service should assume that the orchestrator processed all events. - NumEventsProcessed *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=numEventsProcessed,proto3" json:"numEventsProcessed,omitempty"` - Version *OrchestrationVersion `protobuf:"bytes,6,opt,name=version,proto3,oneof" json:"version,omitempty"` -} - -func (x *OrchestratorResponse) Reset() { - *x = OrchestratorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrchestratorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrchestratorResponse) ProtoMessage() {} - -func (x *OrchestratorResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrchestratorResponse.ProtoReflect.Descriptor instead. -func (*OrchestratorResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{38} -} - -func (x *OrchestratorResponse) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *OrchestratorResponse) GetActions() []*OrchestratorAction { - if x != nil { - return x.Actions - } - return nil -} - -func (x *OrchestratorResponse) GetCustomStatus() *wrapperspb.StringValue { - if x != nil { - return x.CustomStatus - } - return nil -} - -func (x *OrchestratorResponse) GetCompletionToken() string { - if x != nil { - return x.CompletionToken - } - return "" -} - -func (x *OrchestratorResponse) GetNumEventsProcessed() *wrapperspb.Int32Value { - if x != nil { - return x.NumEventsProcessed - } - return nil -} - -func (x *OrchestratorResponse) GetVersion() *OrchestrationVersion { - if x != nil { - return x.Version - } - return nil -} - -type CreateInstanceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"` - ScheduledStartTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=scheduledStartTimestamp,proto3" json:"scheduledStartTimestamp,omitempty"` - OrchestrationIdReusePolicy *OrchestrationIdReusePolicy `protobuf:"bytes,6,opt,name=orchestrationIdReusePolicy,proto3" json:"orchestrationIdReusePolicy,omitempty"` - ExecutionId *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=executionId,proto3" json:"executionId,omitempty"` - Tags map[string]string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ParentTraceContext *TraceContext `protobuf:"bytes,9,opt,name=parentTraceContext,proto3" json:"parentTraceContext,omitempty"` -} - -func (x *CreateInstanceRequest) Reset() { - *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateInstanceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateInstanceRequest) ProtoMessage() {} - -func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateInstanceRequest.ProtoReflect.Descriptor instead. -func (*CreateInstanceRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{39} -} - -func (x *CreateInstanceRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *CreateInstanceRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CreateInstanceRequest) GetVersion() *wrapperspb.StringValue { - if x != nil { - return x.Version - } - return nil -} - -func (x *CreateInstanceRequest) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil -} - -func (x *CreateInstanceRequest) GetScheduledStartTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.ScheduledStartTimestamp - } - return nil -} - -func (x *CreateInstanceRequest) GetOrchestrationIdReusePolicy() *OrchestrationIdReusePolicy { - if x != nil { - return x.OrchestrationIdReusePolicy - } - return nil -} - -func (x *CreateInstanceRequest) GetExecutionId() *wrapperspb.StringValue { - if x != nil { - return x.ExecutionId - } - return nil -} - -func (x *CreateInstanceRequest) GetTags() map[string]string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *CreateInstanceRequest) GetParentTraceContext() *TraceContext { - if x != nil { - return x.ParentTraceContext - } - return nil -} - -type OrchestrationIdReusePolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OperationStatus []OrchestrationStatus `protobuf:"varint,1,rep,packed,name=operationStatus,proto3,enum=OrchestrationStatus" json:"operationStatus,omitempty"` - Action CreateOrchestrationAction `protobuf:"varint,2,opt,name=action,proto3,enum=CreateOrchestrationAction" json:"action,omitempty"` -} - -func (x *OrchestrationIdReusePolicy) Reset() { - *x = OrchestrationIdReusePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrchestrationIdReusePolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrchestrationIdReusePolicy) ProtoMessage() {} - -func (x *OrchestrationIdReusePolicy) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrchestrationIdReusePolicy.ProtoReflect.Descriptor instead. -func (*OrchestrationIdReusePolicy) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{40} -} - -func (x *OrchestrationIdReusePolicy) GetOperationStatus() []OrchestrationStatus { - if x != nil { - return x.OperationStatus - } - return nil -} - -func (x *OrchestrationIdReusePolicy) GetAction() CreateOrchestrationAction { - if x != nil { - return x.Action - } - return CreateOrchestrationAction_ERROR -} - -type CreateInstanceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` -} - -func (x *CreateInstanceResponse) Reset() { - *x = CreateInstanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateInstanceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateInstanceResponse) ProtoMessage() {} - -func (x *CreateInstanceResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateInstanceResponse.ProtoReflect.Descriptor instead. -func (*CreateInstanceResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{41} -} - -func (x *CreateInstanceResponse) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -type GetInstanceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - GetInputsAndOutputs bool `protobuf:"varint,2,opt,name=getInputsAndOutputs,proto3" json:"getInputsAndOutputs,omitempty"` -} - -func (x *GetInstanceRequest) Reset() { - *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetInstanceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetInstanceRequest) ProtoMessage() {} - -func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetInstanceRequest.ProtoReflect.Descriptor instead. -func (*GetInstanceRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{42} -} - -func (x *GetInstanceRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *GetInstanceRequest) GetGetInputsAndOutputs() bool { - if x != nil { - return x.GetInputsAndOutputs - } - return false -} - -type GetInstanceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` - OrchestrationState *OrchestrationState `protobuf:"bytes,2,opt,name=orchestrationState,proto3" json:"orchestrationState,omitempty"` -} - -func (x *GetInstanceResponse) Reset() { - *x = GetInstanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetInstanceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetInstanceResponse) ProtoMessage() {} - -func (x *GetInstanceResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetInstanceResponse.ProtoReflect.Descriptor instead. -func (*GetInstanceResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{43} -} - -func (x *GetInstanceResponse) GetExists() bool { - if x != nil { - return x.Exists - } - return false -} - -func (x *GetInstanceResponse) GetOrchestrationState() *OrchestrationState { - if x != nil { - return x.OrchestrationState - } - return nil -} - -type OrchestrationState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Version *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - OrchestrationStatus OrchestrationStatus `protobuf:"varint,4,opt,name=orchestrationStatus,proto3,enum=OrchestrationStatus" json:"orchestrationStatus,omitempty"` - ScheduledStartTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=scheduledStartTimestamp,proto3" json:"scheduledStartTimestamp,omitempty"` - CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=createdTimestamp,proto3" json:"createdTimestamp,omitempty"` - LastUpdatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=lastUpdatedTimestamp,proto3" json:"lastUpdatedTimestamp,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=input,proto3" json:"input,omitempty"` - Output *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=output,proto3" json:"output,omitempty"` - CustomStatus *wrapperspb.StringValue `protobuf:"bytes,10,opt,name=customStatus,proto3" json:"customStatus,omitempty"` - FailureDetails *TaskFailureDetails `protobuf:"bytes,11,opt,name=failureDetails,proto3" json:"failureDetails,omitempty"` - ExecutionId *wrapperspb.StringValue `protobuf:"bytes,12,opt,name=executionId,proto3" json:"executionId,omitempty"` - CompletedTimestamp *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=completedTimestamp,proto3" json:"completedTimestamp,omitempty"` - ParentInstanceId *wrapperspb.StringValue `protobuf:"bytes,14,opt,name=parentInstanceId,proto3" json:"parentInstanceId,omitempty"` - Tags map[string]string `protobuf:"bytes,15,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *OrchestrationState) Reset() { - *x = OrchestrationState{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrchestrationState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrchestrationState) ProtoMessage() {} - -func (x *OrchestrationState) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrchestrationState.ProtoReflect.Descriptor instead. -func (*OrchestrationState) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{44} -} - -func (x *OrchestrationState) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *OrchestrationState) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *OrchestrationState) GetVersion() *wrapperspb.StringValue { - if x != nil { - return x.Version - } - return nil -} - -func (x *OrchestrationState) GetOrchestrationStatus() OrchestrationStatus { - if x != nil { - return x.OrchestrationStatus - } - return OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING -} - -func (x *OrchestrationState) GetScheduledStartTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.ScheduledStartTimestamp - } - return nil -} - -func (x *OrchestrationState) GetCreatedTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.CreatedTimestamp - } - return nil -} - -func (x *OrchestrationState) GetLastUpdatedTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.LastUpdatedTimestamp - } - return nil -} - -func (x *OrchestrationState) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil -} - -func (x *OrchestrationState) GetOutput() *wrapperspb.StringValue { - if x != nil { - return x.Output - } - return nil -} - -func (x *OrchestrationState) GetCustomStatus() *wrapperspb.StringValue { - if x != nil { - return x.CustomStatus - } - return nil -} - -func (x *OrchestrationState) GetFailureDetails() *TaskFailureDetails { - if x != nil { - return x.FailureDetails - } - return nil -} - -func (x *OrchestrationState) GetExecutionId() *wrapperspb.StringValue { - if x != nil { - return x.ExecutionId - } - return nil -} - -func (x *OrchestrationState) GetCompletedTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.CompletedTimestamp - } - return nil -} - -func (x *OrchestrationState) GetParentInstanceId() *wrapperspb.StringValue { - if x != nil { - return x.ParentInstanceId - } - return nil -} - -func (x *OrchestrationState) GetTags() map[string]string { - if x != nil { - return x.Tags - } - return nil -} - -type RaiseEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Input *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` -} - -func (x *RaiseEventRequest) Reset() { - *x = RaiseEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RaiseEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RaiseEventRequest) ProtoMessage() {} - -func (x *RaiseEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RaiseEventRequest.ProtoReflect.Descriptor instead. -func (*RaiseEventRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{45} -} - -func (x *RaiseEventRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *RaiseEventRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RaiseEventRequest) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil -} - -type RaiseEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RaiseEventResponse) Reset() { - *x = RaiseEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RaiseEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RaiseEventResponse) ProtoMessage() {} - -func (x *RaiseEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RaiseEventResponse.ProtoReflect.Descriptor instead. -func (*RaiseEventResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{46} -} - -type TerminateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Output *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` - Recursive bool `protobuf:"varint,3,opt,name=recursive,proto3" json:"recursive,omitempty"` -} - -func (x *TerminateRequest) Reset() { - *x = TerminateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TerminateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TerminateRequest) ProtoMessage() {} - -func (x *TerminateRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TerminateRequest.ProtoReflect.Descriptor instead. -func (*TerminateRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{47} -} - -func (x *TerminateRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *TerminateRequest) GetOutput() *wrapperspb.StringValue { - if x != nil { - return x.Output - } - return nil -} - -func (x *TerminateRequest) GetRecursive() bool { - if x != nil { - return x.Recursive - } - return false -} - -type TerminateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TerminateResponse) Reset() { - *x = TerminateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TerminateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TerminateResponse) ProtoMessage() {} - -func (x *TerminateResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TerminateResponse.ProtoReflect.Descriptor instead. -func (*TerminateResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{48} -} - -type SuspendRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Reason *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` -} - -func (x *SuspendRequest) Reset() { - *x = SuspendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SuspendRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SuspendRequest) ProtoMessage() {} - -func (x *SuspendRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SuspendRequest.ProtoReflect.Descriptor instead. -func (*SuspendRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{49} -} - -func (x *SuspendRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *SuspendRequest) GetReason() *wrapperspb.StringValue { - if x != nil { - return x.Reason - } - return nil -} - -type SuspendResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SuspendResponse) Reset() { - *x = SuspendResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SuspendResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SuspendResponse) ProtoMessage() {} - -func (x *SuspendResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SuspendResponse.ProtoReflect.Descriptor instead. -func (*SuspendResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{50} -} - -type ResumeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - Reason *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` -} - -func (x *ResumeRequest) Reset() { - *x = ResumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResumeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResumeRequest) ProtoMessage() {} - -func (x *ResumeRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResumeRequest.ProtoReflect.Descriptor instead. -func (*ResumeRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{51} -} - -func (x *ResumeRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *ResumeRequest) GetReason() *wrapperspb.StringValue { - if x != nil { - return x.Reason - } - return nil -} - -type ResumeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ResumeResponse) Reset() { - *x = ResumeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResumeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResumeResponse) ProtoMessage() {} - -func (x *ResumeResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResumeResponse.ProtoReflect.Descriptor instead. -func (*ResumeResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{52} -} - -type PurgeInstancesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Request: - // - // *PurgeInstancesRequest_InstanceId - // *PurgeInstancesRequest_PurgeInstanceFilter - Request isPurgeInstancesRequest_Request `protobuf_oneof:"request"` - Recursive bool `protobuf:"varint,3,opt,name=recursive,proto3" json:"recursive,omitempty"` - // force will force a purge of a workflow, regardless of its current - // runtime state, or whether an active worker can process it, the backend - // will attempt to delete it anyway. This neccessarily means the purging is - // executed out side of the workflow state machine, and therefore, can lead - // to corrupt state or broken workflow execution. Usage of this should - // _only_ be used when the client knows the workflow is not being currently - // processed. It is highly recommended to avoid using this flag unless - // absolutely necessary. - // Defaults to false. - Force *bool `protobuf:"varint,4,opt,name=force,proto3,oneof" json:"force,omitempty"` -} - -func (x *PurgeInstancesRequest) Reset() { - *x = PurgeInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PurgeInstancesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PurgeInstancesRequest) ProtoMessage() {} - -func (x *PurgeInstancesRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PurgeInstancesRequest.ProtoReflect.Descriptor instead. -func (*PurgeInstancesRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{53} -} - -func (m *PurgeInstancesRequest) GetRequest() isPurgeInstancesRequest_Request { - if m != nil { - return m.Request - } - return nil -} - -func (x *PurgeInstancesRequest) GetInstanceId() string { - if x, ok := x.GetRequest().(*PurgeInstancesRequest_InstanceId); ok { - return x.InstanceId - } - return "" -} - -func (x *PurgeInstancesRequest) GetPurgeInstanceFilter() *PurgeInstanceFilter { - if x, ok := x.GetRequest().(*PurgeInstancesRequest_PurgeInstanceFilter); ok { - return x.PurgeInstanceFilter - } - return nil -} - -func (x *PurgeInstancesRequest) GetRecursive() bool { - if x != nil { - return x.Recursive - } - return false -} - -func (x *PurgeInstancesRequest) GetForce() bool { - if x != nil && x.Force != nil { - return *x.Force - } - return false -} - -type isPurgeInstancesRequest_Request interface { - isPurgeInstancesRequest_Request() -} - -type PurgeInstancesRequest_InstanceId struct { - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3,oneof"` -} - -type PurgeInstancesRequest_PurgeInstanceFilter struct { - PurgeInstanceFilter *PurgeInstanceFilter `protobuf:"bytes,2,opt,name=purgeInstanceFilter,proto3,oneof"` -} - -func (*PurgeInstancesRequest_InstanceId) isPurgeInstancesRequest_Request() {} - -func (*PurgeInstancesRequest_PurgeInstanceFilter) isPurgeInstancesRequest_Request() {} - -type PurgeInstanceFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CreatedTimeFrom *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=createdTimeFrom,proto3" json:"createdTimeFrom,omitempty"` - CreatedTimeTo *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdTimeTo,proto3" json:"createdTimeTo,omitempty"` - RuntimeStatus []OrchestrationStatus `protobuf:"varint,3,rep,packed,name=runtimeStatus,proto3,enum=OrchestrationStatus" json:"runtimeStatus,omitempty"` -} - -func (x *PurgeInstanceFilter) Reset() { - *x = PurgeInstanceFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PurgeInstanceFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PurgeInstanceFilter) ProtoMessage() {} - -func (x *PurgeInstanceFilter) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PurgeInstanceFilter.ProtoReflect.Descriptor instead. -func (*PurgeInstanceFilter) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{54} -} - -func (x *PurgeInstanceFilter) GetCreatedTimeFrom() *timestamppb.Timestamp { - if x != nil { - return x.CreatedTimeFrom - } - return nil -} - -func (x *PurgeInstanceFilter) GetCreatedTimeTo() *timestamppb.Timestamp { - if x != nil { - return x.CreatedTimeTo - } - return nil -} - -func (x *PurgeInstanceFilter) GetRuntimeStatus() []OrchestrationStatus { - if x != nil { - return x.RuntimeStatus - } - return nil -} - -type PurgeInstancesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DeletedInstanceCount int32 `protobuf:"varint,1,opt,name=deletedInstanceCount,proto3" json:"deletedInstanceCount,omitempty"` - IsComplete *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=isComplete,proto3" json:"isComplete,omitempty"` -} - -func (x *PurgeInstancesResponse) Reset() { - *x = PurgeInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PurgeInstancesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PurgeInstancesResponse) ProtoMessage() {} - -func (x *PurgeInstancesResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PurgeInstancesResponse.ProtoReflect.Descriptor instead. -func (*PurgeInstancesResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{55} -} - -func (x *PurgeInstancesResponse) GetDeletedInstanceCount() int32 { - if x != nil { - return x.DeletedInstanceCount - } - return 0 -} - -func (x *PurgeInstancesResponse) GetIsComplete() *wrapperspb.BoolValue { - if x != nil { - return x.IsComplete - } - return nil -} - -type GetWorkItemsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetWorkItemsRequest) Reset() { - *x = GetWorkItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkItemsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkItemsRequest) ProtoMessage() {} - -func (x *GetWorkItemsRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetWorkItemsRequest.ProtoReflect.Descriptor instead. -func (*GetWorkItemsRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{56} -} - -type WorkItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Request: - // - // *WorkItem_OrchestratorRequest - // *WorkItem_ActivityRequest - Request isWorkItem_Request `protobuf_oneof:"request"` - CompletionToken string `protobuf:"bytes,10,opt,name=completionToken,proto3" json:"completionToken,omitempty"` -} - -func (x *WorkItem) Reset() { - *x = WorkItem{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkItem) ProtoMessage() {} - -func (x *WorkItem) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkItem.ProtoReflect.Descriptor instead. -func (*WorkItem) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{57} -} - -func (m *WorkItem) GetRequest() isWorkItem_Request { - if m != nil { - return m.Request - } - return nil -} - -func (x *WorkItem) GetOrchestratorRequest() *OrchestratorRequest { - if x, ok := x.GetRequest().(*WorkItem_OrchestratorRequest); ok { - return x.OrchestratorRequest - } - return nil -} - -func (x *WorkItem) GetActivityRequest() *ActivityRequest { - if x, ok := x.GetRequest().(*WorkItem_ActivityRequest); ok { - return x.ActivityRequest - } - return nil -} - -func (x *WorkItem) GetCompletionToken() string { - if x != nil { - return x.CompletionToken - } - return "" -} - -type isWorkItem_Request interface { - isWorkItem_Request() -} - -type WorkItem_OrchestratorRequest struct { - OrchestratorRequest *OrchestratorRequest `protobuf:"bytes,1,opt,name=orchestratorRequest,proto3,oneof"` -} - -type WorkItem_ActivityRequest struct { - ActivityRequest *ActivityRequest `protobuf:"bytes,2,opt,name=activityRequest,proto3,oneof"` -} - -func (*WorkItem_OrchestratorRequest) isWorkItem_Request() {} - -func (*WorkItem_ActivityRequest) isWorkItem_Request() {} - -type CompleteTaskResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CompleteTaskResponse) Reset() { - *x = CompleteTaskResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompleteTaskResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompleteTaskResponse) ProtoMessage() {} - -func (x *CompleteTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CompleteTaskResponse.ProtoReflect.Descriptor instead. -func (*CompleteTaskResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{58} -} - -// RerunWorkflowFromEventRequest is used to rerun a workflow instance from a -// specific event ID. -type RerunWorkflowFromEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sourceInstanceID is the orchestration instance ID to rerun. Can be a top - // level instance, or sub-orchestration instance. - SourceInstanceID string `protobuf:"bytes,1,opt,name=sourceInstanceID,proto3" json:"sourceInstanceID,omitempty"` - // the event id to start the new workflow instance from. - EventID uint32 `protobuf:"varint,2,opt,name=eventID,proto3" json:"eventID,omitempty"` - // newInstanceID is the new instance ID to use for the new workflow instance. - // If not given, a random instance ID will be given. - NewInstanceID *string `protobuf:"bytes,3,opt,name=newInstanceID,proto3,oneof" json:"newInstanceID,omitempty"` - // input can optionally given to give the new instance a different input to - // the next Activity event. - Input *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"` - // overwrite_input signals that the input to the rerun activity should be - // written with input. This is required because of the incorrect typing of - // inputs being `StringValue` which cannot be optional, and therefore no nil - // value can be signalled or overwritten. - OverwriteInput bool `protobuf:"varint,5,opt,name=overwriteInput,proto3" json:"overwriteInput,omitempty"` - // newChildWorkflowInstanceID is an optional instance ID to use when - // rerunning from a child workflow. Only accepted if the event ID given is - // targeting a child workflow creation event. - NewChildWorkflowInstanceID *string `protobuf:"bytes,6,opt,name=newChildWorkflowInstanceID,proto3,oneof" json:"newChildWorkflowInstanceID,omitempty"` -} - -func (x *RerunWorkflowFromEventRequest) Reset() { - *x = RerunWorkflowFromEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RerunWorkflowFromEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RerunWorkflowFromEventRequest) ProtoMessage() {} - -func (x *RerunWorkflowFromEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RerunWorkflowFromEventRequest.ProtoReflect.Descriptor instead. -func (*RerunWorkflowFromEventRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{59} -} - -func (x *RerunWorkflowFromEventRequest) GetSourceInstanceID() string { - if x != nil { - return x.SourceInstanceID - } - return "" -} - -func (x *RerunWorkflowFromEventRequest) GetEventID() uint32 { - if x != nil { - return x.EventID - } - return 0 -} - -func (x *RerunWorkflowFromEventRequest) GetNewInstanceID() string { - if x != nil && x.NewInstanceID != nil { - return *x.NewInstanceID - } - return "" -} - -func (x *RerunWorkflowFromEventRequest) GetInput() *wrapperspb.StringValue { - if x != nil { - return x.Input - } - return nil -} - -func (x *RerunWorkflowFromEventRequest) GetOverwriteInput() bool { - if x != nil { - return x.OverwriteInput - } - return false -} - -func (x *RerunWorkflowFromEventRequest) GetNewChildWorkflowInstanceID() string { - if x != nil && x.NewChildWorkflowInstanceID != nil { - return *x.NewChildWorkflowInstanceID - } - return "" -} - -// RerunWorkflowFromEventResponse is the response to executing -// RerunWorkflowFromEvent. -type RerunWorkflowFromEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NewInstanceID string `protobuf:"bytes,1,opt,name=newInstanceID,proto3" json:"newInstanceID,omitempty"` -} - -func (x *RerunWorkflowFromEventResponse) Reset() { - *x = RerunWorkflowFromEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RerunWorkflowFromEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RerunWorkflowFromEventResponse) ProtoMessage() {} - -func (x *RerunWorkflowFromEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RerunWorkflowFromEventResponse.ProtoReflect.Descriptor instead. -func (*RerunWorkflowFromEventResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{60} -} - -func (x *RerunWorkflowFromEventResponse) GetNewInstanceID() string { - if x != nil { - return x.NewInstanceID - } - return "" -} - -// ListInstanceIDsRequest is used to list all orchestration instances. -type ListInstanceIDsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // continuationToken is the continuation token to use for pagination. This - // is the token which the next page should start from. If not given, the - // first page will be returned. - ContinuationToken *string `protobuf:"bytes,1,opt,name=continuationToken,proto3,oneof" json:"continuationToken,omitempty"` - // pageSize is the maximum number of instances to return for this page. If - // not given, all instances will be attempted to be returned. - PageSize *uint32 `protobuf:"varint,2,opt,name=pageSize,proto3,oneof" json:"pageSize,omitempty"` -} - -func (x *ListInstanceIDsRequest) Reset() { - *x = ListInstanceIDsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListInstanceIDsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListInstanceIDsRequest) ProtoMessage() {} - -func (x *ListInstanceIDsRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListInstanceIDsRequest.ProtoReflect.Descriptor instead. -func (*ListInstanceIDsRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{61} -} - -func (x *ListInstanceIDsRequest) GetContinuationToken() string { - if x != nil && x.ContinuationToken != nil { - return *x.ContinuationToken - } - return "" -} - -func (x *ListInstanceIDsRequest) GetPageSize() uint32 { - if x != nil && x.PageSize != nil { - return *x.PageSize - } - return 0 -} - -// ListInstanceIDsResponse is the response to executing ListInstanceIDs. -type ListInstanceIDsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // instanceIds is the list of instance IDs returned. - InstanceIds []string `protobuf:"bytes,1,rep,name=instanceIds,proto3" json:"instanceIds,omitempty"` - // continuationToken is the continuation token to use for pagination. If - // there are no more pages, this will be null. - ContinuationToken *string `protobuf:"bytes,2,opt,name=continuationToken,proto3,oneof" json:"continuationToken,omitempty"` -} - -func (x *ListInstanceIDsResponse) Reset() { - *x = ListInstanceIDsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListInstanceIDsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListInstanceIDsResponse) ProtoMessage() {} - -func (x *ListInstanceIDsResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListInstanceIDsResponse.ProtoReflect.Descriptor instead. -func (*ListInstanceIDsResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{62} -} - -func (x *ListInstanceIDsResponse) GetInstanceIds() []string { - if x != nil { - return x.InstanceIds - } - return nil -} - -func (x *ListInstanceIDsResponse) GetContinuationToken() string { - if x != nil && x.ContinuationToken != nil { - return *x.ContinuationToken - } - return "" -} - -// GetInstanceHistoryRequest is used to get the full history of an -// orchestration instance. -type GetInstanceHistoryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` -} - -func (x *GetInstanceHistoryRequest) Reset() { - *x = GetInstanceHistoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetInstanceHistoryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetInstanceHistoryRequest) ProtoMessage() {} - -func (x *GetInstanceHistoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetInstanceHistoryRequest.ProtoReflect.Descriptor instead. -func (*GetInstanceHistoryRequest) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{63} -} - -func (x *GetInstanceHistoryRequest) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -// GetInstanceHistoryResponse is the response to executing GetInstanceHistory. -type GetInstanceHistoryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Events []*HistoryEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` -} - -func (x *GetInstanceHistoryResponse) Reset() { - *x = GetInstanceHistoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_orchestrator_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetInstanceHistoryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetInstanceHistoryResponse) ProtoMessage() {} - -func (x *GetInstanceHistoryResponse) ProtoReflect() protoreflect.Message { - mi := &file_orchestrator_service_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetInstanceHistoryResponse.ProtoReflect.Descriptor instead. -func (*GetInstanceHistoryResponse) Descriptor() ([]byte, []int) { - return file_orchestrator_service_proto_rawDescGZIP(), []int{64} -} - -func (x *GetInstanceHistoryResponse) GetEvents() []*HistoryEvent { - if x != nil { - return x.Events - } - return nil -} - -var File_orchestrator_service_proto protoreflect.FileDescriptor - -var file_orchestrator_service_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, - 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, - 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x65, 0x0a, 0x0a, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x41, 0x70, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x70, 0x70, 0x49, 0x44, 0x12, 0x25, 0x0a, 0x0b, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x41, 0x70, 0x70, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x70, 0x70, 0x49, 0x44, 0x88, 0x01, - 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x70, 0x70, 0x49, - 0x44, 0x22, 0x52, 0x0a, 0x14, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x77, 0x0a, 0x15, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1e, - 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3e, - 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe0, - 0x02, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, - 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x12, 0x4c, 0x0a, 0x15, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x15, 0x6f, 0x72, 0x63, 0x68, 0x65, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x10, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x34, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xf5, 0x01, 0x0a, 0x12, - 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0c, 0x69, - 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x69, - 0x73, 0x4e, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x4e, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x22, 0x9b, 0x02, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, - 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x64, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4c, - 0x0a, 0x15, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x15, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x05, - 0x61, 0x70, 0x70, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x61, - 0x70, 0x70, 0x49, 0x44, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x70, 0x70, 0x49, - 0x44, 0x22, 0x39, 0x0a, 0x17, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x22, 0x8a, 0x01, 0x0a, - 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x20, 0x0a, - 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, - 0x1a, 0x0a, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x0a, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xf6, 0x04, 0x0a, 0x15, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x12, 0x4c, 0x0a, 0x15, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x15, 0x6f, 0x72, 0x63, 0x68, - 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x50, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x54, - 0x0a, 0x17, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x17, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3d, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, - 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x4e, 0x0a, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x61, 0x6e, 0x49, 0x44, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, - 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x61, - 0x6e, 0x49, 0x44, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xd4, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x46, - 0x0a, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x4f, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x0e, - 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x68, 0x0a, 0x18, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x63, - 0x75, 0x72, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x63, 0x75, - 0x72, 0x73, 0x65, 0x22, 0xf2, 0x02, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3d, 0x0a, 0x12, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, - 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x57, 0x0a, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, - 0x52, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, - 0x5f, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x9e, 0x01, 0x0a, 0x12, 0x54, 0x61, 0x73, - 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xa2, 0x01, 0x0a, 0x0f, 0x54, 0x61, - 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, - 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, - 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xfa, - 0x02, 0x0a, 0x24, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3d, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x57, 0x0a, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x50, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x88, 0x01, 0x01, 0x42, - 0x1a, 0x0a, 0x18, 0x5f, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x26, - 0x53, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, - 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x8c, 0x01, 0x0a, 0x23, 0x53, 0x75, 0x62, 0x4f, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28, - 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xde, 0x01, 0x0a, 0x11, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x66, - 0x69, 0x72, 0x65, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x06, 0x66, 0x69, 0x72, 0x65, 0x41, 0x74, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x57, 0x0a, 0x17, 0x72, 0x65, 0x72, 0x75, - 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x72, 0x75, - 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x48, 0x01, 0x52, 0x17, 0x72, 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x72, - 0x65, 0x72, 0x75, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5f, 0x0a, 0x0f, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x46, - 0x69, 0x72, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x66, 0x69, 0x72, - 0x65, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x06, 0x66, 0x69, 0x72, 0x65, 0x41, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x22, 0x5c, 0x0a, 0x18, 0x4f, 0x72, 0x63, 0x68, 0x65, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x1c, 0x0a, 0x1a, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x22, 0x78, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x74, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x5a, 0x0a, - 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x69, 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x48, 0x0a, 0x12, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x73, 0x4e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x22, 0x4d, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, - 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, - 0x76, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6c, - 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x53, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd4, 0x0c, 0x0a, 0x0c, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x44, 0x0a, 0x10, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x65, 0x64, 0x12, 0x4a, 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x4d, - 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a, - 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x61, 0x73, - 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x0d, 0x74, 0x61, - 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x1f, 0x73, - 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1f, 0x73, - 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x77, - 0x0a, 0x21, 0x73, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x53, 0x75, 0x62, 0x4f, - 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x48, 0x00, 0x52, 0x21, 0x73, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x6e, 0x0a, 0x1e, 0x73, 0x75, 0x62, 0x4f, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1e, 0x73, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, - 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x72, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x46, 0x69, 0x72, 0x65, 0x64, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x46, 0x69, 0x72, - 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x72, - 0x46, 0x69, 0x72, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x12, 0x53, 0x0a, 0x15, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x48, 0x00, 0x52, 0x15, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x09, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x0b, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x61, 0x69, 0x73, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x69, 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x69, 0x73, 0x65, - 0x64, 0x12, 0x3b, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x73, 0x4e, - 0x65, 0x77, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x6e, 0x75, 0x65, 0x41, 0x73, 0x4e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x73, 0x4e, 0x65, 0x77, 0x12, 0x4a, - 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x73, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x44, 0x0a, 0x10, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x16, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x10, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, - 0x12, 0x44, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x48, 0x00, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x72, 0x48, 0x01, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, - 0x42, 0x0b, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x4a, 0x04, - 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x4a, 0x04, 0x08, 0x18, 0x10, 0x19, - 0x4a, 0x04, 0x08, 0x19, 0x10, 0x1a, 0x4a, 0x04, 0x08, 0x1a, 0x10, 0x1b, 0x4a, 0x04, 0x08, 0x1b, - 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x22, 0xf3, - 0x01, 0x0a, 0x12, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, - 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x22, 0xf3, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x22, 0x69, 0x0a, 0x11, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x32, 0x0a, 0x06, 0x66, 0x69, 0x72, 0x65, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x06, 0x66, 0x69, 0x72, - 0x65, 0x41, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x08, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x4f, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x87, 0x03, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x36, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x6e, 0x65, 0x77, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6e, 0x65, 0x77, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0f, 0x63, 0x61, 0x72, 0x72, 0x79, - 0x6f, 0x76, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x0f, 0x63, 0x61, 0x72, 0x72, 0x79, 0x6f, 0x76, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x8e, 0x01, - 0x0a, 0x1c, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, 0x65, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, - 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34, - 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x65, 0x22, 0x27, - 0x0a, 0x25, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x05, 0x0a, 0x12, 0x4f, 0x72, 0x63, 0x68, - 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, - 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x57, 0x0a, 0x16, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x16, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x62, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x65, - 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x53, 0x65, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x15, - 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4f, - 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4f, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x48, 0x00, 0x52, 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x4f, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x72, 0x0a, 0x1f, 0x6f, - 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1f, - 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x28, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x48, 0x01, 0x52, 0x06, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x18, 0x0a, 0x16, 0x6f, 0x72, 0x63, - 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4a, 0x04, - 0x08, 0x08, 0x10, 0x09, 0x22, 0xc8, 0x02, 0x0a, 0x13, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0b, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x0a, - 0x70, 0x61, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x0a, 0x70, 0x61, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x6e, - 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x6e, - 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x18, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, - 0xe0, 0x02, 0x0a, 0x14, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x4f, 0x72, 0x63, 0x68, - 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x4b, 0x0a, 0x12, 0x6e, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6e, 0x75, - 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, - 0x12, 0x34, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0xd8, 0x04, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x54, 0x0a, 0x17, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x17, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x5b, 0x0a, 0x1a, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x1a, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x3e, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x34, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x90, 0x01, - 0x0a, 0x1a, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3e, 0x0a, 0x0f, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x32, 0x0a, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x38, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x66, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, - 0x12, 0x30, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x41, 0x6e, 0x64, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x67, - 0x65, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x41, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x73, 0x22, 0x72, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, - 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x12, 0x43, 0x0a, 0x12, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x12, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xe1, 0x07, 0x0a, 0x12, 0x4f, 0x72, 0x63, 0x68, 0x65, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, - 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x13, 0x6f, 0x72, 0x63, - 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x13, 0x6f, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x54, 0x0a, 0x17, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x17, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x46, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x4e, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0e, 0x66, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x48, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x31, - 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, - 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7b, 0x0a, 0x11, 0x52, 0x61, - 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x52, 0x61, 0x69, 0x73, 0x65, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x86, 0x01, - 0x0a, 0x10, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, - 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, - 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x0e, 0x53, - 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, - 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, - 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x65, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x10, 0x0a, - 0x0e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xd1, 0x01, 0x0a, 0x15, 0x50, 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0a, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x13, 0x70, - 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, - 0x52, 0x13, 0x70, 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, - 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, - 0x69, 0x76, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x01, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x09, - 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x13, 0x50, 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0f, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x6f, - 0x6d, 0x12, 0x40, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x54, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x54, 0x6f, 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, - 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0x88, 0x01, 0x0a, 0x16, 0x50, 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, - 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, - 0x69, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x2d, 0x0a, 0x13, 0x47, 0x65, - 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, - 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x22, 0xd9, 0x01, 0x0a, 0x08, 0x57, 0x6f, - 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x48, 0x0a, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x13, 0x6f, 0x72, 0x63, - 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3c, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, - 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, - 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe2, 0x02, - 0x0a, 0x1d, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x46, - 0x72, 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2a, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x29, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, - 0x6e, 0x65, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x88, 0x01, 0x01, - 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6f, 0x76, - 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x43, 0x0a, 0x1a, - 0x6e, 0x65, 0x77, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x1a, 0x6e, 0x65, 0x77, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x88, 0x01, - 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x44, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x6e, 0x65, 0x77, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x49, 0x44, 0x22, 0x46, 0x0a, 0x1e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x77, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x22, 0x8f, 0x01, 0x0a, 0x16, 0x4c, - 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, 0x70, 0x61, - 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, - 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x84, 0x01, 0x0a, - 0x17, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x31, 0x0a, 0x11, 0x63, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, - 0x12, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x22, 0x3b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, - 0x22, 0x43, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, - 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x3e, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, - 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, - 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x45, - 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, - 0x42, 0x4c, 0x45, 0x10, 0x01, 0x2a, 0xd7, 0x02, 0x0a, 0x13, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, - 0x1c, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, - 0x22, 0x0a, 0x1e, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, - 0x44, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x25, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x54, - 0x49, 0x4e, 0x55, 0x45, 0x44, 0x5f, 0x41, 0x53, 0x5f, 0x4e, 0x45, 0x57, 0x10, 0x02, 0x12, 0x1f, - 0x0a, 0x1b, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, - 0x21, 0x0a, 0x1d, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, - 0x10, 0x04, 0x12, 0x23, 0x0a, 0x1f, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x49, - 0x4e, 0x41, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x52, 0x43, 0x48, 0x45, - 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x22, 0x0a, 0x1e, 0x4f, 0x52, 0x43, - 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x07, 0x12, 0x20, 0x0a, - 0x1c, 0x4f, 0x52, 0x43, 0x48, 0x45, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x2a, - 0x41, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x47, 0x4e, 0x4f, 0x52, - 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, - 0x10, 0x02, 0x32, 0xa5, 0x08, 0x0a, 0x15, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x75, 0x62, 0x53, 0x69, - 0x64, 0x65, 0x63, 0x61, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x05, - 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x41, 0x0a, 0x14, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, - 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x19, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0a, - 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x52, 0x61, 0x69, - 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, - 0x2e, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x11, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x54, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x34, 0x0a, 0x0f, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x0f, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x50, 0x75, 0x72, 0x67, - 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x50, 0x75, 0x72, - 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0c, 0x47, - 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x2e, 0x47, 0x65, - 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x09, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x30, 0x01, 0x12, 0x40, - 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x15, 0x2e, 0x43, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, - 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x15, 0x2e, 0x4f, - 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x15, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x16, 0x52, 0x65, - 0x72, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x73, 0x12, 0x17, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x12, 0x1a, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x56, 0x0a, 0x2b, 0x69, 0x6f, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, - 0x6b, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5a, 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xaa, 0x02, 0x19, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_orchestrator_service_proto_rawDescOnce sync.Once - file_orchestrator_service_proto_rawDescData = file_orchestrator_service_proto_rawDesc -) - -func file_orchestrator_service_proto_rawDescGZIP() []byte { - file_orchestrator_service_proto_rawDescOnce.Do(func() { - file_orchestrator_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_orchestrator_service_proto_rawDescData) - }) - return file_orchestrator_service_proto_rawDescData -} - -var file_orchestrator_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_orchestrator_service_proto_msgTypes = make([]protoimpl.MessageInfo, 68) -var file_orchestrator_service_proto_goTypes = []interface{}{ - (StalledReason)(0), // 0: StalledReason - (OrchestrationStatus)(0), // 1: OrchestrationStatus - (CreateOrchestrationAction)(0), // 2: CreateOrchestrationAction - (*TaskRouter)(nil), // 3: TaskRouter - (*OrchestrationVersion)(nil), // 4: OrchestrationVersion - (*OrchestrationInstance)(nil), // 5: OrchestrationInstance - (*ActivityRequest)(nil), // 6: ActivityRequest - (*ActivityResponse)(nil), // 7: ActivityResponse - (*TaskFailureDetails)(nil), // 8: TaskFailureDetails - (*ParentInstanceInfo)(nil), // 9: ParentInstanceInfo - (*RerunParentInstanceInfo)(nil), // 10: RerunParentInstanceInfo - (*TraceContext)(nil), // 11: TraceContext - (*ExecutionStartedEvent)(nil), // 12: ExecutionStartedEvent - (*ExecutionCompletedEvent)(nil), // 13: ExecutionCompletedEvent - (*ExecutionTerminatedEvent)(nil), // 14: ExecutionTerminatedEvent - (*TaskScheduledEvent)(nil), // 15: TaskScheduledEvent - (*TaskCompletedEvent)(nil), // 16: TaskCompletedEvent - (*TaskFailedEvent)(nil), // 17: TaskFailedEvent - (*SubOrchestrationInstanceCreatedEvent)(nil), // 18: SubOrchestrationInstanceCreatedEvent - (*SubOrchestrationInstanceCompletedEvent)(nil), // 19: SubOrchestrationInstanceCompletedEvent - (*SubOrchestrationInstanceFailedEvent)(nil), // 20: SubOrchestrationInstanceFailedEvent - (*TimerCreatedEvent)(nil), // 21: TimerCreatedEvent - (*TimerFiredEvent)(nil), // 22: TimerFiredEvent - (*OrchestratorStartedEvent)(nil), // 23: OrchestratorStartedEvent - (*OrchestratorCompletedEvent)(nil), // 24: OrchestratorCompletedEvent - (*EventSentEvent)(nil), // 25: EventSentEvent - (*EventRaisedEvent)(nil), // 26: EventRaisedEvent - (*ContinueAsNewEvent)(nil), // 27: ContinueAsNewEvent - (*ExecutionSuspendedEvent)(nil), // 28: ExecutionSuspendedEvent - (*ExecutionResumedEvent)(nil), // 29: ExecutionResumedEvent - (*ExecutionStalledEvent)(nil), // 30: ExecutionStalledEvent - (*HistoryEvent)(nil), // 31: HistoryEvent - (*ScheduleTaskAction)(nil), // 32: ScheduleTaskAction - (*CreateSubOrchestrationAction)(nil), // 33: CreateSubOrchestrationAction - (*CreateTimerAction)(nil), // 34: CreateTimerAction - (*SendEventAction)(nil), // 35: SendEventAction - (*CompleteOrchestrationAction)(nil), // 36: CompleteOrchestrationAction - (*TerminateOrchestrationAction)(nil), // 37: TerminateOrchestrationAction - (*OrchestratorVersionNotAvailableAction)(nil), // 38: OrchestratorVersionNotAvailableAction - (*OrchestratorAction)(nil), // 39: OrchestratorAction - (*OrchestratorRequest)(nil), // 40: OrchestratorRequest - (*OrchestratorResponse)(nil), // 41: OrchestratorResponse - (*CreateInstanceRequest)(nil), // 42: CreateInstanceRequest - (*OrchestrationIdReusePolicy)(nil), // 43: OrchestrationIdReusePolicy - (*CreateInstanceResponse)(nil), // 44: CreateInstanceResponse - (*GetInstanceRequest)(nil), // 45: GetInstanceRequest - (*GetInstanceResponse)(nil), // 46: GetInstanceResponse - (*OrchestrationState)(nil), // 47: OrchestrationState - (*RaiseEventRequest)(nil), // 48: RaiseEventRequest - (*RaiseEventResponse)(nil), // 49: RaiseEventResponse - (*TerminateRequest)(nil), // 50: TerminateRequest - (*TerminateResponse)(nil), // 51: TerminateResponse - (*SuspendRequest)(nil), // 52: SuspendRequest - (*SuspendResponse)(nil), // 53: SuspendResponse - (*ResumeRequest)(nil), // 54: ResumeRequest - (*ResumeResponse)(nil), // 55: ResumeResponse - (*PurgeInstancesRequest)(nil), // 56: PurgeInstancesRequest - (*PurgeInstanceFilter)(nil), // 57: PurgeInstanceFilter - (*PurgeInstancesResponse)(nil), // 58: PurgeInstancesResponse - (*GetWorkItemsRequest)(nil), // 59: GetWorkItemsRequest - (*WorkItem)(nil), // 60: WorkItem - (*CompleteTaskResponse)(nil), // 61: CompleteTaskResponse - (*RerunWorkflowFromEventRequest)(nil), // 62: RerunWorkflowFromEventRequest - (*RerunWorkflowFromEventResponse)(nil), // 63: RerunWorkflowFromEventResponse - (*ListInstanceIDsRequest)(nil), // 64: ListInstanceIDsRequest - (*ListInstanceIDsResponse)(nil), // 65: ListInstanceIDsResponse - (*GetInstanceHistoryRequest)(nil), // 66: GetInstanceHistoryRequest - (*GetInstanceHistoryResponse)(nil), // 67: GetInstanceHistoryResponse - nil, // 68: ExecutionStartedEvent.TagsEntry - nil, // 69: CreateInstanceRequest.TagsEntry - nil, // 70: OrchestrationState.TagsEntry - (*wrapperspb.StringValue)(nil), // 71: google.protobuf.StringValue - (*timestamppb.Timestamp)(nil), // 72: google.protobuf.Timestamp - (*wrapperspb.Int32Value)(nil), // 73: google.protobuf.Int32Value - (*wrapperspb.BoolValue)(nil), // 74: google.protobuf.BoolValue - (*emptypb.Empty)(nil), // 75: google.protobuf.Empty -} -var file_orchestrator_service_proto_depIdxs = []int32{ - 71, // 0: OrchestrationInstance.executionId:type_name -> google.protobuf.StringValue - 71, // 1: ActivityRequest.version:type_name -> google.protobuf.StringValue - 71, // 2: ActivityRequest.input:type_name -> google.protobuf.StringValue - 5, // 3: ActivityRequest.orchestrationInstance:type_name -> OrchestrationInstance - 11, // 4: ActivityRequest.parentTraceContext:type_name -> TraceContext - 71, // 5: ActivityResponse.result:type_name -> google.protobuf.StringValue - 8, // 6: ActivityResponse.failureDetails:type_name -> TaskFailureDetails - 71, // 7: TaskFailureDetails.stackTrace:type_name -> google.protobuf.StringValue - 8, // 8: TaskFailureDetails.innerFailure:type_name -> TaskFailureDetails - 71, // 9: ParentInstanceInfo.name:type_name -> google.protobuf.StringValue - 71, // 10: ParentInstanceInfo.version:type_name -> google.protobuf.StringValue - 5, // 11: ParentInstanceInfo.orchestrationInstance:type_name -> OrchestrationInstance - 71, // 12: TraceContext.traceState:type_name -> google.protobuf.StringValue - 71, // 13: ExecutionStartedEvent.version:type_name -> google.protobuf.StringValue - 71, // 14: ExecutionStartedEvent.input:type_name -> google.protobuf.StringValue - 5, // 15: ExecutionStartedEvent.orchestrationInstance:type_name -> OrchestrationInstance - 9, // 16: ExecutionStartedEvent.parentInstance:type_name -> ParentInstanceInfo - 72, // 17: ExecutionStartedEvent.scheduledStartTimestamp:type_name -> google.protobuf.Timestamp - 11, // 18: ExecutionStartedEvent.parentTraceContext:type_name -> TraceContext - 71, // 19: ExecutionStartedEvent.orchestrationSpanID:type_name -> google.protobuf.StringValue - 68, // 20: ExecutionStartedEvent.tags:type_name -> ExecutionStartedEvent.TagsEntry - 1, // 21: ExecutionCompletedEvent.orchestrationStatus:type_name -> OrchestrationStatus - 71, // 22: ExecutionCompletedEvent.result:type_name -> google.protobuf.StringValue - 8, // 23: ExecutionCompletedEvent.failureDetails:type_name -> TaskFailureDetails - 71, // 24: ExecutionTerminatedEvent.input:type_name -> google.protobuf.StringValue - 71, // 25: TaskScheduledEvent.version:type_name -> google.protobuf.StringValue - 71, // 26: TaskScheduledEvent.input:type_name -> google.protobuf.StringValue - 11, // 27: TaskScheduledEvent.parentTraceContext:type_name -> TraceContext - 10, // 28: TaskScheduledEvent.rerunParentInstanceInfo:type_name -> RerunParentInstanceInfo - 71, // 29: TaskCompletedEvent.result:type_name -> google.protobuf.StringValue - 8, // 30: TaskFailedEvent.failureDetails:type_name -> TaskFailureDetails - 71, // 31: SubOrchestrationInstanceCreatedEvent.version:type_name -> google.protobuf.StringValue - 71, // 32: SubOrchestrationInstanceCreatedEvent.input:type_name -> google.protobuf.StringValue - 11, // 33: SubOrchestrationInstanceCreatedEvent.parentTraceContext:type_name -> TraceContext - 10, // 34: SubOrchestrationInstanceCreatedEvent.rerunParentInstanceInfo:type_name -> RerunParentInstanceInfo - 71, // 35: SubOrchestrationInstanceCompletedEvent.result:type_name -> google.protobuf.StringValue - 8, // 36: SubOrchestrationInstanceFailedEvent.failureDetails:type_name -> TaskFailureDetails - 72, // 37: TimerCreatedEvent.fireAt:type_name -> google.protobuf.Timestamp - 10, // 38: TimerCreatedEvent.rerunParentInstanceInfo:type_name -> RerunParentInstanceInfo - 72, // 39: TimerFiredEvent.fireAt:type_name -> google.protobuf.Timestamp - 4, // 40: OrchestratorStartedEvent.version:type_name -> OrchestrationVersion - 71, // 41: EventSentEvent.input:type_name -> google.protobuf.StringValue - 71, // 42: EventRaisedEvent.input:type_name -> google.protobuf.StringValue - 71, // 43: ContinueAsNewEvent.input:type_name -> google.protobuf.StringValue - 71, // 44: ExecutionSuspendedEvent.input:type_name -> google.protobuf.StringValue - 71, // 45: ExecutionResumedEvent.input:type_name -> google.protobuf.StringValue - 0, // 46: ExecutionStalledEvent.reason:type_name -> StalledReason - 72, // 47: HistoryEvent.timestamp:type_name -> google.protobuf.Timestamp - 12, // 48: HistoryEvent.executionStarted:type_name -> ExecutionStartedEvent - 13, // 49: HistoryEvent.executionCompleted:type_name -> ExecutionCompletedEvent - 14, // 50: HistoryEvent.executionTerminated:type_name -> ExecutionTerminatedEvent - 15, // 51: HistoryEvent.taskScheduled:type_name -> TaskScheduledEvent - 16, // 52: HistoryEvent.taskCompleted:type_name -> TaskCompletedEvent - 17, // 53: HistoryEvent.taskFailed:type_name -> TaskFailedEvent - 18, // 54: HistoryEvent.subOrchestrationInstanceCreated:type_name -> SubOrchestrationInstanceCreatedEvent - 19, // 55: HistoryEvent.subOrchestrationInstanceCompleted:type_name -> SubOrchestrationInstanceCompletedEvent - 20, // 56: HistoryEvent.subOrchestrationInstanceFailed:type_name -> SubOrchestrationInstanceFailedEvent - 21, // 57: HistoryEvent.timerCreated:type_name -> TimerCreatedEvent - 22, // 58: HistoryEvent.timerFired:type_name -> TimerFiredEvent - 23, // 59: HistoryEvent.orchestratorStarted:type_name -> OrchestratorStartedEvent - 24, // 60: HistoryEvent.orchestratorCompleted:type_name -> OrchestratorCompletedEvent - 25, // 61: HistoryEvent.eventSent:type_name -> EventSentEvent - 26, // 62: HistoryEvent.eventRaised:type_name -> EventRaisedEvent - 27, // 63: HistoryEvent.continueAsNew:type_name -> ContinueAsNewEvent - 28, // 64: HistoryEvent.executionSuspended:type_name -> ExecutionSuspendedEvent - 29, // 65: HistoryEvent.executionResumed:type_name -> ExecutionResumedEvent - 30, // 66: HistoryEvent.executionStalled:type_name -> ExecutionStalledEvent - 3, // 67: HistoryEvent.router:type_name -> TaskRouter - 71, // 68: ScheduleTaskAction.version:type_name -> google.protobuf.StringValue - 71, // 69: ScheduleTaskAction.input:type_name -> google.protobuf.StringValue - 3, // 70: ScheduleTaskAction.router:type_name -> TaskRouter - 71, // 71: CreateSubOrchestrationAction.version:type_name -> google.protobuf.StringValue - 71, // 72: CreateSubOrchestrationAction.input:type_name -> google.protobuf.StringValue - 3, // 73: CreateSubOrchestrationAction.router:type_name -> TaskRouter - 72, // 74: CreateTimerAction.fireAt:type_name -> google.protobuf.Timestamp - 5, // 75: SendEventAction.instance:type_name -> OrchestrationInstance - 71, // 76: SendEventAction.data:type_name -> google.protobuf.StringValue - 1, // 77: CompleteOrchestrationAction.orchestrationStatus:type_name -> OrchestrationStatus - 71, // 78: CompleteOrchestrationAction.result:type_name -> google.protobuf.StringValue - 71, // 79: CompleteOrchestrationAction.details:type_name -> google.protobuf.StringValue - 71, // 80: CompleteOrchestrationAction.newVersion:type_name -> google.protobuf.StringValue - 31, // 81: CompleteOrchestrationAction.carryoverEvents:type_name -> HistoryEvent - 8, // 82: CompleteOrchestrationAction.failureDetails:type_name -> TaskFailureDetails - 71, // 83: TerminateOrchestrationAction.reason:type_name -> google.protobuf.StringValue - 32, // 84: OrchestratorAction.scheduleTask:type_name -> ScheduleTaskAction - 33, // 85: OrchestratorAction.createSubOrchestration:type_name -> CreateSubOrchestrationAction - 34, // 86: OrchestratorAction.createTimer:type_name -> CreateTimerAction - 35, // 87: OrchestratorAction.sendEvent:type_name -> SendEventAction - 36, // 88: OrchestratorAction.completeOrchestration:type_name -> CompleteOrchestrationAction - 37, // 89: OrchestratorAction.terminateOrchestration:type_name -> TerminateOrchestrationAction - 38, // 90: OrchestratorAction.orchestratorVersionNotAvailable:type_name -> OrchestratorVersionNotAvailableAction - 3, // 91: OrchestratorAction.router:type_name -> TaskRouter - 71, // 92: OrchestratorRequest.executionId:type_name -> google.protobuf.StringValue - 31, // 93: OrchestratorRequest.pastEvents:type_name -> HistoryEvent - 31, // 94: OrchestratorRequest.newEvents:type_name -> HistoryEvent - 3, // 95: OrchestratorRequest.router:type_name -> TaskRouter - 39, // 96: OrchestratorResponse.actions:type_name -> OrchestratorAction - 71, // 97: OrchestratorResponse.customStatus:type_name -> google.protobuf.StringValue - 73, // 98: OrchestratorResponse.numEventsProcessed:type_name -> google.protobuf.Int32Value - 4, // 99: OrchestratorResponse.version:type_name -> OrchestrationVersion - 71, // 100: CreateInstanceRequest.version:type_name -> google.protobuf.StringValue - 71, // 101: CreateInstanceRequest.input:type_name -> google.protobuf.StringValue - 72, // 102: CreateInstanceRequest.scheduledStartTimestamp:type_name -> google.protobuf.Timestamp - 43, // 103: CreateInstanceRequest.orchestrationIdReusePolicy:type_name -> OrchestrationIdReusePolicy - 71, // 104: CreateInstanceRequest.executionId:type_name -> google.protobuf.StringValue - 69, // 105: CreateInstanceRequest.tags:type_name -> CreateInstanceRequest.TagsEntry - 11, // 106: CreateInstanceRequest.parentTraceContext:type_name -> TraceContext - 1, // 107: OrchestrationIdReusePolicy.operationStatus:type_name -> OrchestrationStatus - 2, // 108: OrchestrationIdReusePolicy.action:type_name -> CreateOrchestrationAction - 47, // 109: GetInstanceResponse.orchestrationState:type_name -> OrchestrationState - 71, // 110: OrchestrationState.version:type_name -> google.protobuf.StringValue - 1, // 111: OrchestrationState.orchestrationStatus:type_name -> OrchestrationStatus - 72, // 112: OrchestrationState.scheduledStartTimestamp:type_name -> google.protobuf.Timestamp - 72, // 113: OrchestrationState.createdTimestamp:type_name -> google.protobuf.Timestamp - 72, // 114: OrchestrationState.lastUpdatedTimestamp:type_name -> google.protobuf.Timestamp - 71, // 115: OrchestrationState.input:type_name -> google.protobuf.StringValue - 71, // 116: OrchestrationState.output:type_name -> google.protobuf.StringValue - 71, // 117: OrchestrationState.customStatus:type_name -> google.protobuf.StringValue - 8, // 118: OrchestrationState.failureDetails:type_name -> TaskFailureDetails - 71, // 119: OrchestrationState.executionId:type_name -> google.protobuf.StringValue - 72, // 120: OrchestrationState.completedTimestamp:type_name -> google.protobuf.Timestamp - 71, // 121: OrchestrationState.parentInstanceId:type_name -> google.protobuf.StringValue - 70, // 122: OrchestrationState.tags:type_name -> OrchestrationState.TagsEntry - 71, // 123: RaiseEventRequest.input:type_name -> google.protobuf.StringValue - 71, // 124: TerminateRequest.output:type_name -> google.protobuf.StringValue - 71, // 125: SuspendRequest.reason:type_name -> google.protobuf.StringValue - 71, // 126: ResumeRequest.reason:type_name -> google.protobuf.StringValue - 57, // 127: PurgeInstancesRequest.purgeInstanceFilter:type_name -> PurgeInstanceFilter - 72, // 128: PurgeInstanceFilter.createdTimeFrom:type_name -> google.protobuf.Timestamp - 72, // 129: PurgeInstanceFilter.createdTimeTo:type_name -> google.protobuf.Timestamp - 1, // 130: PurgeInstanceFilter.runtimeStatus:type_name -> OrchestrationStatus - 74, // 131: PurgeInstancesResponse.isComplete:type_name -> google.protobuf.BoolValue - 40, // 132: WorkItem.orchestratorRequest:type_name -> OrchestratorRequest - 6, // 133: WorkItem.activityRequest:type_name -> ActivityRequest - 71, // 134: RerunWorkflowFromEventRequest.input:type_name -> google.protobuf.StringValue - 31, // 135: GetInstanceHistoryResponse.events:type_name -> HistoryEvent - 75, // 136: TaskHubSidecarService.Hello:input_type -> google.protobuf.Empty - 42, // 137: TaskHubSidecarService.StartInstance:input_type -> CreateInstanceRequest - 45, // 138: TaskHubSidecarService.GetInstance:input_type -> GetInstanceRequest - 45, // 139: TaskHubSidecarService.WaitForInstanceStart:input_type -> GetInstanceRequest - 45, // 140: TaskHubSidecarService.WaitForInstanceCompletion:input_type -> GetInstanceRequest - 48, // 141: TaskHubSidecarService.RaiseEvent:input_type -> RaiseEventRequest - 50, // 142: TaskHubSidecarService.TerminateInstance:input_type -> TerminateRequest - 52, // 143: TaskHubSidecarService.SuspendInstance:input_type -> SuspendRequest - 54, // 144: TaskHubSidecarService.ResumeInstance:input_type -> ResumeRequest - 56, // 145: TaskHubSidecarService.PurgeInstances:input_type -> PurgeInstancesRequest - 59, // 146: TaskHubSidecarService.GetWorkItems:input_type -> GetWorkItemsRequest - 7, // 147: TaskHubSidecarService.CompleteActivityTask:input_type -> ActivityResponse - 41, // 148: TaskHubSidecarService.CompleteOrchestratorTask:input_type -> OrchestratorResponse - 62, // 149: TaskHubSidecarService.RerunWorkflowFromEvent:input_type -> RerunWorkflowFromEventRequest - 64, // 150: TaskHubSidecarService.ListInstanceIDs:input_type -> ListInstanceIDsRequest - 66, // 151: TaskHubSidecarService.GetInstanceHistory:input_type -> GetInstanceHistoryRequest - 75, // 152: TaskHubSidecarService.Hello:output_type -> google.protobuf.Empty - 44, // 153: TaskHubSidecarService.StartInstance:output_type -> CreateInstanceResponse - 46, // 154: TaskHubSidecarService.GetInstance:output_type -> GetInstanceResponse - 46, // 155: TaskHubSidecarService.WaitForInstanceStart:output_type -> GetInstanceResponse - 46, // 156: TaskHubSidecarService.WaitForInstanceCompletion:output_type -> GetInstanceResponse - 49, // 157: TaskHubSidecarService.RaiseEvent:output_type -> RaiseEventResponse - 51, // 158: TaskHubSidecarService.TerminateInstance:output_type -> TerminateResponse - 53, // 159: TaskHubSidecarService.SuspendInstance:output_type -> SuspendResponse - 55, // 160: TaskHubSidecarService.ResumeInstance:output_type -> ResumeResponse - 58, // 161: TaskHubSidecarService.PurgeInstances:output_type -> PurgeInstancesResponse - 60, // 162: TaskHubSidecarService.GetWorkItems:output_type -> WorkItem - 61, // 163: TaskHubSidecarService.CompleteActivityTask:output_type -> CompleteTaskResponse - 61, // 164: TaskHubSidecarService.CompleteOrchestratorTask:output_type -> CompleteTaskResponse - 63, // 165: TaskHubSidecarService.RerunWorkflowFromEvent:output_type -> RerunWorkflowFromEventResponse - 65, // 166: TaskHubSidecarService.ListInstanceIDs:output_type -> ListInstanceIDsResponse - 67, // 167: TaskHubSidecarService.GetInstanceHistory:output_type -> GetInstanceHistoryResponse - 152, // [152:168] is the sub-list for method output_type - 136, // [136:152] is the sub-list for method input_type - 136, // [136:136] is the sub-list for extension type_name - 136, // [136:136] is the sub-list for extension extendee - 0, // [0:136] is the sub-list for field type_name -} - -func init() { file_orchestrator_service_proto_init() } -func file_orchestrator_service_proto_init() { - if File_orchestrator_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_orchestrator_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskRouter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestrationVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestrationInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivityResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskFailureDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParentInstanceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RerunParentInstanceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TraceContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionStartedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionCompletedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionTerminatedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskScheduledEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskCompletedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskFailedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubOrchestrationInstanceCreatedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubOrchestrationInstanceCompletedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubOrchestrationInstanceFailedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimerCreatedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimerFiredEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestratorStartedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestratorCompletedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventSentEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventRaisedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContinueAsNewEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionSuspendedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionResumedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionStalledEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HistoryEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScheduleTaskAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSubOrchestrationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTimerAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendEventAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompleteOrchestrationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } +} + +func (x *GetInstanceHistoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInstanceHistoryRequest) ProtoMessage() {} + +func (x *GetInstanceHistoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_orchestrator_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TerminateOrchestrationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInstanceHistoryRequest.ProtoReflect.Descriptor instead. +func (*GetInstanceHistoryRequest) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{26} +} + +func (x *GetInstanceHistoryRequest) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +// GetInstanceHistoryResponse is the response to executing GetInstanceHistory. +type GetInstanceHistoryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Events []*HistoryEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` +} + +func (x *GetInstanceHistoryResponse) Reset() { + *x = GetInstanceHistoryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_orchestrator_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInstanceHistoryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInstanceHistoryResponse) ProtoMessage() {} + +func (x *GetInstanceHistoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_orchestrator_service_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_orchestrator_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestratorVersionNotAvailableAction); i { + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInstanceHistoryResponse.ProtoReflect.Descriptor instead. +func (*GetInstanceHistoryResponse) Descriptor() ([]byte, []int) { + return file_orchestrator_service_proto_rawDescGZIP(), []int{27} +} + +func (x *GetInstanceHistoryResponse) GetEvents() []*HistoryEvent { + if x != nil { + return x.Events + } + return nil +} + +var File_orchestrator_service_proto protoreflect.FileDescriptor + +var file_orchestrator_service_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x6f, 0x72, + 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x14, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xd1, 0x02, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3d, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x12, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x74, + 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x10, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, + 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, + 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, + 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0xc4, 0x02, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x3a, 0x0a, 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x0a, 0x06, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd3, 0x02, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x07, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x4b, 0x0a, 0x12, 0x6e, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6e, 0x75, 0x6d, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x12, + 0x2f, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x9d, 0x04, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x54, 0x0a, 0x17, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x17, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x0b, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x04, + 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x12, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, + 0x52, 0x1a, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x38, 0x0a, 0x16, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x66, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, + 0x67, 0x65, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x41, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x67, 0x65, 0x74, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x73, 0x41, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0x63, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x34, 0x0a, + 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x22, 0x7b, 0x0a, 0x11, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x22, 0x14, 0x0a, 0x12, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x86, 0x01, 0x0a, 0x10, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x22, + 0x13, 0x0a, 0x11, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x0e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x11, 0x0a, 0x0f, + 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x65, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x15, 0x50, 0x75, 0x72, + 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x13, 0x70, 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x13, 0x70, 0x75, 0x72, 0x67, 0x65, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, + 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x19, 0x0a, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x05, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0xd9, 0x01, 0x0a, + 0x13, 0x50, 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x40, 0x0a, 0x0d, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x12, 0x3a, 0x0a, 0x0d, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x16, 0x50, 0x75, 0x72, + 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, + 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x22, 0x2d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, + 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x0a, + 0x10, 0x0b, 0x22, 0xcd, 0x01, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, + 0x3c, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, + 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, + 0x10, 0x06, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe2, 0x02, 0x0a, 0x1d, 0x52, + 0x65, 0x72, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x46, 0x72, 0x6f, 0x6d, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x49, 0x44, 0x12, 0x29, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x77, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, + 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x43, 0x0a, 0x1a, 0x6e, 0x65, 0x77, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x1a, 0x6e, 0x65, 0x77, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x88, 0x01, 0x01, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, + 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x6e, 0x65, 0x77, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x22, + 0x46, 0x0a, 0x1e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x22, 0x8f, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x31, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x17, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x31, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x3b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, + 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x43, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2a, 0x5e, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x1d, 0x57, 0x4f, 0x52, 0x4b, 0x45, 0x52, + 0x5f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x27, 0x0a, 0x23, 0x57, 0x4f, 0x52, + 0x4b, 0x45, 0x52, 0x5f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x48, + 0x49, 0x53, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x49, 0x4e, 0x47, + 0x10, 0x01, 0x32, 0xe8, 0x08, 0x0a, 0x15, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x75, 0x62, 0x53, 0x69, + 0x64, 0x65, 0x63, 0x61, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x05, + 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x41, 0x0a, 0x14, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, + 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x19, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0a, + 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x52, 0x61, 0x69, + 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, + 0x2e, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x11, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x34, 0x0a, 0x0f, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x0f, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x50, 0x75, 0x72, 0x67, + 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x50, 0x75, 0x72, + 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0c, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x2e, 0x47, 0x65, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x09, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x30, 0x01, 0x12, 0x40, + 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x15, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x49, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x15, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x40, 0x0a, 0x14, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, + 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x15, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, + 0x16, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x46, 0x72, + 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x52, 0x65, 0x72, 0x75, 0x6e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x73, 0x12, 0x17, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x56, 0x0a, + 0x2b, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5a, 0x0b, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xaa, 0x02, 0x19, 0x44, 0x61, 0x70, 0x72, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_orchestrator_service_proto_rawDescOnce sync.Once + file_orchestrator_service_proto_rawDescData = file_orchestrator_service_proto_rawDesc +) + +func file_orchestrator_service_proto_rawDescGZIP() []byte { + file_orchestrator_service_proto_rawDescOnce.Do(func() { + file_orchestrator_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_orchestrator_service_proto_rawDescData) + }) + return file_orchestrator_service_proto_rawDescData +} + +var file_orchestrator_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_orchestrator_service_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_orchestrator_service_proto_goTypes = []interface{}{ + (WorkerCapability)(0), // 0: WorkerCapability + (*ActivityRequest)(nil), // 1: ActivityRequest + (*ActivityResponse)(nil), // 2: ActivityResponse + (*WorkflowRequest)(nil), // 3: WorkflowRequest + (*WorkflowResponse)(nil), // 4: WorkflowResponse + (*CreateInstanceRequest)(nil), // 5: CreateInstanceRequest + (*CreateInstanceResponse)(nil), // 6: CreateInstanceResponse + (*GetInstanceRequest)(nil), // 7: GetInstanceRequest + (*GetInstanceResponse)(nil), // 8: GetInstanceResponse + (*RaiseEventRequest)(nil), // 9: RaiseEventRequest + (*RaiseEventResponse)(nil), // 10: RaiseEventResponse + (*TerminateRequest)(nil), // 11: TerminateRequest + (*TerminateResponse)(nil), // 12: TerminateResponse + (*SuspendRequest)(nil), // 13: SuspendRequest + (*SuspendResponse)(nil), // 14: SuspendResponse + (*ResumeRequest)(nil), // 15: ResumeRequest + (*ResumeResponse)(nil), // 16: ResumeResponse + (*PurgeInstancesRequest)(nil), // 17: PurgeInstancesRequest + (*PurgeInstanceFilter)(nil), // 18: PurgeInstanceFilter + (*PurgeInstancesResponse)(nil), // 19: PurgeInstancesResponse + (*GetWorkItemsRequest)(nil), // 20: GetWorkItemsRequest + (*WorkItem)(nil), // 21: WorkItem + (*CompleteTaskResponse)(nil), // 22: CompleteTaskResponse + (*RerunWorkflowFromEventRequest)(nil), // 23: RerunWorkflowFromEventRequest + (*RerunWorkflowFromEventResponse)(nil), // 24: RerunWorkflowFromEventResponse + (*ListInstanceIDsRequest)(nil), // 25: ListInstanceIDsRequest + (*ListInstanceIDsResponse)(nil), // 26: ListInstanceIDsResponse + (*GetInstanceHistoryRequest)(nil), // 27: GetInstanceHistoryRequest + (*GetInstanceHistoryResponse)(nil), // 28: GetInstanceHistoryResponse + nil, // 29: CreateInstanceRequest.TagsEntry + (*wrapperspb.StringValue)(nil), // 30: google.protobuf.StringValue + (*WorkflowInstance)(nil), // 31: WorkflowInstance + (*TraceContext)(nil), // 32: TraceContext + (*TaskFailureDetails)(nil), // 33: TaskFailureDetails + (*HistoryEvent)(nil), // 34: HistoryEvent + (*TaskRouter)(nil), // 35: TaskRouter + (*WorkflowAction)(nil), // 36: WorkflowAction + (*wrapperspb.Int32Value)(nil), // 37: google.protobuf.Int32Value + (*WorkflowVersion)(nil), // 38: WorkflowVersion + (*timestamppb.Timestamp)(nil), // 39: google.protobuf.Timestamp + (*WorkflowState)(nil), // 40: WorkflowState + (OrchestrationStatus)(0), // 41: OrchestrationStatus + (*wrapperspb.BoolValue)(nil), // 42: google.protobuf.BoolValue + (*emptypb.Empty)(nil), // 43: google.protobuf.Empty +} +var file_orchestrator_service_proto_depIdxs = []int32{ + 30, // 0: ActivityRequest.version:type_name -> google.protobuf.StringValue + 30, // 1: ActivityRequest.input:type_name -> google.protobuf.StringValue + 31, // 2: ActivityRequest.workflowInstance:type_name -> WorkflowInstance + 32, // 3: ActivityRequest.parentTraceContext:type_name -> TraceContext + 30, // 4: ActivityResponse.result:type_name -> google.protobuf.StringValue + 33, // 5: ActivityResponse.failureDetails:type_name -> TaskFailureDetails + 30, // 6: WorkflowRequest.executionId:type_name -> google.protobuf.StringValue + 34, // 7: WorkflowRequest.pastEvents:type_name -> HistoryEvent + 34, // 8: WorkflowRequest.newEvents:type_name -> HistoryEvent + 35, // 9: WorkflowRequest.router:type_name -> TaskRouter + 36, // 10: WorkflowResponse.actions:type_name -> WorkflowAction + 30, // 11: WorkflowResponse.customStatus:type_name -> google.protobuf.StringValue + 37, // 12: WorkflowResponse.numEventsProcessed:type_name -> google.protobuf.Int32Value + 38, // 13: WorkflowResponse.version:type_name -> WorkflowVersion + 30, // 14: CreateInstanceRequest.version:type_name -> google.protobuf.StringValue + 30, // 15: CreateInstanceRequest.input:type_name -> google.protobuf.StringValue + 39, // 16: CreateInstanceRequest.scheduledStartTimestamp:type_name -> google.protobuf.Timestamp + 30, // 17: CreateInstanceRequest.executionId:type_name -> google.protobuf.StringValue + 29, // 18: CreateInstanceRequest.tags:type_name -> CreateInstanceRequest.TagsEntry + 32, // 19: CreateInstanceRequest.parentTraceContext:type_name -> TraceContext + 40, // 20: GetInstanceResponse.workflowState:type_name -> WorkflowState + 30, // 21: RaiseEventRequest.input:type_name -> google.protobuf.StringValue + 30, // 22: TerminateRequest.output:type_name -> google.protobuf.StringValue + 30, // 23: SuspendRequest.reason:type_name -> google.protobuf.StringValue + 30, // 24: ResumeRequest.reason:type_name -> google.protobuf.StringValue + 18, // 25: PurgeInstancesRequest.purgeInstanceFilter:type_name -> PurgeInstanceFilter + 39, // 26: PurgeInstanceFilter.createdTimeFrom:type_name -> google.protobuf.Timestamp + 39, // 27: PurgeInstanceFilter.createdTimeTo:type_name -> google.protobuf.Timestamp + 41, // 28: PurgeInstanceFilter.runtimeStatus:type_name -> OrchestrationStatus + 42, // 29: PurgeInstancesResponse.isComplete:type_name -> google.protobuf.BoolValue + 3, // 30: WorkItem.workflowRequest:type_name -> WorkflowRequest + 1, // 31: WorkItem.activityRequest:type_name -> ActivityRequest + 30, // 32: RerunWorkflowFromEventRequest.input:type_name -> google.protobuf.StringValue + 34, // 33: GetInstanceHistoryResponse.events:type_name -> HistoryEvent + 43, // 34: TaskHubSidecarService.Hello:input_type -> google.protobuf.Empty + 5, // 35: TaskHubSidecarService.StartInstance:input_type -> CreateInstanceRequest + 7, // 36: TaskHubSidecarService.GetInstance:input_type -> GetInstanceRequest + 7, // 37: TaskHubSidecarService.WaitForInstanceStart:input_type -> GetInstanceRequest + 7, // 38: TaskHubSidecarService.WaitForInstanceCompletion:input_type -> GetInstanceRequest + 9, // 39: TaskHubSidecarService.RaiseEvent:input_type -> RaiseEventRequest + 11, // 40: TaskHubSidecarService.TerminateInstance:input_type -> TerminateRequest + 13, // 41: TaskHubSidecarService.SuspendInstance:input_type -> SuspendRequest + 15, // 42: TaskHubSidecarService.ResumeInstance:input_type -> ResumeRequest + 17, // 43: TaskHubSidecarService.PurgeInstances:input_type -> PurgeInstancesRequest + 20, // 44: TaskHubSidecarService.GetWorkItems:input_type -> GetWorkItemsRequest + 2, // 45: TaskHubSidecarService.CompleteActivityTask:input_type -> ActivityResponse + 4, // 46: TaskHubSidecarService.CompleteOrchestratorTask:input_type -> WorkflowResponse + 4, // 47: TaskHubSidecarService.CompleteWorkflowTask:input_type -> WorkflowResponse + 23, // 48: TaskHubSidecarService.RerunWorkflowFromEvent:input_type -> RerunWorkflowFromEventRequest + 25, // 49: TaskHubSidecarService.ListInstanceIDs:input_type -> ListInstanceIDsRequest + 27, // 50: TaskHubSidecarService.GetInstanceHistory:input_type -> GetInstanceHistoryRequest + 43, // 51: TaskHubSidecarService.Hello:output_type -> google.protobuf.Empty + 6, // 52: TaskHubSidecarService.StartInstance:output_type -> CreateInstanceResponse + 8, // 53: TaskHubSidecarService.GetInstance:output_type -> GetInstanceResponse + 8, // 54: TaskHubSidecarService.WaitForInstanceStart:output_type -> GetInstanceResponse + 8, // 55: TaskHubSidecarService.WaitForInstanceCompletion:output_type -> GetInstanceResponse + 10, // 56: TaskHubSidecarService.RaiseEvent:output_type -> RaiseEventResponse + 12, // 57: TaskHubSidecarService.TerminateInstance:output_type -> TerminateResponse + 14, // 58: TaskHubSidecarService.SuspendInstance:output_type -> SuspendResponse + 16, // 59: TaskHubSidecarService.ResumeInstance:output_type -> ResumeResponse + 19, // 60: TaskHubSidecarService.PurgeInstances:output_type -> PurgeInstancesResponse + 21, // 61: TaskHubSidecarService.GetWorkItems:output_type -> WorkItem + 22, // 62: TaskHubSidecarService.CompleteActivityTask:output_type -> CompleteTaskResponse + 22, // 63: TaskHubSidecarService.CompleteOrchestratorTask:output_type -> CompleteTaskResponse + 22, // 64: TaskHubSidecarService.CompleteWorkflowTask:output_type -> CompleteTaskResponse + 24, // 65: TaskHubSidecarService.RerunWorkflowFromEvent:output_type -> RerunWorkflowFromEventResponse + 26, // 66: TaskHubSidecarService.ListInstanceIDs:output_type -> ListInstanceIDsResponse + 28, // 67: TaskHubSidecarService.GetInstanceHistory:output_type -> GetInstanceHistoryResponse + 51, // [51:68] is the sub-list for method output_type + 34, // [34:51] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name +} + +func init() { file_orchestrator_service_proto_init() } +func file_orchestrator_service_proto_init() { + if File_orchestrator_service_proto != nil { + return + } + file_orchestration_proto_init() + file_history_events_proto_init() + file_orchestrator_actions_proto_init() + if !protoimpl.UnsafeEnabled { + file_orchestrator_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActivityRequest); i { case 0: return &v.state case 1: @@ -6411,8 +2357,8 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestratorAction); i { + file_orchestrator_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActivityResponse); i { case 0: return &v.state case 1: @@ -6423,8 +2369,8 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestratorRequest); i { + file_orchestrator_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowRequest); i { case 0: return &v.state case 1: @@ -6435,8 +2381,8 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestratorResponse); i { + file_orchestrator_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowResponse); i { case 0: return &v.state case 1: @@ -6447,7 +2393,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateInstanceRequest); i { case 0: return &v.state @@ -6459,19 +2405,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestrationIdReusePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateInstanceResponse); i { case 0: return &v.state @@ -6483,7 +2417,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetInstanceRequest); i { case 0: return &v.state @@ -6495,7 +2429,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetInstanceResponse); i { case 0: return &v.state @@ -6507,19 +2441,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestrationState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_orchestrator_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RaiseEventRequest); i { case 0: return &v.state @@ -6531,7 +2453,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RaiseEventResponse); i { case 0: return &v.state @@ -6543,7 +2465,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TerminateRequest); i { case 0: return &v.state @@ -6555,7 +2477,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TerminateResponse); i { case 0: return &v.state @@ -6567,7 +2489,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SuspendRequest); i { case 0: return &v.state @@ -6579,7 +2501,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SuspendResponse); i { case 0: return &v.state @@ -6591,7 +2513,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResumeRequest); i { case 0: return &v.state @@ -6603,7 +2525,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResumeResponse); i { case 0: return &v.state @@ -6615,7 +2537,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PurgeInstancesRequest); i { case 0: return &v.state @@ -6627,7 +2549,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PurgeInstanceFilter); i { case 0: return &v.state @@ -6639,7 +2561,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PurgeInstancesResponse); i { case 0: return &v.state @@ -6651,7 +2573,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetWorkItemsRequest); i { case 0: return &v.state @@ -6663,7 +2585,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WorkItem); i { case 0: return &v.state @@ -6675,7 +2597,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompleteTaskResponse); i { case 0: return &v.state @@ -6687,7 +2609,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RerunWorkflowFromEventRequest); i { case 0: return &v.state @@ -6699,7 +2621,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RerunWorkflowFromEventResponse); i { case 0: return &v.state @@ -6711,7 +2633,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListInstanceIDsRequest); i { case 0: return &v.state @@ -6723,7 +2645,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListInstanceIDsResponse); i { case 0: return &v.state @@ -6735,7 +2657,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetInstanceHistoryRequest); i { case 0: return &v.state @@ -6747,7 +2669,7 @@ func file_orchestrator_service_proto_init() { return nil } } - file_orchestrator_service_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + file_orchestrator_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetInstanceHistoryResponse); i { case 0: return &v.state @@ -6760,67 +2682,26 @@ func file_orchestrator_service_proto_init() { } } } - file_orchestrator_service_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[12].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[15].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[18].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[20].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[27].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[28].OneofWrappers = []interface{}{ - (*HistoryEvent_ExecutionStarted)(nil), - (*HistoryEvent_ExecutionCompleted)(nil), - (*HistoryEvent_ExecutionTerminated)(nil), - (*HistoryEvent_TaskScheduled)(nil), - (*HistoryEvent_TaskCompleted)(nil), - (*HistoryEvent_TaskFailed)(nil), - (*HistoryEvent_SubOrchestrationInstanceCreated)(nil), - (*HistoryEvent_SubOrchestrationInstanceCompleted)(nil), - (*HistoryEvent_SubOrchestrationInstanceFailed)(nil), - (*HistoryEvent_TimerCreated)(nil), - (*HistoryEvent_TimerFired)(nil), - (*HistoryEvent_OrchestratorStarted)(nil), - (*HistoryEvent_OrchestratorCompleted)(nil), - (*HistoryEvent_EventSent)(nil), - (*HistoryEvent_EventRaised)(nil), - (*HistoryEvent_ContinueAsNew)(nil), - (*HistoryEvent_ExecutionSuspended)(nil), - (*HistoryEvent_ExecutionResumed)(nil), - (*HistoryEvent_ExecutionStalled)(nil), - } - file_orchestrator_service_proto_msgTypes[29].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[30].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[31].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[36].OneofWrappers = []interface{}{ - (*OrchestratorAction_ScheduleTask)(nil), - (*OrchestratorAction_CreateSubOrchestration)(nil), - (*OrchestratorAction_CreateTimer)(nil), - (*OrchestratorAction_SendEvent)(nil), - (*OrchestratorAction_CompleteOrchestration)(nil), - (*OrchestratorAction_TerminateOrchestration)(nil), - (*OrchestratorAction_OrchestratorVersionNotAvailable)(nil), - } - file_orchestrator_service_proto_msgTypes[37].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[38].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[53].OneofWrappers = []interface{}{ + file_orchestrator_service_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_orchestrator_service_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_orchestrator_service_proto_msgTypes[16].OneofWrappers = []interface{}{ (*PurgeInstancesRequest_InstanceId)(nil), (*PurgeInstancesRequest_PurgeInstanceFilter)(nil), } - file_orchestrator_service_proto_msgTypes[57].OneofWrappers = []interface{}{ - (*WorkItem_OrchestratorRequest)(nil), + file_orchestrator_service_proto_msgTypes[20].OneofWrappers = []interface{}{ + (*WorkItem_WorkflowRequest)(nil), (*WorkItem_ActivityRequest)(nil), } - file_orchestrator_service_proto_msgTypes[59].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[61].OneofWrappers = []interface{}{} - file_orchestrator_service_proto_msgTypes[62].OneofWrappers = []interface{}{} + file_orchestrator_service_proto_msgTypes[22].OneofWrappers = []interface{}{} + file_orchestrator_service_proto_msgTypes[24].OneofWrappers = []interface{}{} + file_orchestrator_service_proto_msgTypes[25].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_orchestrator_service_proto_rawDesc, - NumEnums: 3, - NumMessages: 68, + NumEnums: 1, + NumMessages: 29, NumExtensions: 0, NumServices: 1, }, diff --git a/api/protos/orchestrator_service_grpc.pb.go b/api/protos/orchestrator_service_grpc.pb.go index a1f2057e..880ab23f 100644 --- a/api/protos/orchestrator_service_grpc.pb.go +++ b/api/protos/orchestrator_service_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v6.32.1 +// - protoc v4.25.4 // source: orchestrator_service.proto package protos @@ -36,6 +36,7 @@ const ( TaskHubSidecarService_GetWorkItems_FullMethodName = "/TaskHubSidecarService/GetWorkItems" TaskHubSidecarService_CompleteActivityTask_FullMethodName = "/TaskHubSidecarService/CompleteActivityTask" TaskHubSidecarService_CompleteOrchestratorTask_FullMethodName = "/TaskHubSidecarService/CompleteOrchestratorTask" + TaskHubSidecarService_CompleteWorkflowTask_FullMethodName = "/TaskHubSidecarService/CompleteWorkflowTask" TaskHubSidecarService_RerunWorkflowFromEvent_FullMethodName = "/TaskHubSidecarService/RerunWorkflowFromEvent" TaskHubSidecarService_ListInstanceIDs_FullMethodName = "/TaskHubSidecarService/ListInstanceIDs" TaskHubSidecarService_GetInstanceHistory_FullMethodName = "/TaskHubSidecarService/GetInstanceHistory" @@ -47,26 +48,30 @@ const ( type TaskHubSidecarServiceClient interface { // Sends a hello request to the sidecar service. Hello(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Starts a new orchestration instance. + // Starts a new workflow instance. StartInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*CreateInstanceResponse, error) - // Gets the status of an existing orchestration instance. + // Gets the status of an existing workflow instance. GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*GetInstanceResponse, error) - // Waits for an orchestration instance to reach a running or completion state. + // Waits for a workflow instance to reach a running or completion state. WaitForInstanceStart(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*GetInstanceResponse, error) - // Waits for an orchestration instance to reach a completion state (completed, failed, terminated, etc.). + // Waits for a workflow instance to reach a completion state (completed, failed, terminated, etc.). WaitForInstanceCompletion(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*GetInstanceResponse, error) - // Raises an event to a running orchestration instance. + // Raises an event to a running workflow instance. RaiseEvent(ctx context.Context, in *RaiseEventRequest, opts ...grpc.CallOption) (*RaiseEventResponse, error) - // Terminates a running orchestration instance. + // Terminates a running workflow instance. TerminateInstance(ctx context.Context, in *TerminateRequest, opts ...grpc.CallOption) (*TerminateResponse, error) - // Suspends a running orchestration instance. + // Suspends a running workflow instance. SuspendInstance(ctx context.Context, in *SuspendRequest, opts ...grpc.CallOption) (*SuspendResponse, error) - // Resumes a suspended orchestration instance. + // Resumes a suspended workflow instance. ResumeInstance(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*ResumeResponse, error) PurgeInstances(ctx context.Context, in *PurgeInstancesRequest, opts ...grpc.CallOption) (*PurgeInstancesResponse, error) GetWorkItems(ctx context.Context, in *GetWorkItemsRequest, opts ...grpc.CallOption) (TaskHubSidecarService_GetWorkItemsClient, error) CompleteActivityTask(ctx context.Context, in *ActivityResponse, opts ...grpc.CallOption) (*CompleteTaskResponse, error) - CompleteOrchestratorTask(ctx context.Context, in *OrchestratorResponse, opts ...grpc.CallOption) (*CompleteTaskResponse, error) + // Deprecated: Do not use. + // Deprecated: Use CompleteWorkflowTask instead. + CompleteOrchestratorTask(ctx context.Context, in *WorkflowResponse, opts ...grpc.CallOption) (*CompleteTaskResponse, error) + // Completes a workflow work item. + CompleteWorkflowTask(ctx context.Context, in *WorkflowResponse, opts ...grpc.CallOption) (*CompleteTaskResponse, error) // Rerun a Workflow from a specific event ID of a workflow instance. RerunWorkflowFromEvent(ctx context.Context, in *RerunWorkflowFromEventRequest, opts ...grpc.CallOption) (*RerunWorkflowFromEventResponse, error) ListInstanceIDs(ctx context.Context, in *ListInstanceIDsRequest, opts ...grpc.CallOption) (*ListInstanceIDsResponse, error) @@ -212,7 +217,8 @@ func (c *taskHubSidecarServiceClient) CompleteActivityTask(ctx context.Context, return out, nil } -func (c *taskHubSidecarServiceClient) CompleteOrchestratorTask(ctx context.Context, in *OrchestratorResponse, opts ...grpc.CallOption) (*CompleteTaskResponse, error) { +// Deprecated: Do not use. +func (c *taskHubSidecarServiceClient) CompleteOrchestratorTask(ctx context.Context, in *WorkflowResponse, opts ...grpc.CallOption) (*CompleteTaskResponse, error) { out := new(CompleteTaskResponse) err := c.cc.Invoke(ctx, TaskHubSidecarService_CompleteOrchestratorTask_FullMethodName, in, out, opts...) if err != nil { @@ -221,6 +227,15 @@ func (c *taskHubSidecarServiceClient) CompleteOrchestratorTask(ctx context.Conte return out, nil } +func (c *taskHubSidecarServiceClient) CompleteWorkflowTask(ctx context.Context, in *WorkflowResponse, opts ...grpc.CallOption) (*CompleteTaskResponse, error) { + out := new(CompleteTaskResponse) + err := c.cc.Invoke(ctx, TaskHubSidecarService_CompleteWorkflowTask_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *taskHubSidecarServiceClient) RerunWorkflowFromEvent(ctx context.Context, in *RerunWorkflowFromEventRequest, opts ...grpc.CallOption) (*RerunWorkflowFromEventResponse, error) { out := new(RerunWorkflowFromEventResponse) err := c.cc.Invoke(ctx, TaskHubSidecarService_RerunWorkflowFromEvent_FullMethodName, in, out, opts...) @@ -254,26 +269,30 @@ func (c *taskHubSidecarServiceClient) GetInstanceHistory(ctx context.Context, in type TaskHubSidecarServiceServer interface { // Sends a hello request to the sidecar service. Hello(context.Context, *emptypb.Empty) (*emptypb.Empty, error) - // Starts a new orchestration instance. + // Starts a new workflow instance. StartInstance(context.Context, *CreateInstanceRequest) (*CreateInstanceResponse, error) - // Gets the status of an existing orchestration instance. + // Gets the status of an existing workflow instance. GetInstance(context.Context, *GetInstanceRequest) (*GetInstanceResponse, error) - // Waits for an orchestration instance to reach a running or completion state. + // Waits for a workflow instance to reach a running or completion state. WaitForInstanceStart(context.Context, *GetInstanceRequest) (*GetInstanceResponse, error) - // Waits for an orchestration instance to reach a completion state (completed, failed, terminated, etc.). + // Waits for a workflow instance to reach a completion state (completed, failed, terminated, etc.). WaitForInstanceCompletion(context.Context, *GetInstanceRequest) (*GetInstanceResponse, error) - // Raises an event to a running orchestration instance. + // Raises an event to a running workflow instance. RaiseEvent(context.Context, *RaiseEventRequest) (*RaiseEventResponse, error) - // Terminates a running orchestration instance. + // Terminates a running workflow instance. TerminateInstance(context.Context, *TerminateRequest) (*TerminateResponse, error) - // Suspends a running orchestration instance. + // Suspends a running workflow instance. SuspendInstance(context.Context, *SuspendRequest) (*SuspendResponse, error) - // Resumes a suspended orchestration instance. + // Resumes a suspended workflow instance. ResumeInstance(context.Context, *ResumeRequest) (*ResumeResponse, error) PurgeInstances(context.Context, *PurgeInstancesRequest) (*PurgeInstancesResponse, error) GetWorkItems(*GetWorkItemsRequest, TaskHubSidecarService_GetWorkItemsServer) error CompleteActivityTask(context.Context, *ActivityResponse) (*CompleteTaskResponse, error) - CompleteOrchestratorTask(context.Context, *OrchestratorResponse) (*CompleteTaskResponse, error) + // Deprecated: Do not use. + // Deprecated: Use CompleteWorkflowTask instead. + CompleteOrchestratorTask(context.Context, *WorkflowResponse) (*CompleteTaskResponse, error) + // Completes a workflow work item. + CompleteWorkflowTask(context.Context, *WorkflowResponse) (*CompleteTaskResponse, error) // Rerun a Workflow from a specific event ID of a workflow instance. RerunWorkflowFromEvent(context.Context, *RerunWorkflowFromEventRequest) (*RerunWorkflowFromEventResponse, error) ListInstanceIDs(context.Context, *ListInstanceIDsRequest) (*ListInstanceIDsResponse, error) @@ -321,9 +340,12 @@ func (UnimplementedTaskHubSidecarServiceServer) GetWorkItems(*GetWorkItemsReques func (UnimplementedTaskHubSidecarServiceServer) CompleteActivityTask(context.Context, *ActivityResponse) (*CompleteTaskResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CompleteActivityTask not implemented") } -func (UnimplementedTaskHubSidecarServiceServer) CompleteOrchestratorTask(context.Context, *OrchestratorResponse) (*CompleteTaskResponse, error) { +func (UnimplementedTaskHubSidecarServiceServer) CompleteOrchestratorTask(context.Context, *WorkflowResponse) (*CompleteTaskResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CompleteOrchestratorTask not implemented") } +func (UnimplementedTaskHubSidecarServiceServer) CompleteWorkflowTask(context.Context, *WorkflowResponse) (*CompleteTaskResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompleteWorkflowTask not implemented") +} func (UnimplementedTaskHubSidecarServiceServer) RerunWorkflowFromEvent(context.Context, *RerunWorkflowFromEventRequest) (*RerunWorkflowFromEventResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RerunWorkflowFromEvent not implemented") } @@ -566,7 +588,7 @@ func _TaskHubSidecarService_CompleteActivityTask_Handler(srv interface{}, ctx co } func _TaskHubSidecarService_CompleteOrchestratorTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OrchestratorResponse) + in := new(WorkflowResponse) if err := dec(in); err != nil { return nil, err } @@ -578,7 +600,25 @@ func _TaskHubSidecarService_CompleteOrchestratorTask_Handler(srv interface{}, ct FullMethod: TaskHubSidecarService_CompleteOrchestratorTask_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskHubSidecarServiceServer).CompleteOrchestratorTask(ctx, req.(*OrchestratorResponse)) + return srv.(TaskHubSidecarServiceServer).CompleteOrchestratorTask(ctx, req.(*WorkflowResponse)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskHubSidecarService_CompleteWorkflowTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WorkflowResponse) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskHubSidecarServiceServer).CompleteWorkflowTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskHubSidecarService_CompleteWorkflowTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskHubSidecarServiceServer).CompleteWorkflowTask(ctx, req.(*WorkflowResponse)) } return interceptor(ctx, in, info, handler) } @@ -692,6 +732,10 @@ var TaskHubSidecarService_ServiceDesc = grpc.ServiceDesc{ MethodName: "CompleteOrchestratorTask", Handler: _TaskHubSidecarService_CompleteOrchestratorTask_Handler, }, + { + MethodName: "CompleteWorkflowTask", + Handler: _TaskHubSidecarService_CompleteWorkflowTask_Handler, + }, { MethodName: "RerunWorkflowFromEvent", Handler: _TaskHubSidecarService_RerunWorkflowFromEvent_Handler, diff --git a/api/protos/runtime_state.pb.go b/api/protos/runtime_state.pb.go index fa7ebf69..1f6f31ae 100644 --- a/api/protos/runtime_state.pb.go +++ b/api/protos/runtime_state.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v6.32.1 +// protoc v4.25.4 // source: runtime_state.proto package protos @@ -89,31 +89,31 @@ func (x *RuntimeStateStalled) GetDescription() string { return "" } -// OrchestrationRuntimeState holds the current state for an orchestration. -type OrchestrationRuntimeState struct { +// WorkflowRuntimeState holds the current state for a workflow. +type WorkflowRuntimeState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - NewEvents []*HistoryEvent `protobuf:"bytes,2,rep,name=newEvents,proto3" json:"newEvents,omitempty"` - OldEvents []*HistoryEvent `protobuf:"bytes,3,rep,name=oldEvents,proto3" json:"oldEvents,omitempty"` - PendingTasks []*HistoryEvent `protobuf:"bytes,4,rep,name=pendingTasks,proto3" json:"pendingTasks,omitempty"` - PendingTimers []*HistoryEvent `protobuf:"bytes,5,rep,name=pendingTimers,proto3" json:"pendingTimers,omitempty"` - PendingMessages []*OrchestrationRuntimeStateMessage `protobuf:"bytes,6,rep,name=pendingMessages,proto3" json:"pendingMessages,omitempty"` - StartEvent *ExecutionStartedEvent `protobuf:"bytes,7,opt,name=startEvent,proto3" json:"startEvent,omitempty"` - CompletedEvent *ExecutionCompletedEvent `protobuf:"bytes,8,opt,name=completedEvent,proto3" json:"completedEvent,omitempty"` - CreatedTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=createdTime,proto3" json:"createdTime,omitempty"` - LastUpdatedTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=lastUpdatedTime,proto3" json:"lastUpdatedTime,omitempty"` - CompletedTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=completedTime,proto3" json:"completedTime,omitempty"` - ContinuedAsNew bool `protobuf:"varint,12,opt,name=continuedAsNew,proto3" json:"continuedAsNew,omitempty"` - IsSuspended bool `protobuf:"varint,13,opt,name=isSuspended,proto3" json:"isSuspended,omitempty"` - CustomStatus *wrapperspb.StringValue `protobuf:"bytes,14,opt,name=customStatus,proto3" json:"customStatus,omitempty"` - Stalled *RuntimeStateStalled `protobuf:"bytes,15,opt,name=stalled,proto3,oneof" json:"stalled,omitempty"` -} - -func (x *OrchestrationRuntimeState) Reset() { - *x = OrchestrationRuntimeState{} + InstanceId string `protobuf:"bytes,1,opt,name=instanceId,proto3" json:"instanceId,omitempty"` + NewEvents []*HistoryEvent `protobuf:"bytes,2,rep,name=newEvents,proto3" json:"newEvents,omitempty"` + OldEvents []*HistoryEvent `protobuf:"bytes,3,rep,name=oldEvents,proto3" json:"oldEvents,omitempty"` + PendingTasks []*HistoryEvent `protobuf:"bytes,4,rep,name=pendingTasks,proto3" json:"pendingTasks,omitempty"` + PendingTimers []*HistoryEvent `protobuf:"bytes,5,rep,name=pendingTimers,proto3" json:"pendingTimers,omitempty"` + PendingMessages []*WorkflowRuntimeStateMessage `protobuf:"bytes,6,rep,name=pendingMessages,proto3" json:"pendingMessages,omitempty"` + StartEvent *ExecutionStartedEvent `protobuf:"bytes,7,opt,name=startEvent,proto3" json:"startEvent,omitempty"` + CompletedEvent *ExecutionCompletedEvent `protobuf:"bytes,8,opt,name=completedEvent,proto3" json:"completedEvent,omitempty"` + CreatedTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=createdTime,proto3" json:"createdTime,omitempty"` + LastUpdatedTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=lastUpdatedTime,proto3" json:"lastUpdatedTime,omitempty"` + CompletedTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=completedTime,proto3" json:"completedTime,omitempty"` + ContinuedAsNew bool `protobuf:"varint,12,opt,name=continuedAsNew,proto3" json:"continuedAsNew,omitempty"` + IsSuspended bool `protobuf:"varint,13,opt,name=isSuspended,proto3" json:"isSuspended,omitempty"` + CustomStatus *wrapperspb.StringValue `protobuf:"bytes,14,opt,name=customStatus,proto3" json:"customStatus,omitempty"` + Stalled *RuntimeStateStalled `protobuf:"bytes,15,opt,name=stalled,proto3,oneof" json:"stalled,omitempty"` +} + +func (x *WorkflowRuntimeState) Reset() { + *x = WorkflowRuntimeState{} if protoimpl.UnsafeEnabled { mi := &file_runtime_state_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -121,13 +121,13 @@ func (x *OrchestrationRuntimeState) Reset() { } } -func (x *OrchestrationRuntimeState) String() string { +func (x *WorkflowRuntimeState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OrchestrationRuntimeState) ProtoMessage() {} +func (*WorkflowRuntimeState) ProtoMessage() {} -func (x *OrchestrationRuntimeState) ProtoReflect() protoreflect.Message { +func (x *WorkflowRuntimeState) ProtoReflect() protoreflect.Message { mi := &file_runtime_state_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -139,128 +139,128 @@ func (x *OrchestrationRuntimeState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OrchestrationRuntimeState.ProtoReflect.Descriptor instead. -func (*OrchestrationRuntimeState) Descriptor() ([]byte, []int) { +// Deprecated: Use WorkflowRuntimeState.ProtoReflect.Descriptor instead. +func (*WorkflowRuntimeState) Descriptor() ([]byte, []int) { return file_runtime_state_proto_rawDescGZIP(), []int{1} } -func (x *OrchestrationRuntimeState) GetInstanceId() string { +func (x *WorkflowRuntimeState) GetInstanceId() string { if x != nil { return x.InstanceId } return "" } -func (x *OrchestrationRuntimeState) GetNewEvents() []*HistoryEvent { +func (x *WorkflowRuntimeState) GetNewEvents() []*HistoryEvent { if x != nil { return x.NewEvents } return nil } -func (x *OrchestrationRuntimeState) GetOldEvents() []*HistoryEvent { +func (x *WorkflowRuntimeState) GetOldEvents() []*HistoryEvent { if x != nil { return x.OldEvents } return nil } -func (x *OrchestrationRuntimeState) GetPendingTasks() []*HistoryEvent { +func (x *WorkflowRuntimeState) GetPendingTasks() []*HistoryEvent { if x != nil { return x.PendingTasks } return nil } -func (x *OrchestrationRuntimeState) GetPendingTimers() []*HistoryEvent { +func (x *WorkflowRuntimeState) GetPendingTimers() []*HistoryEvent { if x != nil { return x.PendingTimers } return nil } -func (x *OrchestrationRuntimeState) GetPendingMessages() []*OrchestrationRuntimeStateMessage { +func (x *WorkflowRuntimeState) GetPendingMessages() []*WorkflowRuntimeStateMessage { if x != nil { return x.PendingMessages } return nil } -func (x *OrchestrationRuntimeState) GetStartEvent() *ExecutionStartedEvent { +func (x *WorkflowRuntimeState) GetStartEvent() *ExecutionStartedEvent { if x != nil { return x.StartEvent } return nil } -func (x *OrchestrationRuntimeState) GetCompletedEvent() *ExecutionCompletedEvent { +func (x *WorkflowRuntimeState) GetCompletedEvent() *ExecutionCompletedEvent { if x != nil { return x.CompletedEvent } return nil } -func (x *OrchestrationRuntimeState) GetCreatedTime() *timestamppb.Timestamp { +func (x *WorkflowRuntimeState) GetCreatedTime() *timestamppb.Timestamp { if x != nil { return x.CreatedTime } return nil } -func (x *OrchestrationRuntimeState) GetLastUpdatedTime() *timestamppb.Timestamp { +func (x *WorkflowRuntimeState) GetLastUpdatedTime() *timestamppb.Timestamp { if x != nil { return x.LastUpdatedTime } return nil } -func (x *OrchestrationRuntimeState) GetCompletedTime() *timestamppb.Timestamp { +func (x *WorkflowRuntimeState) GetCompletedTime() *timestamppb.Timestamp { if x != nil { return x.CompletedTime } return nil } -func (x *OrchestrationRuntimeState) GetContinuedAsNew() bool { +func (x *WorkflowRuntimeState) GetContinuedAsNew() bool { if x != nil { return x.ContinuedAsNew } return false } -func (x *OrchestrationRuntimeState) GetIsSuspended() bool { +func (x *WorkflowRuntimeState) GetIsSuspended() bool { if x != nil { return x.IsSuspended } return false } -func (x *OrchestrationRuntimeState) GetCustomStatus() *wrapperspb.StringValue { +func (x *WorkflowRuntimeState) GetCustomStatus() *wrapperspb.StringValue { if x != nil { return x.CustomStatus } return nil } -func (x *OrchestrationRuntimeState) GetStalled() *RuntimeStateStalled { +func (x *WorkflowRuntimeState) GetStalled() *RuntimeStateStalled { if x != nil { return x.Stalled } return nil } -// OrchestrationRuntimeStateMessage holds an OrchestratorMessage and the target instance ID. -type OrchestrationRuntimeStateMessage struct { +// WorkflowRuntimeStateMessage holds a HistoryEvent payload and the target instance ID. +type WorkflowRuntimeStateMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields HistoryEvent *HistoryEvent `protobuf:"bytes,1,opt,name=historyEvent,proto3" json:"historyEvent,omitempty"` - TargetInstanceID string `protobuf:"bytes,2,opt,name=TargetInstanceID,proto3" json:"TargetInstanceID,omitempty"` + TargetInstanceId string `protobuf:"bytes,2,opt,name=targetInstanceId,proto3" json:"targetInstanceId,omitempty"` } -func (x *OrchestrationRuntimeStateMessage) Reset() { - *x = OrchestrationRuntimeStateMessage{} +func (x *WorkflowRuntimeStateMessage) Reset() { + *x = WorkflowRuntimeStateMessage{} if protoimpl.UnsafeEnabled { mi := &file_runtime_state_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -268,13 +268,13 @@ func (x *OrchestrationRuntimeStateMessage) Reset() { } } -func (x *OrchestrationRuntimeStateMessage) String() string { +func (x *WorkflowRuntimeStateMessage) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OrchestrationRuntimeStateMessage) ProtoMessage() {} +func (*WorkflowRuntimeStateMessage) ProtoMessage() {} -func (x *OrchestrationRuntimeStateMessage) ProtoReflect() protoreflect.Message { +func (x *WorkflowRuntimeStateMessage) ProtoReflect() protoreflect.Message { mi := &file_runtime_state_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -286,21 +286,21 @@ func (x *OrchestrationRuntimeStateMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OrchestrationRuntimeStateMessage.ProtoReflect.Descriptor instead. -func (*OrchestrationRuntimeStateMessage) Descriptor() ([]byte, []int) { +// Deprecated: Use WorkflowRuntimeStateMessage.ProtoReflect.Descriptor instead. +func (*WorkflowRuntimeStateMessage) Descriptor() ([]byte, []int) { return file_runtime_state_proto_rawDescGZIP(), []int{2} } -func (x *OrchestrationRuntimeStateMessage) GetHistoryEvent() *HistoryEvent { +func (x *WorkflowRuntimeStateMessage) GetHistoryEvent() *HistoryEvent { if x != nil { return x.HistoryEvent } return nil } -func (x *OrchestrationRuntimeStateMessage) GetTargetInstanceID() string { +func (x *WorkflowRuntimeStateMessage) GetTargetInstanceId() string { if x != nil { - return x.TargetInstanceID + return x.TargetInstanceId } return "" } @@ -311,92 +311,91 @@ var file_runtime_state_proto_rawDesc = []byte{ 0x0a, 0x13, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1a, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x74, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x53, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x07, 0x0a, 0x19, 0x4f, 0x72, 0x63, 0x68, - 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x31, 0x0a, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x12, 0x33, 0x0a, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, - 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x12, 0x69, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x3f, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, + 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x13, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x68, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x74, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, + 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x07, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x2b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x09, + 0x6f, 0x6c, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, + 0x6f, 0x6c, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x0c, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x33, 0x0a, 0x0d, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x72, + 0x73, 0x12, 0x64, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x64, 0x75, 0x72, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x40, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x44, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x65, 0x64, 0x41, 0x73, 0x4e, 0x65, 0x77, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x64, 0x41, 0x73, 0x4e, 0x65, 0x77, 0x12, + 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, + 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x07, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x65, 0x64, 0x22, 0x7c, 0x0a, 0x1b, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0a, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0b, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0f, 0x6c, 0x61, - 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x40, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x64, 0x41, - 0x73, 0x4e, 0x65, 0x77, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x65, 0x64, 0x41, 0x73, 0x4e, 0x65, 0x77, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, - 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x69, 0x73, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0c, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x51, - 0x0a, 0x07, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6c, - 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x07, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x88, 0x01, - 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x22, 0x81, 0x01, - 0x0a, 0x20, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x31, 0x0a, 0x0c, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, - 0x44, 0x42, 0x56, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x64, 0x75, 0x72, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x5a, 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xaa, 0x02, 0x19, - 0x44, 0x61, 0x70, 0x72, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x12, 0x31, 0x0a, 0x0c, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, + 0x42, 0x56, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x64, 0x75, 0x72, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5a, + 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xaa, 0x02, 0x19, 0x44, + 0x61, 0x70, 0x72, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x2e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -413,31 +412,31 @@ func file_runtime_state_proto_rawDescGZIP() []byte { var file_runtime_state_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_runtime_state_proto_goTypes = []interface{}{ - (*RuntimeStateStalled)(nil), // 0: durabletask.protos.backend.v1.RuntimeStateStalled - (*OrchestrationRuntimeState)(nil), // 1: durabletask.protos.backend.v1.OrchestrationRuntimeState - (*OrchestrationRuntimeStateMessage)(nil), // 2: durabletask.protos.backend.v1.OrchestrationRuntimeStateMessage - (StalledReason)(0), // 3: StalledReason - (*HistoryEvent)(nil), // 4: HistoryEvent - (*ExecutionStartedEvent)(nil), // 5: ExecutionStartedEvent - (*ExecutionCompletedEvent)(nil), // 6: ExecutionCompletedEvent - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*wrapperspb.StringValue)(nil), // 8: google.protobuf.StringValue + (*RuntimeStateStalled)(nil), // 0: durabletask.protos.backend.v1.RuntimeStateStalled + (*WorkflowRuntimeState)(nil), // 1: durabletask.protos.backend.v1.WorkflowRuntimeState + (*WorkflowRuntimeStateMessage)(nil), // 2: durabletask.protos.backend.v1.WorkflowRuntimeStateMessage + (StalledReason)(0), // 3: StalledReason + (*HistoryEvent)(nil), // 4: HistoryEvent + (*ExecutionStartedEvent)(nil), // 5: ExecutionStartedEvent + (*ExecutionCompletedEvent)(nil), // 6: ExecutionCompletedEvent + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*wrapperspb.StringValue)(nil), // 8: google.protobuf.StringValue } var file_runtime_state_proto_depIdxs = []int32{ 3, // 0: durabletask.protos.backend.v1.RuntimeStateStalled.reason:type_name -> StalledReason - 4, // 1: durabletask.protos.backend.v1.OrchestrationRuntimeState.newEvents:type_name -> HistoryEvent - 4, // 2: durabletask.protos.backend.v1.OrchestrationRuntimeState.oldEvents:type_name -> HistoryEvent - 4, // 3: durabletask.protos.backend.v1.OrchestrationRuntimeState.pendingTasks:type_name -> HistoryEvent - 4, // 4: durabletask.protos.backend.v1.OrchestrationRuntimeState.pendingTimers:type_name -> HistoryEvent - 2, // 5: durabletask.protos.backend.v1.OrchestrationRuntimeState.pendingMessages:type_name -> durabletask.protos.backend.v1.OrchestrationRuntimeStateMessage - 5, // 6: durabletask.protos.backend.v1.OrchestrationRuntimeState.startEvent:type_name -> ExecutionStartedEvent - 6, // 7: durabletask.protos.backend.v1.OrchestrationRuntimeState.completedEvent:type_name -> ExecutionCompletedEvent - 7, // 8: durabletask.protos.backend.v1.OrchestrationRuntimeState.createdTime:type_name -> google.protobuf.Timestamp - 7, // 9: durabletask.protos.backend.v1.OrchestrationRuntimeState.lastUpdatedTime:type_name -> google.protobuf.Timestamp - 7, // 10: durabletask.protos.backend.v1.OrchestrationRuntimeState.completedTime:type_name -> google.protobuf.Timestamp - 8, // 11: durabletask.protos.backend.v1.OrchestrationRuntimeState.customStatus:type_name -> google.protobuf.StringValue - 0, // 12: durabletask.protos.backend.v1.OrchestrationRuntimeState.stalled:type_name -> durabletask.protos.backend.v1.RuntimeStateStalled - 4, // 13: durabletask.protos.backend.v1.OrchestrationRuntimeStateMessage.historyEvent:type_name -> HistoryEvent + 4, // 1: durabletask.protos.backend.v1.WorkflowRuntimeState.newEvents:type_name -> HistoryEvent + 4, // 2: durabletask.protos.backend.v1.WorkflowRuntimeState.oldEvents:type_name -> HistoryEvent + 4, // 3: durabletask.protos.backend.v1.WorkflowRuntimeState.pendingTasks:type_name -> HistoryEvent + 4, // 4: durabletask.protos.backend.v1.WorkflowRuntimeState.pendingTimers:type_name -> HistoryEvent + 2, // 5: durabletask.protos.backend.v1.WorkflowRuntimeState.pendingMessages:type_name -> durabletask.protos.backend.v1.WorkflowRuntimeStateMessage + 5, // 6: durabletask.protos.backend.v1.WorkflowRuntimeState.startEvent:type_name -> ExecutionStartedEvent + 6, // 7: durabletask.protos.backend.v1.WorkflowRuntimeState.completedEvent:type_name -> ExecutionCompletedEvent + 7, // 8: durabletask.protos.backend.v1.WorkflowRuntimeState.createdTime:type_name -> google.protobuf.Timestamp + 7, // 9: durabletask.protos.backend.v1.WorkflowRuntimeState.lastUpdatedTime:type_name -> google.protobuf.Timestamp + 7, // 10: durabletask.protos.backend.v1.WorkflowRuntimeState.completedTime:type_name -> google.protobuf.Timestamp + 8, // 11: durabletask.protos.backend.v1.WorkflowRuntimeState.customStatus:type_name -> google.protobuf.StringValue + 0, // 12: durabletask.protos.backend.v1.WorkflowRuntimeState.stalled:type_name -> durabletask.protos.backend.v1.RuntimeStateStalled + 4, // 13: durabletask.protos.backend.v1.WorkflowRuntimeStateMessage.historyEvent:type_name -> HistoryEvent 14, // [14:14] is the sub-list for method output_type 14, // [14:14] is the sub-list for method input_type 14, // [14:14] is the sub-list for extension type_name @@ -450,7 +449,8 @@ func file_runtime_state_proto_init() { if File_runtime_state_proto != nil { return } - file_orchestrator_service_proto_init() + file_orchestration_proto_init() + file_history_events_proto_init() if !protoimpl.UnsafeEnabled { file_runtime_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RuntimeStateStalled); i { @@ -465,7 +465,7 @@ func file_runtime_state_proto_init() { } } file_runtime_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestrationRuntimeState); i { + switch v := v.(*WorkflowRuntimeState); i { case 0: return &v.state case 1: @@ -477,7 +477,7 @@ func file_runtime_state_proto_init() { } } file_runtime_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestrationRuntimeStateMessage); i { + switch v := v.(*WorkflowRuntimeStateMessage); i { case 0: return &v.state case 1: diff --git a/backend/client.go b/backend/client.go index a57f5a32..73636006 100644 --- a/backend/client.go +++ b/backend/client.go @@ -18,14 +18,14 @@ import ( type TaskHubClient interface { ScheduleNewOrchestration(ctx context.Context, orchestrator interface{}, opts ...api.NewOrchestrationOptions) (api.InstanceID, error) - FetchOrchestrationMetadata(ctx context.Context, id api.InstanceID) (*OrchestrationMetadata, error) - WaitForOrchestrationStart(ctx context.Context, id api.InstanceID) (*OrchestrationMetadata, error) - WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID) (*OrchestrationMetadata, error) + FetchWorkflowMetadata(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) + WaitForOrchestrationStart(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) + WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error RaiseEvent(ctx context.Context, id api.InstanceID, eventName string, opts ...api.RaiseEventOptions) error SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) error ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) error - PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error + PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error RerunWorkflowFromEvent(ctx context.Context, source api.InstanceID, eventID uint32, opts ...api.RerunOptions) (api.InstanceID, error) } @@ -67,7 +67,7 @@ func (c *backendClient) ScheduleNewOrchestration(ctx context.Context, orchestrat ExecutionStarted: &protos.ExecutionStartedEvent{ Name: req.Name, Input: req.Input, - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: req.InstanceId, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -76,7 +76,7 @@ func (c *backendClient) ScheduleNewOrchestration(ctx context.Context, orchestrat }, }, } - if err := c.be.CreateOrchestrationInstance(ctx, e, WithOrchestrationIdReusePolicy(req.OrchestrationIdReusePolicy)); err != nil { + if err := c.be.CreateWorkflowInstance(ctx, e); err != nil { span.RecordError(err) span.SetStatus(codes.Error, err.Error()) return api.EmptyInstanceID, fmt.Errorf("failed to start orchestration: %w", err) @@ -84,38 +84,38 @@ func (c *backendClient) ScheduleNewOrchestration(ctx context.Context, orchestrat return api.InstanceID(req.InstanceId), nil } -// FetchOrchestrationMetadata fetches metadata for the specified orchestration from the configured task hub. +// FetchWorkflowMetadata fetches metadata for the specified orchestration from the configured task hub. // // ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *backendClient) FetchOrchestrationMetadata(ctx context.Context, id api.InstanceID) (*OrchestrationMetadata, error) { - metadata, err := c.be.GetOrchestrationMetadata(ctx, id) +func (c *backendClient) FetchWorkflowMetadata(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { + metadata, err := c.be.GetWorkflowMetadata(ctx, id) if err != nil { return nil, fmt.Errorf("failed to fetch orchestration metadata: %w", err) } return metadata, nil } -// WaitForOrchestrationStart waits for an orchestration to start running and returns an [OrchestrationMetadata] object that contains +// WaitForOrchestrationStart waits for an orchestration to start running and returns an [WorkflowMetadata] object that contains // metadata about the started instance. // // ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *backendClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID) (*OrchestrationMetadata, error) { - return c.waitForOrchestrationCondition(ctx, id, func(metadata *OrchestrationMetadata) bool { +func (c *backendClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { + return c.waitForOrchestrationCondition(ctx, id, func(metadata *WorkflowMetadata) bool { return metadata.RuntimeStatus != protos.OrchestrationStatus_ORCHESTRATION_STATUS_PENDING }) } -// WaitForOrchestrationCompletion waits for an orchestration to complete and returns an [OrchestrationMetadata] object that contains +// WaitForOrchestrationCompletion waits for an orchestration to complete and returns an [WorkflowMetadata] object that contains // metadata about the completed instance. // // ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *backendClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID) (*OrchestrationMetadata, error) { - return c.waitForOrchestrationCondition(ctx, id, api.OrchestrationMetadataIsComplete) +func (c *backendClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { + return c.waitForOrchestrationCondition(ctx, id, api.WorkflowMetadataIsComplete) } -func (c *backendClient) waitForOrchestrationCondition(ctx context.Context, id api.InstanceID, condition func(metadata *OrchestrationMetadata) bool) (*OrchestrationMetadata, error) { - var metadata *protos.OrchestrationMetadata - err := c.be.WatchOrchestrationRuntimeStatus(ctx, id, func(m *OrchestrationMetadata) bool { +func (c *backendClient) waitForOrchestrationCondition(ctx context.Context, id api.InstanceID, condition func(metadata *WorkflowMetadata) bool) (*WorkflowMetadata, error) { + var metadata *protos.WorkflowMetadata + err := c.be.WatchOrchestrationRuntimeStatus(ctx, id, func(m *WorkflowMetadata) bool { metadata = m return condition(m) }) @@ -222,18 +222,18 @@ func (c *backendClient) ResumeOrchestration(ctx context.Context, id api.Instance return nil } -// PurgeOrchestrationState deletes the state of the specified orchestration instance. +// PurgeWorkflowState deletes the state of the specified orchestration instance. // // [api.ErrInstanceNotFound] is returned if the specified orchestration instance doesn't exist. // [api.ErrNotCompleted] is returned if the specified orchestration instance is still running. -func (c *backendClient) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { +func (c *backendClient) PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { req := &protos.PurgeInstancesRequest{Request: &protos.PurgeInstancesRequest_InstanceId{InstanceId: string(id)}, Recursive: true} for _, configure := range opts { if err := configure(req); err != nil { return fmt.Errorf("failed to configure purge request: %w", err) } } - if _, err := purgeOrchestrationState(ctx, c.be, id, req.Recursive, req.GetForce()); err != nil { + if _, err := purgeWorkflowState(ctx, c.be, id, req.Recursive, req.GetForce()); err != nil { return fmt.Errorf("failed to purge orchestration state: %w", err) } return nil diff --git a/client/client_grpc.go b/client/client_grpc.go index c2670f60..52e63309 100644 --- a/client/client_grpc.go +++ b/client/client_grpc.go @@ -61,10 +61,10 @@ func (c *TaskHubGrpcClient) ScheduleNewOrchestration(ctx context.Context, orches return api.InstanceID(resp.InstanceId), nil } -// FetchOrchestrationMetadata fetches metadata for the specified orchestration from the configured task hub. +// FetchWorkflowMetadata fetches metadata for the specified orchestration from the configured task hub. // // api.ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *TaskHubGrpcClient) FetchOrchestrationMetadata(ctx context.Context, id api.InstanceID, opts ...api.FetchOrchestrationMetadataOptions) (*backend.OrchestrationMetadata, error) { +func (c *TaskHubGrpcClient) FetchWorkflowMetadata(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { req := makeGetInstanceRequest(id, opts) resp, err := c.client.GetInstance(ctx, req) if err != nil { @@ -73,14 +73,14 @@ func (c *TaskHubGrpcClient) FetchOrchestrationMetadata(ctx context.Context, id a } return nil, fmt.Errorf("failed to fetch orchestration metadata: %w", err) } - return makeOrchestrationMetadata(resp) + return makeWorkflowMetadata(resp) } -// WaitForOrchestrationStart waits for an orchestration to start running and returns an [backend.OrchestrationMetadata] object that contains +// WaitForOrchestrationStart waits for an orchestration to start running and returns an [backend.WorkflowMetadata] object that contains // metadata about the started instance. // // api.ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *TaskHubGrpcClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID, opts ...api.FetchOrchestrationMetadataOptions) (*backend.OrchestrationMetadata, error) { +func (c *TaskHubGrpcClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { var resp *protos.GetInstanceResponse var err error err = backoff.Retry(func() error { @@ -98,14 +98,14 @@ func (c *TaskHubGrpcClient) WaitForOrchestrationStart(ctx context.Context, id ap if err != nil { return nil, err } - return makeOrchestrationMetadata(resp) + return makeWorkflowMetadata(resp) } -// WaitForOrchestrationCompletion waits for an orchestration to complete and returns an [backend.OrchestrationMetadata] object that contains +// WaitForOrchestrationCompletion waits for an orchestration to complete and returns an [backend.WorkflowMetadata] object that contains // metadata about the completed instance. // // api.ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *TaskHubGrpcClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID, opts ...api.FetchOrchestrationMetadataOptions) (*backend.OrchestrationMetadata, error) { +func (c *TaskHubGrpcClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { var resp *protos.GetInstanceResponse var err error err = backoff.Retry(func() error { @@ -123,7 +123,7 @@ func (c *TaskHubGrpcClient) WaitForOrchestrationCompletion(ctx context.Context, if err != nil { return nil, err } - return makeOrchestrationMetadata(resp) + return makeWorkflowMetadata(resp) } // TerminateOrchestration terminates a running orchestration by causing it to stop receiving new events and @@ -196,10 +196,10 @@ func (c *TaskHubGrpcClient) ResumeOrchestration(ctx context.Context, id api.Inst return nil } -// PurgeOrchestrationState deletes the state of the specified orchestration instance. +// PurgeWorkflowState deletes the state of the specified orchestration instance. // // [api.api.ErrInstanceNotFound] is returned if the specified orchestration instance doesn't exist. -func (c *TaskHubGrpcClient) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { +func (c *TaskHubGrpcClient) PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { req := &protos.PurgeInstancesRequest{ Request: &protos.PurgeInstancesRequest_InstanceId{InstanceId: string(id)}, } @@ -287,7 +287,7 @@ func (c *TaskHubGrpcClient) GetInstanceHistory(ctx context.Context, id api.Insta return resp, nil } -func makeGetInstanceRequest(id api.InstanceID, opts []api.FetchOrchestrationMetadataOptions) *protos.GetInstanceRequest { +func makeGetInstanceRequest(id api.InstanceID, opts []api.FetchWorkflowMetadataOptions) *protos.GetInstanceRequest { req := &protos.GetInstanceRequest{ InstanceId: string(id), GetInputsAndOutputs: true, @@ -298,25 +298,25 @@ func makeGetInstanceRequest(id api.InstanceID, opts []api.FetchOrchestrationMeta return req } -// makeOrchestrationMetadata validates and converts protos.GetInstanceResponse to backend.OrchestrationMetadata +// makeWorkflowMetadata validates and converts protos.GetInstanceResponse to backend.WorkflowMetadata // api.ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func makeOrchestrationMetadata(resp *protos.GetInstanceResponse) (*backend.OrchestrationMetadata, error) { +func makeWorkflowMetadata(resp *protos.GetInstanceResponse) (*backend.WorkflowMetadata, error) { if !resp.Exists { return nil, api.ErrInstanceNotFound } - if resp.OrchestrationState == nil { + if resp.WorkflowState == nil { return nil, fmt.Errorf("orchestration state is nil") } - metadata := &backend.OrchestrationMetadata{ - InstanceId: resp.OrchestrationState.InstanceId, - Name: resp.OrchestrationState.Name, - RuntimeStatus: resp.OrchestrationState.OrchestrationStatus, - Input: resp.OrchestrationState.Input, - CustomStatus: resp.OrchestrationState.CustomStatus, - Output: resp.OrchestrationState.Output, - CreatedAt: resp.OrchestrationState.CreatedTimestamp, - LastUpdatedAt: resp.OrchestrationState.LastUpdatedTimestamp, - FailureDetails: resp.OrchestrationState.FailureDetails, + metadata := &backend.WorkflowMetadata{ + InstanceId: resp.WorkflowState.InstanceId, + Name: resp.WorkflowState.Name, + RuntimeStatus: resp.WorkflowState.WorkflowStatus, + Input: resp.WorkflowState.Input, + CustomStatus: resp.WorkflowState.CustomStatus, + Output: resp.WorkflowState.Output, + CreatedAt: resp.WorkflowState.CreatedTimestamp, + LastUpdatedAt: resp.WorkflowState.LastUpdatedTimestamp, + FailureDetails: resp.WorkflowState.FailureDetails, } return metadata, nil } diff --git a/client/worker_grpc.go b/client/worker_grpc.go index b372f853..c831e3b7 100644 --- a/client/worker_grpc.go +++ b/client/worker_grpc.go @@ -147,7 +147,7 @@ func (c *TaskHubGrpcClient) StartWorkItemListener(ctx context.Context, r *task.T continue } - if orchReq := workItem.GetOrchestratorRequest(); orchReq != nil { + if orchReq := workItem.GetWorkflowRequest(); orchReq != nil { go c.processOrchestrationWorkItem(ctx, executor, orchReq) } else if actReq := workItem.GetActivityRequest(); actReq != nil { go c.processActivityWorkItem(ctx, executor, actReq) @@ -162,20 +162,20 @@ func (c *TaskHubGrpcClient) StartWorkItemListener(ctx context.Context, r *task.T func (c *TaskHubGrpcClient) processOrchestrationWorkItem( ctx context.Context, executor backend.Executor, - workItem *protos.OrchestratorRequest, + workItem *protos.WorkflowRequest, ) { results, err := executor.ExecuteOrchestrator(ctx, api.InstanceID(workItem.InstanceId), workItem.PastEvents, workItem.NewEvents) - resp := protos.OrchestratorResponse{InstanceId: workItem.InstanceId} + resp := protos.WorkflowResponse{InstanceId: workItem.InstanceId} if err != nil { // NOTE: At the time of writing, there's no known case where this error is returned. // We add error handling here anyways, just in case. - resp.Actions = []*protos.OrchestratorAction{ + resp.Actions = []*protos.WorkflowAction{ { Id: -1, - OrchestratorActionType: &protos.OrchestratorAction_CompleteOrchestration{ - CompleteOrchestration: &protos.CompleteOrchestrationAction{ - OrchestrationStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, + WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ + CompleteWorkflow: &protos.CompleteWorkflowAction{ + WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, Result: wrapperspb.String("An internal error occured while executing the orchestration."), FailureDetails: &protos.TaskFailureDetails{ ErrorType: fmt.Sprintf("%T", err), @@ -191,7 +191,7 @@ func (c *TaskHubGrpcClient) processOrchestrationWorkItem( resp.Version = results.GetVersion() } - if _, err = c.client.CompleteOrchestratorTask(ctx, &resp); err != nil { + if _, err = c.client.CompleteWorkflowTask(ctx, &resp); err != nil { if ctx.Err() != nil { c.logger.Warn("failed to complete orchestration task: context canceled") } else { @@ -224,9 +224,9 @@ func (c *TaskHubGrpcClient) processActivityWorkItem( }, }, } - result, err := executor.ExecuteActivity(ctx, api.InstanceID(req.OrchestrationInstance.InstanceId), event) + result, err := executor.ExecuteActivity(ctx, api.InstanceID(req.WorkflowInstance.InstanceId), event) - resp := protos.ActivityResponse{InstanceId: req.OrchestrationInstance.InstanceId, TaskId: req.TaskId} + resp := protos.ActivityResponse{InstanceId: req.WorkflowInstance.InstanceId, TaskId: req.TaskId} if err != nil { // NOTE: At the time of writing, there's no known case where this error is returned. // We add error handling here anyways, just in case. diff --git a/tests/runtimestate_test.go b/tests/runtimestate_test.go index 3927ded3..17851089 100644 --- a/tests/runtimestate_test.go +++ b/tests/runtimestate_test.go @@ -24,13 +24,13 @@ func Test_NewOrchestration(t *testing.T) { Timestamp: timestamppb.New(createdAt), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - OrchestrationInstance: &protos.OrchestrationInstance{InstanceId: iid}, + WorkflowInstance: &protos.WorkflowInstance{InstanceId: iid}, Name: expectedName, }, }, } - s := runtimestate.NewOrchestrationRuntimeState(iid, nil, []*protos.HistoryEvent{e}) + s := runtimestate.NewWorkflowRuntimeState(iid, nil, []*protos.HistoryEvent{e}) assert.Equal(t, api.InstanceID(iid), api.InstanceID(s.InstanceId)) actualName, err := runtimestate.Name(s) @@ -69,7 +69,7 @@ func Test_CompletedOrchestration(t *testing.T) { Timestamp: timestamppb.New(createdAt), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - OrchestrationInstance: &protos.OrchestrationInstance{InstanceId: iid}, + WorkflowInstance: &protos.WorkflowInstance{InstanceId: iid}, Name: expectedName, }, }, @@ -78,12 +78,12 @@ func Test_CompletedOrchestration(t *testing.T) { Timestamp: timestamppb.New(completedAt), EventType: &protos.HistoryEvent_ExecutionCompleted{ ExecutionCompleted: &protos.ExecutionCompletedEvent{ - OrchestrationStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, + WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, }, }, }} - s := runtimestate.NewOrchestrationRuntimeState(iid, nil, events) + s := runtimestate.NewWorkflowRuntimeState(iid, nil, events) assert.Equal(t, api.InstanceID(iid), api.InstanceID(s.InstanceId)) actualName, err := runtimestate.Name(s) @@ -114,33 +114,33 @@ func Test_CompletedSubOrchestration(t *testing.T) { // TODO: Loop through different completion status values status := protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED - s := runtimestate.NewOrchestrationRuntimeState("abc", nil, []*protos.HistoryEvent{ + s := runtimestate.NewWorkflowRuntimeState("abc", nil, []*protos.HistoryEvent{ { EventId: -1, Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "Child", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "child_id", ExecutionId: wrapperspb.String(uuid.New().String()), }, ParentInstance: &protos.ParentInstanceInfo{ TaskScheduledId: expectedTaskID, Name: wrapperspb.String("Parent"), - OrchestrationInstance: &protos.OrchestrationInstance{InstanceId: "parent_id"}, + WorkflowInstance: &protos.WorkflowInstance{InstanceId: "parent_id"}, }, }, }, }, }) - actions := []*protos.OrchestratorAction{ + actions := []*protos.WorkflowAction{ { Id: expectedTaskID, - OrchestratorActionType: &protos.OrchestratorAction_CompleteOrchestration{ - CompleteOrchestration: &protos.CompleteOrchestrationAction{ - OrchestrationStatus: status, + WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ + CompleteWorkflow: &protos.CompleteWorkflowAction{ + WorkflowStatus: status, Result: wrapperspb.String(expectedOutput), CarryoverEvents: []*protos.HistoryEvent{}, }, @@ -156,7 +156,7 @@ func Test_CompletedSubOrchestration(t *testing.T) { assert.NotNil(t, e.Timestamp) if ec := e.GetExecutionCompleted(); assert.NotNil(t, ec) { assert.Equal(t, expectedTaskID, e.EventId) - assert.Equal(t, status, ec.OrchestrationStatus) + assert.Equal(t, status, ec.WorkflowStatus) assert.Equal(t, expectedOutput, ec.Result.GetValue()) assert.Nil(t, ec.FailureDetails) } @@ -164,7 +164,7 @@ func Test_CompletedSubOrchestration(t *testing.T) { if assert.Len(t, s.PendingMessages, 1) { e := s.PendingMessages[0] assert.NotNil(t, e.HistoryEvent.Timestamp) - if soc := e.HistoryEvent.GetSubOrchestrationInstanceCompleted(); assert.NotNil(t, soc) { + if soc := e.HistoryEvent.GetChildWorkflowInstanceCompleted(); assert.NotNil(t, soc) { assert.Equal(t, expectedTaskID, soc.TaskScheduledId) assert.Equal(t, expectedOutput, soc.Result.GetValue()) } @@ -180,14 +180,14 @@ func Test_RuntimeState_ContinueAsNew(t *testing.T) { eventName := "MyRaisedEvent" eventPayload := "MyEventPayload" - state := runtimestate.NewOrchestrationRuntimeState(iid, nil, []*protos.HistoryEvent{ + state := runtimestate.NewWorkflowRuntimeState(iid, nil, []*protos.HistoryEvent{ { EventId: -1, Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: expectedName, - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: iid, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -205,12 +205,12 @@ func Test_RuntimeState_ContinueAsNew(t *testing.T) { }, }, } - actions := []*protos.OrchestratorAction{ + actions := []*protos.WorkflowAction{ { Id: expectedTaskID, - OrchestratorActionType: &protos.OrchestratorAction_CompleteOrchestration{ - CompleteOrchestration: &protos.CompleteOrchestrationAction{ - OrchestrationStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW, + WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ + CompleteWorkflow: &protos.CompleteWorkflowAction{ + WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW, Result: wrapperspb.String(continueAsNewInput), CarryoverEvents: carryoverEvents, }, @@ -223,11 +223,11 @@ func Test_RuntimeState_ContinueAsNew(t *testing.T) { if assert.NoError(t, err) && assert.True(t, continuedAsNew) { if assert.Len(t, state.NewEvents, 3) { assert.NotNil(t, state.NewEvents[0].Timestamp) - assert.NotNil(t, state.NewEvents[0].GetOrchestratorStarted()) + assert.NotNil(t, state.NewEvents[0].GetWorkflowStarted()) assert.NotNil(t, state.NewEvents[1].Timestamp) if ec := state.NewEvents[1].GetExecutionStarted(); assert.NotNil(t, ec) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING, runtimestate.RuntimeStatus(state)) - assert.Equal(t, state.InstanceId, ec.OrchestrationInstance.InstanceId) + assert.Equal(t, state.InstanceId, ec.WorkflowInstance.InstanceId) if name, err := runtimestate.Name(state); assert.NoError(t, err) { assert.Equal(t, expectedName, name) assert.Equal(t, expectedName, ec.Name) @@ -253,14 +253,14 @@ func Test_CreateTimer(t *testing.T) { timerName := "foo" expectedFireAt := time.Now().UTC().Add(72 * time.Hour) - s := runtimestate.NewOrchestrationRuntimeState(iid, nil, []*protos.HistoryEvent{ + s := runtimestate.NewWorkflowRuntimeState(iid, nil, []*protos.HistoryEvent{ { EventId: -1, Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: iid, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -269,12 +269,12 @@ func Test_CreateTimer(t *testing.T) { }, }) - var actions []*protos.OrchestratorAction + var actions []*protos.WorkflowAction timerCount := 3 for i := 1; i <= timerCount; i++ { - actions = append(actions, &protos.OrchestratorAction{ + actions = append(actions, &protos.WorkflowAction{ Id: int32(i), - OrchestratorActionType: &protos.OrchestratorAction_CreateTimer{ + WorkflowActionType: &protos.WorkflowAction_CreateTimer{ CreateTimer: &protos.CreateTimerAction{ FireAt: timestamppb.New(expectedFireAt), Name: &timerName, @@ -315,14 +315,14 @@ func Test_ScheduleTask(t *testing.T) { expectedName := "MyActivity" expectedInput := "{\"Foo\":5}" - state := runtimestate.NewOrchestrationRuntimeState(iid, nil, []*protos.HistoryEvent{ + state := runtimestate.NewWorkflowRuntimeState(iid, nil, []*protos.HistoryEvent{ { EventId: -1, Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: iid, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -332,10 +332,10 @@ func Test_ScheduleTask(t *testing.T) { }, }) - actions := []*protos.OrchestratorAction{ + actions := []*protos.WorkflowAction{ { Id: expectedTaskID, - OrchestratorActionType: &protos.OrchestratorAction_ScheduleTask{ + WorkflowActionType: &protos.WorkflowAction_ScheduleTask{ ScheduleTask: &protos.ScheduleTaskAction{Name: expectedName, Input: wrapperspb.String(expectedInput)}, }, }, @@ -381,14 +381,14 @@ func Test_CreateSubOrchestration(t *testing.T) { expectedTraceParent := "trace" expectedTraceState := "trace_state" - state := runtimestate.NewOrchestrationRuntimeState(iid, nil, []*protos.HistoryEvent{ + state := runtimestate.NewWorkflowRuntimeState(iid, nil, []*protos.HistoryEvent{ { EventId: -1, Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "Parent", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: iid, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -397,11 +397,11 @@ func Test_CreateSubOrchestration(t *testing.T) { }, }) - actions := []*protos.OrchestratorAction{ + actions := []*protos.WorkflowAction{ { Id: expectedTaskID, - OrchestratorActionType: &protos.OrchestratorAction_CreateSubOrchestration{ - CreateSubOrchestration: &protos.CreateSubOrchestrationAction{ + WorkflowActionType: &protos.WorkflowAction_CreateChildWorkflow{ + CreateChildWorkflow: &protos.CreateChildWorkflowAction{ Name: expectedName, Input: expectedInput, InstanceId: expectedInstanceID, @@ -419,7 +419,7 @@ func Test_CreateSubOrchestration(t *testing.T) { if assert.NoError(t, err) && assert.False(t, continuedAsNew) { if assert.Len(t, state.NewEvents, 1) { e := state.NewEvents[0] - if orchCreated := e.GetSubOrchestrationInstanceCreated(); assert.NotNil(t, orchCreated) { + if orchCreated := e.GetChildWorkflowInstanceCreated(); assert.NotNil(t, orchCreated) { assert.Equal(t, expectedTaskID, e.EventId) assert.Equal(t, expectedInstanceID, orchCreated.InstanceId) assert.Equal(t, expectedName, orchCreated.Name) @@ -434,15 +434,15 @@ func Test_CreateSubOrchestration(t *testing.T) { msg := state.PendingMessages[0] if executionStarted := msg.HistoryEvent.GetExecutionStarted(); assert.NotNil(t, executionStarted) { assert.Equal(t, int32(-1), msg.HistoryEvent.EventId) - assert.Equal(t, expectedInstanceID, executionStarted.OrchestrationInstance.InstanceId) - assert.NotEmpty(t, executionStarted.OrchestrationInstance.ExecutionId) + assert.Equal(t, expectedInstanceID, executionStarted.WorkflowInstance.InstanceId) + assert.NotEmpty(t, executionStarted.WorkflowInstance.ExecutionId) assert.Equal(t, expectedName, executionStarted.Name) assert.Equal(t, expectedInput.GetValue(), executionStarted.Input.GetValue()) if assert.NotNil(t, executionStarted.ParentInstance) { assert.Equal(t, "Parent", executionStarted.ParentInstance.Name.GetValue()) assert.Equal(t, expectedTaskID, executionStarted.ParentInstance.TaskScheduledId) - if assert.NotNil(t, executionStarted.ParentInstance.OrchestrationInstance) { - assert.Equal(t, iid, executionStarted.ParentInstance.OrchestrationInstance.InstanceId) + if assert.NotNil(t, executionStarted.ParentInstance.WorkflowInstance) { + assert.Equal(t, iid, executionStarted.ParentInstance.WorkflowInstance.InstanceId) } } if assert.NotNil(t, executionStarted.ParentTraceContext) { @@ -459,14 +459,14 @@ func Test_SendEvent(t *testing.T) { expectedEventName := "MyEvent" expectedInput := "foo" - s := runtimestate.NewOrchestrationRuntimeState("abc", nil, []*protos.HistoryEvent{ + s := runtimestate.NewWorkflowRuntimeState("abc", nil, []*protos.HistoryEvent{ { EventId: -1, Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "abc", ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -476,12 +476,12 @@ func Test_SendEvent(t *testing.T) { }, }) - actions := []*protos.OrchestratorAction{ + actions := []*protos.WorkflowAction{ { Id: -1, - OrchestratorActionType: &protos.OrchestratorAction_SendEvent{ + WorkflowActionType: &protos.WorkflowAction_SendEvent{ SendEvent: &protos.SendEventAction{ - Instance: &protos.OrchestrationInstance{InstanceId: expectedInstanceID}, + Instance: &protos.WorkflowInstance{InstanceId: expectedInstanceID}, Name: expectedEventName, Data: wrapperspb.String(expectedInput), }, @@ -512,16 +512,16 @@ func Test_SendEvent(t *testing.T) { } func Test_StateIsValid(t *testing.T) { - s := runtimestate.NewOrchestrationRuntimeState("abc", nil, []*protos.HistoryEvent{}) + s := runtimestate.NewWorkflowRuntimeState("abc", nil, []*protos.HistoryEvent{}) assert.True(t, runtimestate.IsValid(s)) - s = runtimestate.NewOrchestrationRuntimeState("abc", nil, []*protos.HistoryEvent{ + s = runtimestate.NewWorkflowRuntimeState("abc", nil, []*protos.HistoryEvent{ { EventId: -1, Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "abc", ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -530,7 +530,7 @@ func Test_StateIsValid(t *testing.T) { }, }) assert.True(t, runtimestate.IsValid(s)) - s = runtimestate.NewOrchestrationRuntimeState("abc", nil, []*protos.HistoryEvent{ + s = runtimestate.NewWorkflowRuntimeState("abc", nil, []*protos.HistoryEvent{ { EventId: -1, Timestamp: timestamppb.New(time.Now()), @@ -545,14 +545,14 @@ func Test_StateIsValid(t *testing.T) { } func Test_DuplicateEvents(t *testing.T) { - s := runtimestate.NewOrchestrationRuntimeState("abc", nil, []*protos.HistoryEvent{}) + s := runtimestate.NewWorkflowRuntimeState("abc", nil, []*protos.HistoryEvent{}) err := runtimestate.AddEvent(s, &protos.HistoryEvent{ EventId: -1, Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "abc", ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -566,7 +566,7 @@ func Test_DuplicateEvents(t *testing.T) { EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "abc", ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -584,7 +584,7 @@ func Test_DuplicateEvents(t *testing.T) { Timestamp: timestamppb.Now(), EventType: &protos.HistoryEvent_ExecutionCompleted{ ExecutionCompleted: &protos.ExecutionCompletedEvent{ - OrchestrationStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, + WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, }, }, }) @@ -594,7 +594,7 @@ func Test_DuplicateEvents(t *testing.T) { Timestamp: timestamppb.Now(), EventType: &protos.HistoryEvent_ExecutionCompleted{ ExecutionCompleted: &protos.ExecutionCompletedEvent{ - OrchestrationStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, + WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, }, }, }) diff --git a/tests/task_executor_test.go b/tests/task_executor_test.go index ab3c64c2..d2be25d4 100644 --- a/tests/task_executor_test.go +++ b/tests/task_executor_test.go @@ -28,8 +28,8 @@ func Test_Executor_WaitForEventSchedulesTimer(t *testing.T) { startEvent := &protos.HistoryEvent{ EventId: -1, Timestamp: timestamppb.Now(), - EventType: &protos.HistoryEvent_OrchestratorStarted{ - OrchestratorStarted: &protos.OrchestratorStartedEvent{}, + EventType: &protos.HistoryEvent_WorkflowStarted{ + WorkflowStarted: &protos.WorkflowStartedEvent{}, }, } oldEvents := []*protos.HistoryEvent{} @@ -41,7 +41,7 @@ func Test_Executor_WaitForEventSchedulesTimer(t *testing.T) { EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "Orchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: string(iid), ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -80,8 +80,8 @@ func Test_Executor_SuspendStopsAllActions(t *testing.T) { { EventId: -1, Timestamp: timestamppb.Now(), - EventType: &protos.HistoryEvent_OrchestratorStarted{ - OrchestratorStarted: &protos.OrchestratorStartedEvent{}, + EventType: &protos.HistoryEvent_WorkflowStarted{ + WorkflowStarted: &protos.WorkflowStartedEvent{}, }, }, { @@ -90,7 +90,7 @@ func Test_Executor_SuspendStopsAllActions(t *testing.T) { EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "SuspendResumeOrchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: string(iid), ExecutionId: wrapperspb.String(uuid.New().String()), }, diff --git a/tests/worker_test.go b/tests/worker_test.go index 6324569a..959bd0b3 100644 --- a/tests/worker_test.go +++ b/tests/worker_test.go @@ -36,7 +36,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_BasicFlow(t *testing.T) { EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrch", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "test123", ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -45,8 +45,8 @@ func Test_TryProcessSingleOrchestrationWorkItem_BasicFlow(t *testing.T) { }, }, } - state := &backend.OrchestrationRuntimeState{} - result := &protos.OrchestratorResponse{} + state := &backend.WorkflowRuntimeState{} + result := &protos.WorkflowResponse{} ctx, cancel := context.WithCancel(ctx) completed := atomic.Bool{} @@ -55,7 +55,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_BasicFlow(t *testing.T) { be.EXPECT().NextOrchestrationWorkItem(anyContext).Return(nil, errors.New("")).Once().Run(func(mock.Arguments) { cancel() }) - be.EXPECT().GetOrchestrationRuntimeState(anyContext, wi).Return(state, nil).Once() + be.EXPECT().GetWorkflowRuntimeState(anyContext, wi).Return(state, nil).Once() be.EXPECT().CompleteOrchestrationWorkItem(anyContext, wi).RunAndReturn(func(ctx context.Context, owi *backend.OrchestrationWorkItem) error { completed.Store(true) return nil @@ -82,7 +82,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_BasicFlow(t *testing.T) { t.Logf("state.NewEvents: %v", state.NewEvents) require.Len(t, state.NewEvents, 2) - require.NotNil(t, wi.State.NewEvents[0].GetOrchestratorStarted()) + require.NotNil(t, wi.State.NewEvents[0].GetWorkflowStarted()) require.NotNil(t, wi.State.NewEvents[1].GetExecutionStarted()) } @@ -97,7 +97,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_Idempotency(t *testing.T) { EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrch", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: workflowID, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -105,7 +105,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_Idempotency(t *testing.T) { }, }, }, - State: runtimestate.NewOrchestrationRuntimeState(workflowID, nil, []*protos.HistoryEvent{}), + State: runtimestate.NewWorkflowRuntimeState(workflowID, nil, []*protos.HistoryEvent{}), } ctx, cancel := context.WithCancel(context.Background()) @@ -116,13 +116,13 @@ func Test_TryProcessSingleOrchestrationWorkItem_Idempotency(t *testing.T) { ex := mocks.NewExecutor(t) callNumber := 0 - ex.EXPECT().ExecuteOrchestrator(anyContext, wi.InstanceID, wi.State.OldEvents, mock.Anything).RunAndReturn(func(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.OrchestratorResponse, error) { + ex.EXPECT().ExecuteOrchestrator(anyContext, wi.InstanceID, wi.State.OldEvents, mock.Anything).RunAndReturn(func(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.WorkflowResponse, error) { callNumber++ logger.Debugf("execute orchestrator called %d times", callNumber) if callNumber == 1 { return nil, errors.New("dummy error") } - return &protos.OrchestratorResponse{}, nil + return &protos.WorkflowResponse{}, nil }).Times(2) be.EXPECT().NextOrchestrationWorkItem(anyContext).Return(wi, nil).Once() @@ -152,9 +152,9 @@ func Test_TryProcessSingleOrchestrationWorkItem_Idempotency(t *testing.T) { t.Logf("state.NewEvents: %v", wi.State.NewEvents) require.Len(t, wi.State.NewEvents, 3) - require.NotNil(t, wi.State.NewEvents[0].GetOrchestratorStarted()) + require.NotNil(t, wi.State.NewEvents[0].GetWorkflowStarted()) require.NotNil(t, wi.State.NewEvents[1].GetExecutionStarted()) - require.NotNil(t, wi.State.NewEvents[2].GetOrchestratorStarted()) + require.NotNil(t, wi.State.NewEvents[2].GetWorkflowStarted()) } func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t *testing.T) { @@ -171,7 +171,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t * EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: string(iid), ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -182,7 +182,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t * } // Empty orchestration runtime state since we're starting a new execution from scratch - state := runtimestate.NewOrchestrationRuntimeState(string(iid), nil, []*protos.HistoryEvent{}) + state := runtimestate.NewWorkflowRuntimeState(string(iid), nil, []*protos.HistoryEvent{}) ctx, cancel := context.WithCancel(ctx) be := mocks.NewBackend(t) @@ -191,19 +191,19 @@ func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t * cancel() }) - be.EXPECT().GetOrchestrationRuntimeState(anyContext, wi).Return(state, nil).Once() + be.EXPECT().GetWorkflowRuntimeState(anyContext, wi).Return(state, nil).Once() ex := mocks.NewExecutor(t) // Return an execution completed action to simulate the completion of the orchestration (a no-op) resultValue := "done" - result := &protos.OrchestratorResponse{ - Actions: []*protos.OrchestratorAction{ + result := &protos.WorkflowResponse{ + Actions: []*protos.WorkflowAction{ { Id: -1, - OrchestratorActionType: &protos.OrchestratorAction_CompleteOrchestration{ - CompleteOrchestration: &protos.CompleteOrchestrationAction{ - OrchestrationStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, + WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ + CompleteWorkflow: &protos.CompleteWorkflowAction{ + WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, Result: wrapperspb.String(resultValue), }, }, @@ -245,7 +245,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t * t.Logf("state.NewEvents: %v", state.NewEvents) require.Len(t, state.NewEvents, 3) - require.NotNil(t, wi.State.NewEvents[0].GetOrchestratorStarted()) + require.NotNil(t, wi.State.NewEvents[0].GetWorkflowStarted()) require.NotNil(t, wi.State.NewEvents[1].GetExecutionStarted()) require.NotNil(t, wi.State.NewEvents[2].GetExecutionCompleted()) } diff --git a/workflow/api.go b/workflow/api.go index 38e9deb5..dbb7878a 100644 --- a/workflow/api.go +++ b/workflow/api.go @@ -10,7 +10,7 @@ import ( ) type NewWorkflowOptions api.NewOrchestrationOptions -type FetchWorkflowMetadataOptions api.FetchOrchestrationMetadataOptions +type FetchWorkflowMetadataOptions api.FetchWorkflowMetadataOptions type RaiseEventOptions api.RaiseEventOptions type TerminateOptions api.TerminateOptions type PurgeOptions api.PurgeOptions @@ -91,11 +91,11 @@ func WithForcePurge(force bool) PurgeOptions { } func WorkflowMetadataIsRunning(o *WorkflowMetadata) bool { - return api.OrchestrationMetadataIsComplete(ptr.Of(protos.OrchestrationMetadata(*o))) + return api.WorkflowMetadataIsComplete(ptr.Of(protos.WorkflowMetadata(*o))) } func WorkflowMetadataIsComplete(o *WorkflowMetadata) bool { - return api.OrchestrationMetadataIsComplete(ptr.Of(protos.OrchestrationMetadata(*o))) + return api.WorkflowMetadataIsComplete(ptr.Of(protos.WorkflowMetadata(*o))) } func WithRerunInput(input any) RerunOptions { diff --git a/workflow/client.go b/workflow/client.go index 571a7d9d..3cf8aee9 100644 --- a/workflow/client.go +++ b/workflow/client.go @@ -48,11 +48,11 @@ func (c *Client) ScheduleWorkflow(ctx context.Context, orchestrator string, opts // api.ErrInstanceNotFound is returned when the specified workflow doesn't // exist. func (c *Client) FetchWorkflowMetadata(ctx context.Context, id string, opts ...FetchWorkflowMetadataOptions) (*WorkflowMetadata, error) { - oops := make([]api.FetchOrchestrationMetadataOptions, len(opts)) + oops := make([]api.FetchWorkflowMetadataOptions, len(opts)) for i, o := range opts { - oops[i] = api.FetchOrchestrationMetadataOptions(o) + oops[i] = api.FetchWorkflowMetadataOptions(o) } - meta, err := c.thgc.FetchOrchestrationMetadata(ctx, api.InstanceID(id), oops...) + meta, err := c.thgc.FetchWorkflowMetadata(ctx, api.InstanceID(id), oops...) return (*WorkflowMetadata)(meta), err } @@ -63,9 +63,9 @@ func (c *Client) FetchWorkflowMetadata(ctx context.Context, id string, opts ...F // api.ErrInstanceNotFound is returned when the specified workflow doesn't // exist. func (c *Client) WaitForWorkflowStart(ctx context.Context, id string, opts ...FetchWorkflowMetadataOptions) (*WorkflowMetadata, error) { - oops := make([]api.FetchOrchestrationMetadataOptions, len(opts)) + oops := make([]api.FetchWorkflowMetadataOptions, len(opts)) for i, o := range opts { - oops[i] = api.FetchOrchestrationMetadataOptions(o) + oops[i] = api.FetchWorkflowMetadataOptions(o) } meta, err := c.thgc.WaitForOrchestrationStart(ctx, api.InstanceID(id), oops...) return (*WorkflowMetadata)(meta), err @@ -78,9 +78,9 @@ func (c *Client) WaitForWorkflowStart(ctx context.Context, id string, opts ...Fe // api.ErrInstanceNotFound is returned when the specified workflow doesn't // exist. func (c *Client) WaitForWorkflowCompletion(ctx context.Context, id string, opts ...FetchWorkflowMetadataOptions) (*WorkflowMetadata, error) { - oops := make([]api.FetchOrchestrationMetadataOptions, len(opts)) + oops := make([]api.FetchWorkflowMetadataOptions, len(opts)) for i, o := range opts { - oops[i] = api.FetchOrchestrationMetadataOptions(o) + oops[i] = api.FetchWorkflowMetadataOptions(o) } meta, err := c.thgc.WaitForOrchestrationCompletion(ctx, api.InstanceID(id), oops...) return (*WorkflowMetadata)(meta), err @@ -129,7 +129,7 @@ func (c *Client) PurgeWorkflowState(ctx context.Context, id string, opts ...Purg for i, o := range opts { oops[i] = api.PurgeOptions(o) } - return c.thgc.PurgeOrchestrationState(ctx, api.InstanceID(id), oops...) + return c.thgc.PurgeWorkflowState(ctx, api.InstanceID(id), oops...) } // RerunWorkflowFromEvent reruns a workflow from a specific event ID of some diff --git a/workflow/state.go b/workflow/state.go index a93beaab..4e2bf416 100644 --- a/workflow/state.go +++ b/workflow/state.go @@ -17,7 +17,7 @@ const ( StatusStalled = api.RUNTIME_STATUS_STALLED ) -type WorkflowMetadata protos.OrchestrationMetadata +type WorkflowMetadata protos.WorkflowMetadata type ListInstanceIDsResponse protos.ListInstanceIDsResponse type GetInstanceHistoryResponse protos.GetInstanceHistoryResponse diff --git a/workflow/workflow.go b/workflow/workflow.go index 2dfc366e..a972849b 100644 --- a/workflow/workflow.go +++ b/workflow/workflow.go @@ -140,7 +140,7 @@ func WithRawChildWorkflowInput(input *wrapperspb.StringValue) ChildWorkflowOptio // CallChildWorkflow workflow method that specifies the instance ID of the // child-workflow. func WithChildWorkflowInstanceID(instanceID string) ChildWorkflowOption { - return ChildWorkflowOption(task.WithSubOrchestrationInstanceID(instanceID)) + return ChildWorkflowOption(task.WithSubWorkflowInstanceID(instanceID)) } func WithChildWorkflowRetryPolicy(policy *RetryPolicy) ChildWorkflowOption { From d28a05cf991269a43f9dd80ea9ff6b132e5243a1 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 31 Mar 2026 15:12:14 -0500 Subject: [PATCH 02/12] sub -> child, orchestration/orchestrator -> wf Signed-off-by: Cassandra Coyle --- api/helpers/tracing.go | 4 +- api/orchestration.go | 75 +- backend/backend.go | 148 ++-- backend/client.go | 92 +-- backend/executor.go | 118 +-- backend/local/task.go | 32 +- backend/orchestration.go | 126 +-- backend/postgres/postgres.go | 147 ++-- backend/runtimestate/applier.go | 60 +- backend/runtimestate/runtimestate.go | 46 +- backend/runtimestate/runtimestate_test.go | 14 +- backend/sqlite/sqlite.go | 149 ++-- backend/taskhub.go | 10 +- backend/workitem.go | 10 +- client/client_grpc.go | 62 +- client/worker_grpc.go | 12 +- main.go | 4 +- samples/azurefunctions/main.go | 6 +- samples/azurefunctions/middleware.go | 20 +- .../distributedtracing/distributedtracing.go | 28 +- samples/externalevents/externalevents.go | 34 +- samples/parallel/parallel.go | 28 +- samples/retries/retries.go | 24 +- samples/sequence/sequence.go | 28 +- samples/taskexecutionid/taskexecutionid.go | 24 +- submodules/durabletask-protobuf | 2 +- task/executor.go | 26 +- task/orchestrator.go | 270 +++---- task/registry.go | 52 +- task/task.go | 20 +- tests/backend_test.go | 185 +++-- tests/grpc/grpc_test.go | 248 ++---- tests/mocks/Backend.go | 351 ++++----- tests/mocks/Executor.go | 30 +- tests/orchestrations_test.go | 744 ++++++++---------- tests/runtimestate_test.go | 30 +- tests/task_executor_test.go | 26 +- tests/taskhub_test.go | 4 +- tests/utils/tracing.go | 10 +- tests/worker_test.go | 60 +- workflow/api.go | 2 +- workflow/client.go | 20 +- workflow/registry.go | 12 +- workflow/workflow.go | 20 +- 44 files changed, 1528 insertions(+), 1885 deletions(-) diff --git a/api/helpers/tracing.go b/api/helpers/tracing.go index 9630ed5a..c0b81ebd 100644 --- a/api/helpers/tracing.go +++ b/api/helpers/tracing.go @@ -18,7 +18,7 @@ import ( var tracer = otel.Tracer("durabletask") -func StartNewCreateOrchestrationSpan( +func StartNewCreateWorkflowSpan( ctx context.Context, name string, version string, instanceID string, ) (context.Context, trace.Span) { attributes := []attribute.KeyValue{ @@ -29,7 +29,7 @@ func StartNewCreateOrchestrationSpan( return startNewSpan(ctx, "create_orchestration", name, version, attributes, trace.SpanKindClient, time.Now().UTC()) } -func StartNewRunOrchestrationSpan( +func StartNewRunWorkflowSpan( ctx context.Context, es *protos.ExecutionStartedEvent, startedTime time.Time, ) (context.Context, trace.Span) { name := es.Name diff --git a/api/orchestration.go b/api/orchestration.go index 0013bb42..18b87117 100644 --- a/api/orchestration.go +++ b/api/orchestration.go @@ -10,14 +10,6 @@ import ( "google.golang.org/protobuf/types/known/wrapperspb" ) -type CreateOrchestrationAction = protos.CreateOrchestrationAction - -const ( - REUSE_ID_ACTION_ERROR CreateOrchestrationAction = protos.CreateOrchestrationAction_ERROR - REUSE_ID_ACTION_IGNORE CreateOrchestrationAction = protos.CreateOrchestrationAction_IGNORE - REUSE_ID_ACTION_TERMINATE CreateOrchestrationAction = protos.CreateOrchestrationAction_TERMINATE -) - type OrchestrationStatus = protos.OrchestrationStatus const ( @@ -32,28 +24,26 @@ const ( RUNTIME_STATUS_STALLED OrchestrationStatus = protos.OrchestrationStatus_ORCHESTRATION_STATUS_STALLED ) -type OrchestrationIdReusePolicy = protos.OrchestrationIdReusePolicy - -// InstanceID is a unique identifier for an orchestration instance. +// InstanceID is a unique identifier for a workflow instance. type InstanceID string func (i InstanceID) String() string { return string(i) } -// NewOrchestrationOptions configures options for starting a new orchestration. -type NewOrchestrationOptions func(*protos.CreateInstanceRequest) error +// NewWorkflowOptions configures options for starting a new workflow. +type NewWorkflowOptions func(*protos.CreateInstanceRequest) error -// GetOrchestrationMetadataOptions is a set of options for fetching orchestration metadata. -type FetchOrchestrationMetadataOptions func(*protos.GetInstanceRequest) +// GetWorkflowMetadataOptions is a set of options for fetching workflow metadata. +type FetchWorkflowMetadataOptions func(*protos.GetInstanceRequest) -// RaiseEventOptions is a set of options for raising an orchestration event. +// RaiseEventOptions is a set of options for raising a workflow event. type RaiseEventOptions func(*protos.RaiseEventRequest) error -// TerminateOptions is a set of options for terminating an orchestration. +// TerminateOptions is a set of options for terminating a workflow. type TerminateOptions func(*protos.TerminateRequest) error -// PurgeOptions is a set of options for purging an orchestration. +// PurgeOptions is a set of options for purging a workflow. type PurgeOptions func(*protos.PurgeInstancesRequest) error type RerunOptions func(*protos.RerunWorkflowFromEventRequest) error @@ -62,30 +52,17 @@ type ListInstanceIDsOptions func(*protos.ListInstanceIDsRequest) error type GetInstanceHistoryOptions func(*protos.GetInstanceHistoryRequest) error -// WithInstanceID configures an explicit orchestration instance ID. If not specified, -// a random UUID value will be used for the orchestration instance ID. -func WithInstanceID(id InstanceID) NewOrchestrationOptions { +// WithInstanceID configures an explicit workflow instance ID. If not specified, +// a random UUID value will be used for the workflow instance ID. +func WithInstanceID(id InstanceID) NewWorkflowOptions { return func(req *protos.CreateInstanceRequest) error { req.InstanceId = string(id) return nil } } -// WithOrchestrationIdReusePolicy configures Orchestration ID reuse policy. -// Deprecated. -func WithOrchestrationIdReusePolicy(policy *protos.OrchestrationIdReusePolicy) NewOrchestrationOptions { - return func(req *protos.CreateInstanceRequest) error { - // initialize CreateInstanceOption - req.OrchestrationIdReusePolicy = &protos.OrchestrationIdReusePolicy{ - OperationStatus: policy.OperationStatus, - Action: policy.Action, - } - return nil - } -} - -// WithInput configures an input for the orchestration. The specified input must be serializable. -func WithInput(input any) NewOrchestrationOptions { +// WithInput configures an input for the workflow. The specified input must be serializable. +func WithInput(input any) NewWorkflowOptions { return func(req *protos.CreateInstanceRequest) error { bytes, err := json.Marshal(input) if err != nil { @@ -96,26 +73,26 @@ func WithInput(input any) NewOrchestrationOptions { } } -// WithRawInput configures an input for the orchestration. The specified input must be a string. -func WithRawInput(rawInput *wrapperspb.StringValue) NewOrchestrationOptions { +// WithRawInput configures an input for the workflow. The specified input must be a string. +func WithRawInput(rawInput *wrapperspb.StringValue) NewWorkflowOptions { return func(req *protos.CreateInstanceRequest) error { req.Input = rawInput return nil } } -// WithStartTime configures a start time at which the orchestration should start running. +// WithStartTime configures a start time at which the workflow should start running. // Note that the actual start time could be later than the specified start time if the // task hub is under load or if the app is not running at the specified start time. -func WithStartTime(startTime time.Time) NewOrchestrationOptions { +func WithStartTime(startTime time.Time) NewWorkflowOptions { return func(req *protos.CreateInstanceRequest) error { req.ScheduledStartTimestamp = timestamppb.New(startTime) return nil } } -// WithFetchPayloads configures whether to load orchestration inputs, outputs, and custom status values, which could be large. -func WithFetchPayloads(fetchPayloads bool) FetchOrchestrationMetadataOptions { +// WithFetchPayloads configures whether to load workflow inputs, outputs, and custom status values, which could be large. +func WithFetchPayloads(fetchPayloads bool) FetchWorkflowMetadataOptions { return func(req *protos.GetInstanceRequest) { req.GetInputsAndOutputs = fetchPayloads } @@ -141,7 +118,7 @@ func WithRawEventData(data *wrapperspb.StringValue) RaiseEventOptions { } } -// WithOutput configures an output for the terminated orchestration. The specified output must be serializable. +// WithOutput configures an output for the terminated workflow. The specified output must be serializable. func WithOutput(data any) TerminateOptions { return func(req *protos.TerminateRequest) error { bytes, err := json.Marshal(data) @@ -153,7 +130,7 @@ func WithOutput(data any) TerminateOptions { } } -// WithRawOutput configures a raw, unprocessed output (i.e. pre-serialized) for the terminated orchestration. +// WithRawOutput configures a raw, unprocessed output (i.e. pre-serialized) for the terminated workflow. func WithRawOutput(data *wrapperspb.StringValue) TerminateOptions { return func(req *protos.TerminateRequest) error { req.Output = data @@ -161,7 +138,7 @@ func WithRawOutput(data *wrapperspb.StringValue) TerminateOptions { } } -// WithRecursiveTerminate configures whether to terminate all sub-orchestrations created by the target orchestration. +// WithRecursiveTerminate configures whether to terminate all child workflows created by the target workflow. func WithRecursiveTerminate(recursive bool) TerminateOptions { return func(req *protos.TerminateRequest) error { req.Recursive = recursive @@ -169,7 +146,7 @@ func WithRecursiveTerminate(recursive bool) TerminateOptions { } } -// WithRecursivePurge configures whether to purge all sub-orchestrations created by the target orchestration. +// WithRecursivePurge configures whether to purge all child workflows created by the target workflow. func WithRecursivePurge(recursive bool) PurgeOptions { return func(req *protos.PurgeInstancesRequest) error { req.Recursive = recursive @@ -187,11 +164,11 @@ func WithForcePurge(force bool) PurgeOptions { } } -func OrchestrationMetadataIsRunning(o *protos.OrchestrationMetadata) bool { - return !OrchestrationMetadataIsComplete(o) +func WorkflowMetadataIsRunning(o *protos.WorkflowMetadata) bool { + return !WorkflowMetadataIsComplete(o) } -func OrchestrationMetadataIsComplete(o *protos.OrchestrationMetadata) bool { +func WorkflowMetadataIsComplete(o *protos.WorkflowMetadata) bool { return o.GetRuntimeStatus() == protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED || o.GetRuntimeStatus() == protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED || o.GetRuntimeStatus() == protos.OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED || diff --git a/backend/backend.go b/backend/backend.go index f641b02d..68f7e0de 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -26,12 +26,12 @@ type ( WorkflowState = protos.WorkflowState CreateWorkflowInstanceRequest = protos.CreateWorkflowInstanceRequest ActivityRequest = protos.ActivityRequest - OrchestrationMetadata = protos.OrchestrationMetadata + WorkflowMetadata = protos.WorkflowMetadata OrchestrationStatus = protos.OrchestrationStatus - WorkflowStateMetadata = protos.WorkflowStateMetadata + BackendWorkflowStateMetadata = protos.BackendWorkflowStateMetadata DurableTimer = protos.DurableTimer - OrchestrationRuntimeState = protos.OrchestrationRuntimeState - OrchestrationRuntimeStateMessage = protos.OrchestrationRuntimeStateMessage + WorkflowRuntimeState = protos.WorkflowRuntimeState + WorkflowRuntimeStateMessage = protos.WorkflowRuntimeStateMessage RerunWorkflowFromEventRequest = protos.RerunWorkflowFromEventRequest ListInstanceIDsRequest = protos.ListInstanceIDsRequest ListInstanceIDsResponse = protos.ListInstanceIDsResponse @@ -39,18 +39,6 @@ type ( GetInstanceHistoryResponse = protos.GetInstanceHistoryResponse ) -type OrchestrationIdReusePolicyOptions func(*protos.OrchestrationIdReusePolicy) error - -func WithOrchestrationIdReusePolicy(policy *protos.OrchestrationIdReusePolicy) OrchestrationIdReusePolicyOptions { - return func(po *protos.OrchestrationIdReusePolicy) error { - if policy != nil { - po.OperationStatus = policy.OperationStatus - po.Action = policy.Action - } - return nil - } -} - type Backend interface { // CreateTaskHub creates a new task hub for the current backend. Task hub creation must be idempotent. // @@ -69,9 +57,9 @@ type Backend interface { // Stop stops any background processing done by this backend. Stop(context.Context) error - // CreateOrchestrationInstance creates a new orchestration instance with a history event that + // CreateWorkflowInstance creates a new workflow instance with a history event that // wraps a ExecutionStarted event. - CreateOrchestrationInstance(context.Context, *HistoryEvent, ...OrchestrationIdReusePolicyOptions) error + CreateWorkflowInstance(context.Context, *HistoryEvent) error // RerunWorkflowFromEvent reruns a workflow from a specific event ID of some // source instance ID. If not given, a random new instance ID will be @@ -79,44 +67,44 @@ type Backend interface { // event ID to rerun from. RerunWorkflowFromEvent(ctx context.Context, req *protos.RerunWorkflowFromEventRequest) (api.InstanceID, error) - // AddNewEvent adds a new orchestration event to the specified orchestration instance. - AddNewOrchestrationEvent(context.Context, api.InstanceID, *HistoryEvent) error + // AddNewEvent adds a new workflow event to the specified workflow instance. + AddNewWorkflowEvent(context.Context, api.InstanceID, *HistoryEvent) error - // NextOrchestrationWorkItem blocks and returns the next orchestration work + // NextWorkflowWorkItem blocks and returns the next workflow work // item from the task hub. Should only return an error when shutting down. - NextOrchestrationWorkItem(context.Context) (*OrchestrationWorkItem, error) + NextWorkflowWorkItem(context.Context) (*WorkflowWorkItem, error) - // GetOrchestrationRuntimeState gets the runtime state of an orchestration instance. - GetOrchestrationRuntimeState(context.Context, *OrchestrationWorkItem) (*OrchestrationRuntimeState, error) + // GetWorkflowRuntimeState gets the runtime state of a workflow instance. + GetWorkflowRuntimeState(context.Context, *WorkflowWorkItem) (*WorkflowRuntimeState, error) - // WatchOrchestrationRuntimeStatus is a streaming API to watch for changes to + // WatchWorkflowRuntimeStatus is a streaming API to watch for changes to // the OrchestrtionMetadata, receiving events as and when the state changes. // When the given condition is true, returns. // Used over polling the metadata. - WatchOrchestrationRuntimeStatus(ctx context.Context, id api.InstanceID, condition func(*OrchestrationMetadata) bool) error + WatchWorkflowRuntimeStatus(ctx context.Context, id api.InstanceID, condition func(*WorkflowMetadata) bool) error - // GetOrchestrationMetadata gets the metadata associated with the given orchestration instance ID. + // GetWorkflowMetadata gets the metadata associated with the given workflow instance ID. // - // Returns [api.ErrInstanceNotFound] if the orchestration instance doesn't exist. - GetOrchestrationMetadata(context.Context, api.InstanceID) (*OrchestrationMetadata, error) + // Returns [api.ErrInstanceNotFound] if the workflow instance doesn't exist. + GetWorkflowMetadata(context.Context, api.InstanceID) (*WorkflowMetadata, error) - // CompleteOrchestrationWorkItem completes a work item by saving the updated runtime state to durable storage. + // CompleteWorkflowWorkItem completes a work item by saving the updated runtime state to durable storage. // // Returns [ErrWorkItemLockLost] if the work-item couldn't be completed due to a lock-lost conflict (e.g., split-brain). - CompleteOrchestrationWorkItem(context.Context, *OrchestrationWorkItem) error + CompleteWorkflowWorkItem(context.Context, *WorkflowWorkItem) error - // AbandonOrchestrationWorkItem undoes any state changes and returns the work item to the work item queue. + // AbandonWorkflowWorkItem undoes any state changes and returns the work item to the work item queue. // - // This is called if an internal failure happens in the processing of an orchestration work item. It is - // not called if the orchestration work item is processed successfully (note that an orchestration that + // This is called if an internal failure happens in the processing of a workflow work item. It is + // not called if the workflow work item is processed successfully (note that a workflow that // completes with a failure is still considered a successfully processed work item). - AbandonOrchestrationWorkItem(context.Context, *OrchestrationWorkItem) error + AbandonWorkflowWorkItem(context.Context, *WorkflowWorkItem) error // NextActivityWorkItem blocks and returns the next activity work item from // the task hub. Should only return an error when shutting down. NextActivityWorkItem(context.Context) (*ActivityWorkItem, error) - // CompleteActivityWorkItem sends a message to the parent orchestration indicating activity completion. + // CompleteActivityWorkItem sends a message to the parent workflow indicating activity completion. // // Returns [ErrWorkItemLockLost] if the work-item couldn't be completed due to a lock-lost conflict (e.g., split-brain). CompleteActivityWorkItem(context.Context, *ActivityWorkItem) error @@ -126,22 +114,22 @@ type Backend interface { // This is called when an internal failure occurs during activity work-item processing. AbandonActivityWorkItem(context.Context, *ActivityWorkItem) error - // PurgeOrchestrationState deletes all saved state for the specified orchestration instance. + // PurgeWorkflowState deletes all saved state for the specified workflow instance. // - // [api.ErrInstanceNotFound] is returned if the specified orchestration instance doesn't exist. - // [api.ErrNotCompleted] is returned if the specified orchestration instance is still running. - PurgeOrchestrationState(ctx context.Context, id api.InstanceID, force bool) error + // [api.ErrInstanceNotFound] is returned if the specified workflow instance doesn't exist. + // [api.ErrNotCompleted] is returned if the specified workflow instance is still running. + PurgeWorkflowState(ctx context.Context, id api.InstanceID, force bool) error - // CompleteOrchestratorTask completes the orchestrator task by saving the updated runtime state to durable storage. - CompleteOrchestratorTask(context.Context, *protos.OrchestratorResponse) error + // CompleteWorkflowTask completes the workflow task by saving the updated runtime state to durable storage. + CompleteWorkflowTask(context.Context, *protos.WorkflowResponse) error - // CancelOrchestratorTask cancels the orchestrator task so instances of WaitForOrchestratorCompletion will return an error. - CancelOrchestratorTask(context.Context, api.InstanceID) error + // CancelWorkflowTask cancels the workflow task so instances of WaitForWorkflowTaskCompletion will return an error. + CancelWorkflowTask(context.Context, api.InstanceID) error - // WaitForOrchestratorCompletion blocks until the orchestrator completes and returns the final response. + // WaitForWorkflowTaskCompletion blocks until the workflow completes and returns the final response. // // [api.ErrTaskCancelled] is returned if the task was cancelled. - WaitForOrchestratorCompletion(*protos.OrchestratorRequest) func(context.Context) (*protos.OrchestratorResponse, error) + WaitForWorkflowTaskCompletion(*protos.WorkflowRequest) func(context.Context) (*protos.WorkflowResponse, error) // CompleteActivityTask completes the activity task by saving the updated runtime state to durable storage. CompleteActivityTask(context.Context, *protos.ActivityResponse) error @@ -154,7 +142,7 @@ type Backend interface { // [api.ErrTaskCancelled] is returned if the task was cancelled. WaitForActivityCompletion(*protos.ActivityRequest) func(context.Context) (*protos.ActivityResponse, error) - // ListInstanceIDs lists orchestration instance IDs based on the provided + // ListInstanceIDs lists workflow instance IDs based on the provided // query parameters. ListInstanceIDs(ctx context.Context, req *protos.ListInstanceIDsRequest) (*protos.ListInstanceIDsResponse, error) @@ -180,51 +168,51 @@ func UnmarshalHistoryEvent(bytes []byte) (*HistoryEvent, error) { return e, nil } -// purgeOrchestrationState purges the orchestration state, including sub-orchestrations if [recursive] is true. +// purgeWorkflowState purges the workflow state, including child workflows if [recursive] is true. // Returns (deletedInstanceCount, error), where deletedInstanceCount is the number of instances deleted. -func purgeOrchestrationState(ctx context.Context, be Backend, iid api.InstanceID, recursive bool, force bool) (int, error) { +func purgeWorkflowState(ctx context.Context, be Backend, iid api.InstanceID, recursive bool, force bool) (int, error) { deletedInstanceCount := 0 if recursive { - owi := &OrchestrationWorkItem{ + owi := &WorkflowWorkItem{ InstanceID: iid, } - state, err := be.GetOrchestrationRuntimeState(ctx, owi) + state, err := be.GetWorkflowRuntimeState(ctx, owi) if err != nil { - return 0, fmt.Errorf("failed to fetch orchestration state: %w", err) + return 0, fmt.Errorf("failed to fetch workflow state: %w", err) } if len(state.NewEvents)+len(state.OldEvents) == 0 { - // If there are no events, the orchestration instance doesn't exist + // If there are no events, the workflow instance doesn't exist return 0, api.ErrInstanceNotFound } if !runtimestate.IsCompleted(state) { - // Orchestration must be completed before purging its state + // Workflow must be completed before purging its state return 0, api.ErrNotCompleted } - subOrchestrationInstances := getSubOrchestrationInstances(state.OldEvents, state.NewEvents) - for _, subOrchestrationInstance := range subOrchestrationInstances { - // Recursively purge sub-orchestrations - count, err := purgeOrchestrationState(ctx, be, subOrchestrationInstance, recursive, force) - // `count` sub-orchestrations have been successfully purged (even in case of error) + childWorkflowInstances := getChildWorkflowInstances(state.OldEvents, state.NewEvents) + for _, childWorkflowInstance := range childWorkflowInstances { + // Recursively purge child workflows + count, err := purgeWorkflowState(ctx, be, childWorkflowInstance, recursive, force) + // `count` child workflows have been successfully purged (even in case of error) deletedInstanceCount += count if err != nil { - return deletedInstanceCount, fmt.Errorf("failed to purge sub-orchestration: %w", err) + return deletedInstanceCount, fmt.Errorf("failed to purge child workflow: %w", err) } } } - // Purging root orchestration - if err := be.PurgeOrchestrationState(ctx, iid, force); err != nil { + // Purging root workflow + if err := be.PurgeWorkflowState(ctx, iid, force); err != nil { return deletedInstanceCount, err } return deletedInstanceCount + 1, nil } -// terminateSubOrchestrationInstances submits termination requests to sub-orchestrations if [et.Recurse] is true. -func terminateSubOrchestrationInstances(ctx context.Context, be Backend, iid api.InstanceID, state *OrchestrationRuntimeState, et *protos.ExecutionTerminatedEvent) error { +// terminateChildWorkflowInstances submits termination requests to child workflows if [et.Recurse] is true. +func terminateChildWorkflowInstances(ctx context.Context, be Backend, iid api.InstanceID, state *WorkflowRuntimeState, et *protos.ExecutionTerminatedEvent) error { if !et.Recurse { return nil } - subOrchestrationInstances := getSubOrchestrationInstances(state.OldEvents, state.NewEvents) - for _, subOrchestrationInstance := range subOrchestrationInstances { + childWorkflowInstances := getChildWorkflowInstances(state.OldEvents, state.NewEvents) + for _, childWorkflowInstance := range childWorkflowInstances { e := &protos.HistoryEvent{ EventId: -1, Timestamp: timestamppb.Now(), @@ -235,30 +223,30 @@ func terminateSubOrchestrationInstances(ctx context.Context, be Backend, iid api }, }, } - // Adding terminate event to sub-orchestration instance - if err := be.AddNewOrchestrationEvent(ctx, subOrchestrationInstance, e); err != nil { - return fmt.Errorf("failed to submit termination request to sub-orchestration: %w", err) + // Adding terminate event to child workflow instance + if err := be.AddNewWorkflowEvent(ctx, childWorkflowInstance, e); err != nil { + return fmt.Errorf("failed to submit termination request to child workflow: %w", err) } } return nil } -// getSubOrchestrationInstances returns the instance IDs of all sub-orchestrations in the specified events. -func getSubOrchestrationInstances(oldEvents []*HistoryEvent, newEvents []*HistoryEvent) []api.InstanceID { - subOrchestrationInstancesMap := make(map[api.InstanceID]struct{}, len(oldEvents)+len(newEvents)) +// getChildWorkflowInstances returns the instance IDs of all child workflows in the specified events. +func getChildWorkflowInstances(oldEvents []*HistoryEvent, newEvents []*HistoryEvent) []api.InstanceID { + childWorkflowInstancesMap := make(map[api.InstanceID]struct{}, len(oldEvents)+len(newEvents)) for _, e := range oldEvents { - if created := e.GetSubOrchestrationInstanceCreated(); created != nil { - subOrchestrationInstancesMap[api.InstanceID(created.InstanceId)] = struct{}{} + if created := e.GetChildWorkflowInstanceCreated(); created != nil { + childWorkflowInstancesMap[api.InstanceID(created.InstanceId)] = struct{}{} } } for _, e := range newEvents { - if created := e.GetSubOrchestrationInstanceCreated(); created != nil { - subOrchestrationInstancesMap[api.InstanceID(created.InstanceId)] = struct{}{} + if created := e.GetChildWorkflowInstanceCreated(); created != nil { + childWorkflowInstancesMap[api.InstanceID(created.InstanceId)] = struct{}{} } } - subOrchestrationInstances := make([]api.InstanceID, 0, len(subOrchestrationInstancesMap)) - for orch := range subOrchestrationInstancesMap { - subOrchestrationInstances = append(subOrchestrationInstances, orch) + childWorkflowInstances := make([]api.InstanceID, 0, len(childWorkflowInstancesMap)) + for orch := range childWorkflowInstancesMap { + childWorkflowInstances = append(childWorkflowInstances, orch) } - return subOrchestrationInstances + return childWorkflowInstances } diff --git a/backend/client.go b/backend/client.go index 73636006..3f29ef7d 100644 --- a/backend/client.go +++ b/backend/client.go @@ -17,14 +17,14 @@ import ( ) type TaskHubClient interface { - ScheduleNewOrchestration(ctx context.Context, orchestrator interface{}, opts ...api.NewOrchestrationOptions) (api.InstanceID, error) + ScheduleNewWorkflow(ctx context.Context, workflow interface{}, opts ...api.NewWorkflowOptions) (api.InstanceID, error) FetchWorkflowMetadata(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) - WaitForOrchestrationStart(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) - WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) - TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error + WaitForWorkflowStart(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) + WaitForWorkflowCompletion(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) + TerminateWorkflow(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error RaiseEvent(ctx context.Context, id api.InstanceID, eventName string, opts ...api.RaiseEventOptions) error - SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) error - ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) error + SuspendWorkflow(ctx context.Context, id api.InstanceID, reason string) error + ResumeWorkflow(ctx context.Context, id api.InstanceID, reason string) error PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error RerunWorkflowFromEvent(ctx context.Context, source api.InstanceID, eventID uint32, opts ...api.RerunOptions) (api.InstanceID, error) } @@ -39,8 +39,8 @@ func NewTaskHubClient(be Backend) TaskHubClient { } } -func (c *backendClient) ScheduleNewOrchestration(ctx context.Context, orchestrator interface{}, opts ...api.NewOrchestrationOptions) (api.InstanceID, error) { - name := helpers.GetTaskFunctionName(orchestrator) +func (c *backendClient) ScheduleNewWorkflow(ctx context.Context, workflow interface{}, opts ...api.NewWorkflowOptions) (api.InstanceID, error) { + name := helpers.GetTaskFunctionName(workflow) req := &protos.CreateInstanceRequest{Name: name} for _, configure := range opts { if err := configure(req); err != nil { @@ -56,7 +56,7 @@ func (c *backendClient) ScheduleNewOrchestration(ctx context.Context, orchestrat } var span trace.Span - ctx, span = helpers.StartNewCreateOrchestrationSpan(ctx, req.Name, req.Version.GetValue(), req.InstanceId) + ctx, span = helpers.StartNewCreateWorkflowSpan(ctx, req.Name, req.Version.GetValue(), req.InstanceId) defer span.End() tc := helpers.TraceContextFromSpan(span) @@ -79,43 +79,43 @@ func (c *backendClient) ScheduleNewOrchestration(ctx context.Context, orchestrat if err := c.be.CreateWorkflowInstance(ctx, e); err != nil { span.RecordError(err) span.SetStatus(codes.Error, err.Error()) - return api.EmptyInstanceID, fmt.Errorf("failed to start orchestration: %w", err) + return api.EmptyInstanceID, fmt.Errorf("failed to start workflow: %w", err) } return api.InstanceID(req.InstanceId), nil } -// FetchWorkflowMetadata fetches metadata for the specified orchestration from the configured task hub. +// FetchWorkflowMetadata fetches metadata for the specified workflow from the configured task hub. // -// ErrInstanceNotFound is returned when the specified orchestration doesn't exist. +// ErrInstanceNotFound is returned when the specified workflow doesn't exist. func (c *backendClient) FetchWorkflowMetadata(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { metadata, err := c.be.GetWorkflowMetadata(ctx, id) if err != nil { - return nil, fmt.Errorf("failed to fetch orchestration metadata: %w", err) + return nil, fmt.Errorf("failed to fetch workflow metadata: %w", err) } return metadata, nil } -// WaitForOrchestrationStart waits for an orchestration to start running and returns an [WorkflowMetadata] object that contains +// WaitForWorkflowStart waits for a workflow to start running and returns an [WorkflowMetadata] object that contains // metadata about the started instance. // -// ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *backendClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { - return c.waitForOrchestrationCondition(ctx, id, func(metadata *WorkflowMetadata) bool { +// ErrInstanceNotFound is returned when the specified workflow doesn't exist. +func (c *backendClient) WaitForWorkflowStart(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { + return c.waitForWorkflowCondition(ctx, id, func(metadata *WorkflowMetadata) bool { return metadata.RuntimeStatus != protos.OrchestrationStatus_ORCHESTRATION_STATUS_PENDING }) } -// WaitForOrchestrationCompletion waits for an orchestration to complete and returns an [WorkflowMetadata] object that contains +// WaitForWorkflowCompletion waits for a workflow to complete and returns an [WorkflowMetadata] object that contains // metadata about the completed instance. // -// ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *backendClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { - return c.waitForOrchestrationCondition(ctx, id, api.WorkflowMetadataIsComplete) +// ErrInstanceNotFound is returned when the specified workflow doesn't exist. +func (c *backendClient) WaitForWorkflowCompletion(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { + return c.waitForWorkflowCondition(ctx, id, api.WorkflowMetadataIsComplete) } -func (c *backendClient) waitForOrchestrationCondition(ctx context.Context, id api.InstanceID, condition func(metadata *WorkflowMetadata) bool) (*WorkflowMetadata, error) { +func (c *backendClient) waitForWorkflowCondition(ctx context.Context, id api.InstanceID, condition func(metadata *WorkflowMetadata) bool) (*WorkflowMetadata, error) { var metadata *protos.WorkflowMetadata - err := c.be.WatchOrchestrationRuntimeStatus(ctx, id, func(m *WorkflowMetadata) bool { + err := c.be.WatchWorkflowRuntimeStatus(ctx, id, func(m *WorkflowMetadata) bool { metadata = m return condition(m) }) @@ -123,10 +123,10 @@ func (c *backendClient) waitForOrchestrationCondition(ctx context.Context, id ap return metadata, err } -// TerminateOrchestration enqueues a message to terminate a running orchestration, causing it to stop receiving new events and -// go directly into the TERMINATED state. This operation is asynchronous. An orchestration worker must -// dequeue the termination event before the orchestration will be terminated. -func (c *backendClient) TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error { +// TerminateWorkflow enqueues a message to terminate a running workflow, causing it to stop receiving new events and +// go directly into the TERMINATED state. This operation is asynchronous. An workflow worker must +// dequeue the termination event before the workflow will be terminated. +func (c *backendClient) TerminateWorkflow(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error { req := &protos.TerminateRequest{InstanceId: string(id), Recursive: true} for _, configure := range opts { if err := configure(req); err != nil { @@ -143,20 +143,20 @@ func (c *backendClient) TerminateOrchestration(ctx context.Context, id api.Insta }, }, } - if err := c.be.AddNewOrchestrationEvent(ctx, id, e); err != nil { + if err := c.be.AddNewWorkflowEvent(ctx, id, e); err != nil { return fmt.Errorf("failed to submit termination request:: %w", err) } return nil } -// RaiseEvent implements TaskHubClient and sends an asynchronous event notification to a waiting orchestration. +// RaiseEvent implements TaskHubClient and sends an asynchronous event notification to a waiting workflow. // -// In order to handle the event, the target orchestration instance must be waiting for an event named [eventName] -// using the [WaitForSingleEvent] method of the orchestration context parameter. If the target orchestration instance +// In order to handle the event, the target workflow instance must be waiting for an event named [eventName] +// using the [WaitForSingleEvent] method of the workflow context parameter. If the target workflow instance // is not yet waiting for an event named [eventName], then the event will be bufferred in memory until a task // subscribing to that event name is created. // -// Raised events for a completed or non-existent orchestration instance will be silently discarded. +// Raised events for a completed or non-existent workflow instance will be silently discarded. func (c *backendClient) RaiseEvent(ctx context.Context, id api.InstanceID, eventName string, opts ...api.RaiseEventOptions) error { req := &protos.RaiseEventRequest{InstanceId: string(id), Name: eventName} for _, configure := range opts { @@ -172,16 +172,16 @@ func (c *backendClient) RaiseEvent(ctx context.Context, id api.InstanceID, event EventRaised: &protos.EventRaisedEvent{Name: req.Name, Input: req.Input}, }, } - if err := c.be.AddNewOrchestrationEvent(ctx, id, e); err != nil { + if err := c.be.AddNewWorkflowEvent(ctx, id, e); err != nil { return fmt.Errorf("failed to raise event: %w", err) } return nil } -// SuspendOrchestration suspends an orchestration instance, halting processing of its events until a "resume" operation resumes it. +// SuspendWorkflow suspends a workflow instance, halting processing of its events until a "resume" operation resumes it. // -// Note that suspended orchestrations are still considered to be "running" even though they will not process events. -func (c *backendClient) SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) error { +// Note that suspended workflows are still considered to be "running" even though they will not process events. +func (c *backendClient) SuspendWorkflow(ctx context.Context, id api.InstanceID, reason string) error { var input *wrapperspb.StringValue if reason != "" { input = wrapperspb.String(reason) @@ -195,14 +195,14 @@ func (c *backendClient) SuspendOrchestration(ctx context.Context, id api.Instanc }, }, } - if err := c.be.AddNewOrchestrationEvent(ctx, id, e); err != nil { - return fmt.Errorf("failed to suspend orchestration: %w", err) + if err := c.be.AddNewWorkflowEvent(ctx, id, e); err != nil { + return fmt.Errorf("failed to suspend workflow: %w", err) } return nil } -// ResumeOrchestration resumes an orchestration instance that was previously suspended. -func (c *backendClient) ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) error { +// ResumeWorkflow resumes a workflow instance that was previously suspended. +func (c *backendClient) ResumeWorkflow(ctx context.Context, id api.InstanceID, reason string) error { var input *wrapperspb.StringValue if reason != "" { input = wrapperspb.String(reason) @@ -216,16 +216,16 @@ func (c *backendClient) ResumeOrchestration(ctx context.Context, id api.Instance }, }, } - if err := c.be.AddNewOrchestrationEvent(ctx, id, e); err != nil { - return fmt.Errorf("failed to resume orchestration: %w", err) + if err := c.be.AddNewWorkflowEvent(ctx, id, e); err != nil { + return fmt.Errorf("failed to resume workflow: %w", err) } return nil } -// PurgeWorkflowState deletes the state of the specified orchestration instance. +// PurgeWorkflowState deletes the state of the specified workflow instance. // -// [api.ErrInstanceNotFound] is returned if the specified orchestration instance doesn't exist. -// [api.ErrNotCompleted] is returned if the specified orchestration instance is still running. +// [api.ErrInstanceNotFound] is returned if the specified workflow instance doesn't exist. +// [api.ErrNotCompleted] is returned if the specified workflow instance is still running. func (c *backendClient) PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { req := &protos.PurgeInstancesRequest{Request: &protos.PurgeInstancesRequest_InstanceId{InstanceId: string(id)}, Recursive: true} for _, configure := range opts { @@ -234,7 +234,7 @@ func (c *backendClient) PurgeWorkflowState(ctx context.Context, id api.InstanceI } } if _, err := purgeWorkflowState(ctx, c.be, id, req.Recursive, req.GetForce()); err != nil { - return fmt.Errorf("failed to purge orchestration state: %w", err) + return fmt.Errorf("failed to purge workflow state: %w", err) } return nil } diff --git a/backend/executor.go b/backend/executor.go index 523c32a8..9fbbf0a8 100644 --- a/backend/executor.go +++ b/backend/executor.go @@ -27,7 +27,7 @@ var emptyCompleteTaskResponse = &protos.CompleteTaskResponse{} var errShuttingDown error = status.Error(codes.Canceled, "shutting down") -type pendingOrchestrator struct { +type pendingWorkflow struct { instanceID api.InstanceID streamID string } @@ -39,7 +39,7 @@ type pendingActivity struct { } type Executor interface { - ExecuteOrchestrator(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.OrchestratorResponse, error) + ExecuteWorkflow(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.WorkflowResponse, error) ExecuteActivity(context.Context, api.InstanceID, *protos.HistoryEvent) (*protos.HistoryEvent, error) Shutdown(ctx context.Context) error } @@ -48,7 +48,7 @@ type grpcExecutor struct { protos.UnimplementedTaskHubSidecarServiceServer workItemQueue chan *protos.WorkItem - pendingOrchestrators *sync.Map // map[api.InstanceID]*pendingOrchestrator + pendingWorkflows *sync.Map // map[api.InstanceID]*pendingWorkflow pendingActivities *sync.Map // map[string]*pendingActivity backend Backend logger Logger @@ -109,7 +109,7 @@ func NewGrpcExecutor(be Backend, logger Logger, opts ...grpcExecutorOptions) (ex workItemQueue: make(chan *protos.WorkItem), backend: be, logger: logger, - pendingOrchestrators: &sync.Map{}, + pendingWorkflows: &sync.Map{}, pendingActivities: &sync.Map{}, } @@ -122,11 +122,11 @@ func NewGrpcExecutor(be Backend, logger Logger, opts ...grpcExecutorOptions) (ex } } -// ExecuteOrchestrator implements Executor -func (executor *grpcExecutor) ExecuteOrchestrator(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.OrchestratorResponse, error) { - executor.pendingOrchestrators.Store(iid, &pendingOrchestrator{instanceID: iid}) +// ExecuteWorkflow implements Executor +func (executor *grpcExecutor) ExecuteWorkflow(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.WorkflowResponse, error) { + executor.pendingWorkflows.Store(iid, &pendingWorkflow{instanceID: iid}) - req := &protos.OrchestratorRequest{ + req := &protos.WorkflowRequest{ InstanceId: string(iid), ExecutionId: nil, PastEvents: oldEvents, @@ -134,31 +134,31 @@ func (executor *grpcExecutor) ExecuteOrchestrator(ctx context.Context, iid api.I } workItem := &protos.WorkItem{ - Request: &protos.WorkItem_OrchestratorRequest{ - OrchestratorRequest: req, + Request: &protos.WorkItem_WorkflowRequest{ + WorkflowRequest: req, }, } - wait := executor.backend.WaitForOrchestratorCompletion(req) + wait := executor.backend.WaitForWorkflowTaskCompletion(req) - // Send the orchestration execution work-item to the connected worker. + // Send the workflow execution work-item to the connected worker. // This will block if the worker isn't listening for work items. select { case <-ctx.Done(): - executor.logger.Warnf("%s: context canceled before dispatching orchestrator work item", iid) - return nil, fmt.Errorf("context canceled before dispatching orchestrator work item: %w", ctx.Err()) + executor.logger.Warnf("%s: context canceled before dispatching workflow work item", iid) + return nil, fmt.Errorf("context canceled before dispatching workflow work item: %w", ctx.Err()) case executor.workItemQueue <- workItem: } resp, err := wait(ctx) - // this orchestrator is either completed or cancelled, but its no longer pending, delete it - executor.pendingOrchestrators.Delete(iid) + // this workflow is either completed or cancelled, but its no longer pending, delete it + executor.pendingWorkflows.Delete(iid) if err != nil { if errors.Is(err, api.ErrTaskCancelled) { return nil, errors.New("operation aborted") } - executor.logger.Warnf("%s: failed before receiving orchestration result", iid) + executor.logger.Warnf("%s: failed before receiving workflow result", iid) return nil, err } @@ -176,7 +176,7 @@ func (executor *grpcExecutor) ExecuteActivity(ctx context.Context, iid api.Insta Name: task.Name, Version: task.Version, Input: task.Input, - OrchestrationInstance: &protos.OrchestrationInstance{InstanceId: string(iid)}, + WorkflowInstance: &protos.WorkflowInstance{InstanceId: string(iid)}, TaskId: e.EventId, TaskExecutionId: task.TaskExecutionId, ParentTraceContext: task.ParentTraceContext, @@ -258,12 +258,12 @@ func (g *grpcExecutor) Shutdown(ctx context.Context) error { } return true }) - g.pendingOrchestrators.Range(func(_, value any) bool { - p, ok := value.(*pendingOrchestrator) + g.pendingWorkflows.Range(func(_, value any) bool { + p, ok := value.(*pendingWorkflow) if ok { - err := g.backend.CancelOrchestratorTask(ctx, p.instanceID) + err := g.backend.CancelWorkflowTask(ctx, p.instanceID) if err != nil { - g.logger.Warnf("failed to cancel orchestrator task: %v", err) + g.logger.Warnf("failed to cancel workflow task: %v", err) } } return true @@ -311,12 +311,12 @@ func (g *grpcExecutor) GetWorkItems(req *protos.GetWorkItemsRequest, stream prot } return true }) - g.pendingOrchestrators.Range(func(key, value any) bool { - if p, ok := value.(*pendingOrchestrator); ok && p.streamID == streamID { - g.logger.Debugf("cleaning up pending orchestrator: %s", key) - err := g.backend.CancelOrchestratorTask(context.Background(), p.instanceID) + g.pendingWorkflows.Range(func(key, value any) bool { + if p, ok := value.(*pendingWorkflow); ok && p.streamID == streamID { + g.logger.Debugf("cleaning up pending workflow: %s", key) + err := g.backend.CancelWorkflowTask(context.Background(), p.instanceID) if err != nil { - g.logger.Warnf("failed to cancel orchestrator task: %v", err) + g.logger.Warnf("failed to cancel workflow task: %v", err) } } return true @@ -351,15 +351,15 @@ func (g *grpcExecutor) GetWorkItems(req *protos.GetWorkItemsRequest, stream prot } switch x := wi.Request.(type) { - case *protos.WorkItem_OrchestratorRequest: - key := x.OrchestratorRequest.GetInstanceId() - if value, ok := g.pendingOrchestrators.Load(api.InstanceID(key)); ok { - if p, ok := value.(*pendingOrchestrator); ok { + case *protos.WorkItem_WorkflowRequest: + key := x.WorkflowRequest.GetInstanceId() + if value, ok := g.pendingWorkflows.Load(api.InstanceID(key)); ok { + if p, ok := value.(*pendingWorkflow); ok { p.streamID = streamID } } case *protos.WorkItem_ActivityRequest: - key := GetActivityExecutionKey(x.ActivityRequest.GetOrchestrationInstance().GetInstanceId(), x.ActivityRequest.GetTaskId()) + key := GetActivityExecutionKey(x.ActivityRequest.GetWorkflowInstance().GetInstanceId(), x.ActivityRequest.GetTaskId()) if value, ok := g.pendingActivities.Load(key); ok { if p, ok := value.(*pendingActivity); ok { p.streamID = streamID @@ -421,9 +421,9 @@ func (g *grpcExecutor) executeOnWorkItemDisconnect(ctx context.Context) error { return nil } -// CompleteOrchestratorTask implements protos.TaskHubSidecarServiceServer -func (g *grpcExecutor) CompleteOrchestratorTask(ctx context.Context, res *protos.OrchestratorResponse) (*protos.CompleteTaskResponse, error) { - return emptyCompleteTaskResponse, g.backend.CompleteOrchestratorTask(ctx, res) +// CompleteWorkflowTask implements protos.TaskHubSidecarServiceServer +func (g *grpcExecutor) CompleteWorkflowTask(ctx context.Context, res *protos.WorkflowResponse) (*protos.CompleteTaskResponse, error) { + return emptyCompleteTaskResponse, g.backend.CompleteWorkflowTask(ctx, res) } // CompleteActivityTask implements protos.TaskHubSidecarServiceServer @@ -437,7 +437,7 @@ func GetActivityExecutionKey(iid string, taskID int32) string { // GetInstance implements protos.TaskHubSidecarServiceServer func (g *grpcExecutor) GetInstance(ctx context.Context, req *protos.GetInstanceRequest) (*protos.GetInstanceResponse, error) { - metadata, err := g.backend.GetOrchestrationMetadata(ctx, api.InstanceID(req.InstanceId)) + metadata, err := g.backend.GetWorkflowMetadata(ctx, api.InstanceID(req.InstanceId)) if err != nil { if errors.Is(err, api.ErrInstanceNotFound) { return &protos.GetInstanceResponse{Exists: false}, nil @@ -457,10 +457,10 @@ func (g *grpcExecutor) PurgeInstances(ctx context.Context, req *protos.PurgeInst if req.GetPurgeInstanceFilter() != nil { return nil, errors.New("multi-instance purge is not unimplemented") } - count, err := purgeOrchestrationState(ctx, g.backend, api.InstanceID(req.GetInstanceId()), req.Recursive, req.GetForce()) + count, err := purgeWorkflowState(ctx, g.backend, api.InstanceID(req.GetInstanceId()), req.Recursive, req.GetForce()) resp := &protos.PurgeInstancesResponse{DeletedInstanceCount: int32(count)} if err != nil { - return resp, fmt.Errorf("failed to purge orchestration state: %w", err) + return resp, fmt.Errorf("failed to purge workflow state: %w", err) } return resp, nil @@ -475,7 +475,7 @@ func (g *grpcExecutor) RaiseEvent(ctx context.Context, req *protos.RaiseEventReq EventRaised: &protos.EventRaisedEvent{Name: req.Name, Input: req.Input}, }, } - if err := g.backend.AddNewOrchestrationEvent(ctx, api.InstanceID(req.InstanceId), e); err != nil { + if err := g.backend.AddNewWorkflowEvent(ctx, api.InstanceID(req.InstanceId), e); err != nil { return nil, err } @@ -493,7 +493,7 @@ func (g *grpcExecutor) StartInstance(ctx context.Context, req *protos.CreateInst } instanceID := req.InstanceId - ctx, span := helpers.StartNewCreateOrchestrationSpan(ctx, req.Name, req.Version.GetValue(), instanceID) + ctx, span := helpers.StartNewCreateWorkflowSpan(ctx, req.Name, req.Version.GetValue(), instanceID) defer span.End() e := &protos.HistoryEvent{ @@ -503,7 +503,7 @@ func (g *grpcExecutor) StartInstance(ctx context.Context, req *protos.CreateInst ExecutionStarted: &protos.ExecutionStartedEvent{ Name: req.Name, Input: req.Input, - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: instanceID, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -512,8 +512,8 @@ func (g *grpcExecutor) StartInstance(ctx context.Context, req *protos.CreateInst }, }, } - if err := g.backend.CreateOrchestrationInstance(ctx, e, WithOrchestrationIdReusePolicy(req.OrchestrationIdReusePolicy)); err != nil { - return nil, fmt.Errorf("failed to create orchestration instance: %w", err) + if err := g.backend.CreateWorkflowInstance(ctx, e); err != nil { + return nil, fmt.Errorf("failed to create workflow instance: %w", err) } if req.ScheduledStartTimestamp == nil && !g.skipWaitForInstanceStart { @@ -564,7 +564,7 @@ func (g *grpcExecutor) TerminateInstance(ctx context.Context, req *protos.Termin }, }, } - if err := g.backend.AddNewOrchestrationEvent(ctx, api.InstanceID(req.InstanceId), e); err != nil { + if err := g.backend.AddNewWorkflowEvent(ctx, api.InstanceID(req.InstanceId), e); err != nil { return nil, fmt.Errorf("failed to submit termination request: %w", err) } @@ -588,15 +588,15 @@ func (g *grpcExecutor) SuspendInstance(ctx context.Context, req *protos.SuspendR }, }, } - if err := g.backend.AddNewOrchestrationEvent(ctx, api.InstanceID(req.InstanceId), e); err != nil { + if err := g.backend.AddNewWorkflowEvent(ctx, api.InstanceID(req.InstanceId), e); err != nil { return nil, err } _, err := g.waitForInstance(ctx, &protos.GetInstanceRequest{ InstanceId: req.InstanceId, - }, func(metadata *OrchestrationMetadata) bool { + }, func(metadata *WorkflowMetadata) bool { return metadata.RuntimeStatus == protos.OrchestrationStatus_ORCHESTRATION_STATUS_SUSPENDED || - api.OrchestrationMetadataIsComplete(metadata) + api.WorkflowMetadataIsComplete(metadata) }) return &protos.SuspendResponse{}, err @@ -617,15 +617,15 @@ func (g *grpcExecutor) ResumeInstance(ctx context.Context, req *protos.ResumeReq }, }, } - if err := g.backend.AddNewOrchestrationEvent(ctx, api.InstanceID(req.InstanceId), e); err != nil { + if err := g.backend.AddNewWorkflowEvent(ctx, api.InstanceID(req.InstanceId), e); err != nil { return nil, err } _, err := g.waitForInstance(ctx, &protos.GetInstanceRequest{ InstanceId: req.InstanceId, - }, func(metadata *OrchestrationMetadata) bool { + }, func(metadata *WorkflowMetadata) bool { return metadata.RuntimeStatus == protos.OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING || - api.OrchestrationMetadataIsComplete(metadata) + api.WorkflowMetadataIsComplete(metadata) }) return &protos.ResumeResponse{}, err @@ -633,21 +633,21 @@ func (g *grpcExecutor) ResumeInstance(ctx context.Context, req *protos.ResumeReq // WaitForInstanceCompletion implements protos.TaskHubSidecarServiceServer func (g *grpcExecutor) WaitForInstanceCompletion(ctx context.Context, req *protos.GetInstanceRequest) (*protos.GetInstanceResponse, error) { - return g.waitForInstance(ctx, req, api.OrchestrationMetadataIsComplete) + return g.waitForInstance(ctx, req, api.WorkflowMetadataIsComplete) } // WaitForInstanceStart implements protos.TaskHubSidecarServiceServer func (g *grpcExecutor) WaitForInstanceStart(ctx context.Context, req *protos.GetInstanceRequest) (*protos.GetInstanceResponse, error) { - return g.waitForInstance(ctx, req, func(m *OrchestrationMetadata) bool { + return g.waitForInstance(ctx, req, func(m *WorkflowMetadata) bool { return m.RuntimeStatus != protos.OrchestrationStatus_ORCHESTRATION_STATUS_PENDING }) } -func (g *grpcExecutor) waitForInstance(ctx context.Context, req *protos.GetInstanceRequest, condition func(*OrchestrationMetadata) bool) (*protos.GetInstanceResponse, error) { +func (g *grpcExecutor) waitForInstance(ctx context.Context, req *protos.GetInstanceRequest, condition func(*WorkflowMetadata) bool) (*protos.GetInstanceResponse, error) { iid := api.InstanceID(req.InstanceId) - var metadata *protos.OrchestrationMetadata - err := g.backend.WatchOrchestrationRuntimeStatus(ctx, iid, func(m *OrchestrationMetadata) bool { + var metadata *protos.WorkflowMetadata + err := g.backend.WatchWorkflowRuntimeStatus(ctx, iid, func(m *WorkflowMetadata) bool { metadata = m return condition(m) }) @@ -662,11 +662,11 @@ func (g *grpcExecutor) waitForInstance(ctx context.Context, req *protos.GetInsta return createGetInstanceResponse(req, metadata), nil } -func createGetInstanceResponse(req *protos.GetInstanceRequest, metadata *OrchestrationMetadata) *protos.GetInstanceResponse { - state := &protos.OrchestrationState{ +func createGetInstanceResponse(req *protos.GetInstanceRequest, metadata *WorkflowMetadata) *protos.GetInstanceResponse { + state := &protos.WorkflowState{ InstanceId: req.InstanceId, Name: metadata.Name, - OrchestrationStatus: metadata.RuntimeStatus, + WorkflowStatus: metadata.RuntimeStatus, CreatedTimestamp: metadata.CreatedAt, LastUpdatedTimestamp: metadata.LastUpdatedAt, } @@ -678,6 +678,6 @@ func createGetInstanceResponse(req *protos.GetInstanceRequest, metadata *Orchest state.FailureDetails = metadata.FailureDetails } - return &protos.GetInstanceResponse{Exists: true, OrchestrationState: state} + return &protos.GetInstanceResponse{Exists: true, WorkflowState: state} } diff --git a/backend/local/task.go b/backend/local/task.go index 6d1666ea..5f957792 100644 --- a/backend/local/task.go +++ b/backend/local/task.go @@ -9,8 +9,8 @@ import ( "github.com/dapr/durabletask-go/backend" ) -type pendingOrchestrator struct { - response *protos.OrchestratorResponse +type pendingWorkflow struct { + response *protos.WorkflowResponse complete chan struct{} } @@ -20,13 +20,13 @@ type pendingActivity struct { } type TasksBackend struct { - pendingOrchestrators *sync.Map + pendingWorkflows *sync.Map pendingActivities *sync.Map } func NewTasksBackend() *TasksBackend { return &TasksBackend{ - pendingOrchestrators: &sync.Map{}, + pendingWorkflows: &sync.Map{}, pendingActivities: &sync.Map{}, } } @@ -47,7 +47,7 @@ func (be *TasksBackend) CancelActivityTask(ctx context.Context, instanceID api.I } func (be *TasksBackend) WaitForActivityCompletion(request *protos.ActivityRequest) func(context.Context) (*protos.ActivityResponse, error) { - key := backend.GetActivityExecutionKey(request.GetOrchestrationInstance().GetInstanceId(), request.GetTaskId()) + key := backend.GetActivityExecutionKey(request.GetWorkflowInstance().GetInstanceId(), request.GetTaskId()) pending := &pendingActivity{ response: nil, complete: make(chan struct{}, 1), @@ -67,28 +67,28 @@ func (be *TasksBackend) WaitForActivityCompletion(request *protos.ActivityReques } } -func (be *TasksBackend) CompleteOrchestratorTask(ctx context.Context, response *protos.OrchestratorResponse) error { - if be.deletePendingOrchestrator(response.GetInstanceId(), response) { +func (be *TasksBackend) CompleteWorkflowTask(ctx context.Context, response *protos.WorkflowResponse) error { + if be.deletePendingWorkflow(response.GetInstanceId(), response) { return nil } return api.NewUnknownInstanceIDError(response.GetInstanceId()) } -func (be *TasksBackend) CancelOrchestratorTask(ctx context.Context, instanceID api.InstanceID) error { - if be.deletePendingOrchestrator(string(instanceID), nil) { +func (be *TasksBackend) CancelWorkflowTask(ctx context.Context, instanceID api.InstanceID) error { + if be.deletePendingWorkflow(string(instanceID), nil) { return nil } return api.NewUnknownInstanceIDError(instanceID.String()) } -func (be *TasksBackend) WaitForOrchestratorCompletion(request *protos.OrchestratorRequest) func(context.Context) (*protos.OrchestratorResponse, error) { - pending := &pendingOrchestrator{ +func (be *TasksBackend) WaitForWorkflowTaskCompletion(request *protos.WorkflowRequest) func(context.Context) (*protos.WorkflowResponse, error) { + pending := &pendingWorkflow{ response: nil, complete: make(chan struct{}, 1), } - be.pendingOrchestrators.Store(request.GetInstanceId(), pending) + be.pendingWorkflows.Store(request.GetInstanceId(), pending) - return func(ctx context.Context) (*protos.OrchestratorResponse, error) { + return func(ctx context.Context) (*protos.WorkflowResponse, error) { select { case <-ctx.Done(): return nil, ctx.Err() @@ -115,14 +115,14 @@ func (be *TasksBackend) deletePendingActivityTask(iid string, taskID int32, res return true } -func (be *TasksBackend) deletePendingOrchestrator(instanceID string, res *protos.OrchestratorResponse) bool { - p, ok := be.pendingOrchestrators.LoadAndDelete(instanceID) +func (be *TasksBackend) deletePendingWorkflow(instanceID string, res *protos.WorkflowResponse) bool { + p, ok := be.pendingWorkflows.LoadAndDelete(instanceID) if !ok { return false } // Note that res can be nil in case of certain failures - pending := p.(*pendingOrchestrator) + pending := p.(*pendingWorkflow) pending.response = res close(pending.complete) return true diff --git a/backend/orchestration.go b/backend/orchestration.go index 59753398..c37a5dbf 100644 --- a/backend/orchestration.go +++ b/backend/orchestration.go @@ -17,51 +17,51 @@ import ( "github.com/dapr/durabletask-go/backend/runtimestate" ) -type OrchestratorExecutor interface { - ExecuteOrchestrator( +type WorkflowExecutor interface { + ExecuteWorkflow( ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, - newEvents []*protos.HistoryEvent) (*protos.OrchestratorResponse, error) + newEvents []*protos.HistoryEvent) (*protos.WorkflowResponse, error) } -type OrchestratorOptions struct { +type WorkflowWorkerOptions struct { Backend Backend - Executor OrchestratorExecutor + Executor WorkflowExecutor Logger Logger AppID string } -type orchestratorProcessor struct { +type workflowProcessor struct { be Backend - executor OrchestratorExecutor + executor WorkflowExecutor logger Logger applier *runtimestate.Applier } -func NewOrchestrationWorker(opts OrchestratorOptions, taskopts ...NewTaskWorkerOptions) TaskWorker[*OrchestrationWorkItem] { - processor := &orchestratorProcessor{ +func NewWorkflowWorker(opts WorkflowWorkerOptions, taskopts ...NewTaskWorkerOptions) TaskWorker[*WorkflowWorkItem] { + processor := &workflowProcessor{ be: opts.Backend, executor: opts.Executor, logger: opts.Logger, applier: runtimestate.NewApplier(opts.AppID), } - return NewTaskWorker[*OrchestrationWorkItem](processor, opts.Logger, taskopts...) + return NewTaskWorker[*WorkflowWorkItem](processor, opts.Logger, taskopts...) } // Name implements TaskProcessor -func (*orchestratorProcessor) Name() string { - return "orchestration-processor" +func (*workflowProcessor) Name() string { + return "workflow-processor" } // NextWorkItem implements TaskProcessor -func (p *orchestratorProcessor) NextWorkItem(ctx context.Context) (*OrchestrationWorkItem, error) { - return p.be.NextOrchestrationWorkItem(ctx) +func (p *workflowProcessor) NextWorkItem(ctx context.Context) (*WorkflowWorkItem, error) { + return p.be.NextWorkflowWorkItem(ctx) } // ProcessWorkItem implements TaskProcessor -func (w *orchestratorProcessor) ProcessWorkItem(ctx context.Context, wi *OrchestrationWorkItem) error { +func (w *workflowProcessor) ProcessWorkItem(ctx context.Context, wi *WorkflowWorkItem) error { w.logger.Debugf("%v: received work item with %d new event(s): %v", wi.InstanceID, len(wi.NewEvents), helpers.HistoryListSummary(wi.NewEvents)) // TODO: Caching @@ -69,13 +69,13 @@ func (w *orchestratorProcessor) ProcessWorkItem(ctx context.Context, wi *Orchest // so that we can skip the loading of state and/or the creation of executors. A cached // executor should allow us to 1) skip runtime state loading and 2) execute only new events. if wi.State == nil { - if state, err := w.be.GetOrchestrationRuntimeState(ctx, wi); err != nil { - return fmt.Errorf("failed to load orchestration state: %w", err) + if state, err := w.be.GetWorkflowRuntimeState(ctx, wi); err != nil { + return fmt.Errorf("failed to load workflow state: %w", err) } else { wi.State = state } } - w.logger.Debugf("%v: got orchestration runtime state: %s", wi.InstanceID, getOrchestrationStateDescription(wi)) + w.logger.Debugf("%v: got workflow runtime state: %s", wi.InstanceID, getWorkflowStateDescription(wi)) var terminateEvent *protos.ExecutionTerminatedEvent = nil for _, e := range wi.NewEvents { @@ -87,26 +87,26 @@ func (w *orchestratorProcessor) ProcessWorkItem(ctx context.Context, wi *Orchest if ctx, span, ok := w.applyWorkItem(ctx, wi); ok { defer func() { // Note that the span and ctx references may be updated inside the continue-as-new loop. - w.endOrchestratorSpan(ctx, wi, span, false) + w.endWorkflowSpan(ctx, wi, span, false) }() for continueAsNewCount := 0; ; continueAsNewCount++ { if continueAsNewCount > 0 { w.logger.Debugf("%v: continuing-as-new with %d event(s): %s", wi.InstanceID, len(wi.State.NewEvents), helpers.HistoryListSummary(wi.State.NewEvents)) } else { - w.logger.Debugf("%v: invoking orchestrator", wi.InstanceID) + w.logger.Debugf("%v: invoking workflow", wi.InstanceID) } - // Run the user orchestrator code, providing the old history and new events together. - results, err := w.executor.ExecuteOrchestrator(ctx, wi.InstanceID, wi.State.OldEvents, wi.State.NewEvents) + // Run the user workflow code, providing the old history and new events together. + results, err := w.executor.ExecuteWorkflow(ctx, wi.InstanceID, wi.State.OldEvents, wi.State.NewEvents) if err != nil { - return fmt.Errorf("error executing orchestrator: %w", err) + return fmt.Errorf("error executing workflow: %w", err) } - w.logger.Debugf("%v: orchestrator returned %d action(s): %s", wi.InstanceID, len(results.Actions), helpers.ActionListSummary(results.Actions)) + w.logger.Debugf("%v: workflow returned %d action(s): %s", wi.InstanceID, len(results.Actions), helpers.ActionListSummary(results.Actions)) if version := results.GetVersion(); version != nil && (version.GetPatches() != nil || version.Name != nil) { for _, e := range wi.State.NewEvents { - if os := e.GetOrchestratorStarted(); os != nil { + if os := e.GetWorkflowStarted(); os != nil { os.Version = version if len(version.GetPatches()) > 0 { span.SetAttributes(attribute.StringSlice("applied_patches", version.GetPatches())) @@ -116,14 +116,14 @@ func (w *orchestratorProcessor) ProcessWorkItem(ctx context.Context, wi *Orchest } } - // Apply the orchestrator outputs to the orchestration state. + // Apply the workflow outputs to the workflow state. continuedAsNew, err := w.applier.Actions(wi.State, results.CustomStatus, results.Actions, helpers.TraceContextFromSpan(span)) if err != nil { return fmt.Errorf("failed to apply the execution result actions: %w", err) } - // When continuing-as-new, we re-execute the orchestrator from the beginning with a truncated state in a tight loop - // until the orchestrator performs some non-continue-as-new action. + // When continuing-as-new, we re-execute the workflow from the beginning with a truncated state in a tight loop + // until the workflow performs some non-continue-as-new action. if continuedAsNew { const MaxContinueAsNewCount = 20 if continueAsNewCount >= MaxContinueAsNewCount { @@ -131,8 +131,8 @@ func (w *orchestratorProcessor) ProcessWorkItem(ctx context.Context, wi *Orchest } // We create a new trace span for every continue-as-new - w.endOrchestratorSpan(ctx, wi, span, true) - ctx, span = w.startOrResumeOrchestratorSpan(ctx, wi) + w.endWorkflowSpan(ctx, wi, span, true) + ctx, span = w.startOrResumeWorkflowSpan(ctx, wi) continue } @@ -144,7 +144,7 @@ func (w *orchestratorProcessor) ProcessWorkItem(ctx context.Context, wi *Orchest } } if terminateEvent != nil && runtimestate.IsCompleted(wi.State) { - if err := terminateSubOrchestrationInstances(ctx, w.be, wi.InstanceID, wi.State, terminateEvent); err != nil { + if err := terminateChildWorkflowInstances(ctx, w.be, wi.InstanceID, wi.State, terminateEvent); err != nil { return err } } @@ -152,46 +152,46 @@ func (w *orchestratorProcessor) ProcessWorkItem(ctx context.Context, wi *Orchest } // CompleteWorkItem implements TaskProcessor -func (p *orchestratorProcessor) CompleteWorkItem(ctx context.Context, wi *OrchestrationWorkItem) error { - return p.be.CompleteOrchestrationWorkItem(ctx, wi) +func (p *workflowProcessor) CompleteWorkItem(ctx context.Context, wi *WorkflowWorkItem) error { + return p.be.CompleteWorkflowWorkItem(ctx, wi) } // AbandonWorkItem implements TaskProcessor -func (p *orchestratorProcessor) AbandonWorkItem(ctx context.Context, wi *OrchestrationWorkItem) error { - return p.be.AbandonOrchestrationWorkItem(ctx, wi) +func (p *workflowProcessor) AbandonWorkItem(ctx context.Context, wi *WorkflowWorkItem) error { + return p.be.AbandonWorkflowWorkItem(ctx, wi) } -func (w *orchestratorProcessor) applyWorkItem(ctx context.Context, wi *OrchestrationWorkItem) (context.Context, trace.Span, bool) { - // Ignore work items for orchestrations that are completed or are in a corrupted state. +func (w *workflowProcessor) applyWorkItem(ctx context.Context, wi *WorkflowWorkItem) (context.Context, trace.Span, bool) { + // Ignore work items for workflows that are completed or are in a corrupted state. if !runtimestate.IsValid(wi.State) { - w.logger.Warnf("%v: orchestration state is invalid; dropping work item", wi.InstanceID) + w.logger.Warnf("%v: workflow state is invalid; dropping work item", wi.InstanceID) return nil, nil, false } else if runtimestate.IsCompleted(wi.State) { - w.logger.Warnf("%v: orchestration already completed; dropping work item", wi.InstanceID) + w.logger.Warnf("%v: workflow already completed; dropping work item", wi.InstanceID) return nil, nil, false } else if len(wi.NewEvents) == 0 { w.logger.Warnf("%v: the work item had no events!", wi.InstanceID) } - // The orchestrator started event is used primarily for updating the current time as reported - // by the orchestration context APIs. + // The workflow started event is used primarily for updating the current time as reported + // by the workflow context APIs. _ = runtimestate.AddEvent(wi.State, &protos.HistoryEvent{ EventId: -1, Timestamp: timestamppb.Now(), - EventType: &protos.HistoryEvent_OrchestratorStarted{ - OrchestratorStarted: &protos.OrchestratorStartedEvent{}, + EventType: &protos.HistoryEvent_WorkflowStarted{ + WorkflowStarted: &protos.WorkflowStartedEvent{}, }, }) - // Each orchestration instance gets its own distributed tracing span. However, the implementation of - // endOrchestratorSpan will "cancel" the span mark the span as "unsampled" if the orchestration isn't - // complete. This is part of the strategy for producing one span for the entire orchestration execution, + // Each workflow instance gets its own distributed tracing span. However, the implementation of + // endWorkflowSpan will "cancel" the span mark the span as "unsampled" if the workflow isn't + // complete. This is part of the strategy for producing one span for the entire workflow execution, // which isn't something that's natively supported by OTel today. - ctx, span := w.startOrResumeOrchestratorSpan(ctx, wi) + ctx, span := w.startOrResumeWorkflowSpan(ctx, wi) - // New events from the work item are appended to the orchestration state, with duplicates automatically + // New events from the work item are appended to the workflow state, with duplicates automatically // filtered out. If all events are filtered out, return false so that the caller knows not to execute - // the orchestration logic for an empty set of events. + // the workflow logic for an empty set of events. for _, e := range wi.NewEvents { if err := runtimestate.AddEvent(wi.State, e); err != nil { if err == runtimestate.ErrDuplicateEvent { @@ -203,7 +203,7 @@ func (w *orchestratorProcessor) applyWorkItem(ctx context.Context, wi *Orchestra // Special case logic for specific event types if es := e.GetExecutionStarted(); es != nil { - w.logger.Infof("%v: starting new '%s' instance with ID = '%s'.", wi.InstanceID, es.Name, es.OrchestrationInstance.InstanceId) + w.logger.Infof("%v: starting new '%s' instance with ID = '%s'.", wi.InstanceID, es.Name, es.WorkflowInstance.InstanceId) } else if timerFired := e.GetTimerFired(); timerFired != nil { // Timer spans are created and completed once the TimerFired event is received. // TODO: Ideally we don't emit spans for cancelled timers. Is there a way to support this? @@ -221,7 +221,7 @@ func (w *orchestratorProcessor) applyWorkItem(ctx context.Context, wi *Orchestra return ctx, span, true } -func getOrchestrationStateDescription(wi *OrchestrationWorkItem) string { +func getWorkflowStateDescription(wi *WorkflowWorkItem) string { name, err := runtimestate.Name(wi.State) if err != nil { if len(wi.NewEvents) > 0 { @@ -245,7 +245,7 @@ func getOrchestrationStateDescription(wi *OrchestrationWorkItem) string { return fmt.Sprintf("name=%s, status=%s, events=%d, age=%s", name, status, len(wi.State.OldEvents), ageStr) } -func (w *orchestratorProcessor) startOrResumeOrchestratorSpan(ctx context.Context, wi *OrchestrationWorkItem) (context.Context, trace.Span) { +func (w *workflowProcessor) startOrResumeWorkflowSpan(ctx context.Context, wi *WorkflowWorkItem) (context.Context, trace.Span) { // Get the trace context from the ExecutionStarted history event var ptc *protos.TraceContext var es *protos.ExecutionStartedEvent @@ -272,27 +272,27 @@ func (w *orchestratorProcessor) startOrResumeOrchestratorSpan(ctx context.Contex // start a new span from the updated go context var span trace.Span - ctx, span = helpers.StartNewRunOrchestrationSpan(ctx, es, runtimestate.GetStartedTime(wi.State)) + ctx, span = helpers.StartNewRunWorkflowSpan(ctx, es, runtimestate.GetStartedTime(wi.State)) - // Assign or rehydrate the long-running orchestration span ID - if es.OrchestrationSpanID == nil { - // On the initial execution, assign the orchestration span ID to be the - // randomly generated span ID value. This will be persisted in the orchestration history + // Assign or rehydrate the long-running workflow span ID + if es.WorkflowSpanID == nil { + // On the initial execution, assign the workflow span ID to be the + // randomly generated span ID value. This will be persisted in the workflow history // and referenced on the next replay. - es.OrchestrationSpanID = wrapperspb.String(span.SpanContext().SpanID().String()) + es.WorkflowSpanID = wrapperspb.String(span.SpanContext().SpanID().String()) } else { - // On subsequent executions, replace the auto-generated span ID with the orchestration + // On subsequent executions, replace the auto-generated span ID with the workflow // span ID. This allows us to have one long-running span that survives multiple replays // and process failures. - if orchestratorSpanID, err := trace.SpanIDFromHex(es.OrchestrationSpanID.Value); err == nil { - helpers.ChangeSpanID(span, orchestratorSpanID) + if workflowSpanID, err := trace.SpanIDFromHex(es.WorkflowSpanID.Value); err == nil { + helpers.ChangeSpanID(span, workflowSpanID) } } return ctx, span } -func (w *orchestratorProcessor) endOrchestratorSpan(ctx context.Context, wi *OrchestrationWorkItem, span trace.Span, continuedAsNew bool) { +func (w *workflowProcessor) endWorkflowSpan(ctx context.Context, wi *WorkflowWorkItem, span trace.Span, continuedAsNew bool) { if runtimestate.IsCompleted(wi.State) { if fd, err := runtimestate.FailureDetails(wi.State); err == nil { span.SetStatus(codes.Error, fd.ErrorMessage) @@ -309,7 +309,7 @@ func (w *orchestratorProcessor) endOrchestratorSpan(ctx context.Context, wi *Orc Value: attribute.StringValue(helpers.ToRuntimeStatusString(protos.OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW)), }) } else { - // Cancel the span - we want to publish it only when an orchestration + // Cancel the span - we want to publish it only when a workflow // completes or when it continue-as-new's. helpers.CancelSpan(span) } diff --git a/backend/postgres/postgres.go b/backend/postgres/postgres.go index a3f08efc..c016299a 100644 --- a/backend/postgres/postgres.go +++ b/backend/postgres/postgres.go @@ -9,7 +9,6 @@ import ( "strings" "time" - "github.com/cenkalti/backoff/v4" "github.com/dapr/durabletask-go/api" "github.com/dapr/durabletask-go/api/helpers" "github.com/dapr/durabletask-go/api/protos" @@ -23,6 +22,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" "google.golang.org/protobuf/types/known/wrapperspb" + backoff "github.com/cenkalti/backoff/v4" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" ) @@ -36,7 +36,7 @@ var errNoWorkItems = errors.New("no work items were found") type PostgresOptions struct { PgOptions *pgxpool.Config - OrchestrationLockTimeout time.Duration + WorkflowLockTimeout time.Duration ActivityLockTimeout time.Duration } @@ -61,7 +61,7 @@ func NewPostgresOptions(host string, port uint16, database string, user string, return &PostgresOptions{ PgOptions: conf, - OrchestrationLockTimeout: 2 * time.Minute, + WorkflowLockTimeout: 2 * time.Minute, ActivityLockTimeout: 2 * time.Minute, } } @@ -122,7 +122,7 @@ func (be *postgresBackend) NextActivityWorkItem(ctx context.Context) (*backend.A } } -func (be *postgresBackend) NextOrchestrationWorkItem(ctx context.Context) (*backend.OrchestrationWorkItem, error) { +func (be *postgresBackend) NextWorkflowWorkItem(ctx context.Context) (*backend.WorkflowWorkItem, error) { b := backoff.WithContext(&backoff.ExponentialBackOff{ InitialInterval: 50 * time.Millisecond, MaxInterval: 5 * time.Second, @@ -133,7 +133,7 @@ func (be *postgresBackend) NextOrchestrationWorkItem(ctx context.Context) (*back }, ctx) for { - wi, err := be.GetOrchestrationWorkItem(ctx) + wi, err := be.GetWorkflowWorkItem(ctx) if err == nil { return wi, nil } @@ -155,7 +155,7 @@ func (be *postgresBackend) NextOrchestrationWorkItem(ctx context.Context) (*back } } -func (be *postgresBackend) WatchOrchestrationRuntimeStatus(ctx context.Context, id api.InstanceID, fn func(*backend.OrchestrationMetadata) bool) error { +func (be *postgresBackend) WatchWorkflowRuntimeStatus(ctx context.Context, id api.InstanceID, fn func(*backend.WorkflowMetadata) bool) error { b := backoff.ExponentialBackOff{ InitialInterval: 100 * time.Millisecond, MaxInterval: 10 * time.Second, @@ -176,7 +176,7 @@ func (be *postgresBackend) WatchOrchestrationRuntimeStatus(ctx context.Context, } return ctx.Err() case <-t.C: - meta, err := be.GetOrchestrationMetadata(ctx, id) + meta, err := be.GetWorkflowMetadata(ctx, id) if err != nil { return err } @@ -238,8 +238,8 @@ func (be *postgresBackend) DeleteTaskHub(ctx context.Context) error { return nil } -// AbandonOrchestrationWorkItem implements backend.Backend -func (be *postgresBackend) AbandonOrchestrationWorkItem(ctx context.Context, wi *backend.OrchestrationWorkItem) error { +// AbandonWorkflowWorkItem implements backend.Backend +func (be *postgresBackend) AbandonWorkflowWorkItem(ctx context.Context, wi *backend.WorkflowWorkItem) error { if err := be.ensureDB(); err != nil { return err } @@ -299,8 +299,8 @@ func (be *postgresBackend) AbandonOrchestrationWorkItem(ctx context.Context, wi return nil } -// CompleteOrchestrationWorkItem implements backend.Backend -func (be *postgresBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi *backend.OrchestrationWorkItem) error { +// CompleteWorkflowWorkItem implements backend.Backend +func (be *postgresBackend) CompleteWorkflowWorkItem(ctx context.Context, wi *backend.WorkflowWorkItem) error { if err := be.ensureDB(); err != nil { return err } @@ -446,7 +446,7 @@ func (be *postgresBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi } } - // Save outbound orchestrator events + // Save outbound workflow events newEventCount := len(wi.State.GetPendingTimers()) + len(wi.State.GetPendingMessages()) if newEventCount > 0 { builder := strings.Builder{} @@ -473,12 +473,12 @@ func (be *postgresBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi for _, msg := range wi.State.GetPendingMessages() { if es := msg.HistoryEvent.GetExecutionStarted(); es != nil { // Need to insert a new row into the DB - if _, err := be.createOrchestrationInstanceInternal(ctx, msg.HistoryEvent, tx); err != nil { - if errors.Is(err, runtimestate.ErrDuplicateEvent) { + if _, err := be.createWorkflowInstanceInternal(ctx, msg.HistoryEvent, tx); err != nil { + if errors.Is(err, runtimestate.ErrDuplicateEvent) || errors.Is(err, api.ErrDuplicateInstance) { be.logger.Warnf( - "%v: dropping sub-orchestration creation event because an instance with the target ID (%v) already exists.", + "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", wi.InstanceID, - es.OrchestrationInstance.InstanceId) + es.WorkflowInstance.InstanceId) } else { return err } @@ -490,7 +490,7 @@ func (be *postgresBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi return err } - sqlInsertArgs = append(sqlInsertArgs, msg.TargetInstanceID, eventPayload, nil) + sqlInsertArgs = append(sqlInsertArgs, msg.TargetInstanceId, eventPayload, nil) } _, err = tx.Exec(ctx, insertSql, sqlInsertArgs...) @@ -528,8 +528,8 @@ func (be *postgresBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi return nil } -// CreateOrchestrationInstance implements backend.Backend -func (be *postgresBackend) CreateOrchestrationInstance(ctx context.Context, e *backend.HistoryEvent, opts ...backend.OrchestrationIdReusePolicyOptions) error { +// CreateWorkflowInstance implements backend.Backend +func (be *postgresBackend) CreateWorkflowInstance(ctx context.Context, e *backend.HistoryEvent) error { if err := be.ensureDB(); err != nil { return err } @@ -541,7 +541,7 @@ func (be *postgresBackend) CreateOrchestrationInstance(ctx context.Context, e *b defer tx.Rollback(ctx) var instanceID string - if instanceID, err = be.createOrchestrationInstanceInternal(ctx, e, tx, opts...); errors.Is(err, api.ErrIgnoreInstance) { + if instanceID, err = be.createWorkflowInstanceInternal(ctx, e, tx); errors.Is(err, api.ErrIgnoreInstance) { // choose to ignore, do nothing return nil } else if err != nil { @@ -565,13 +565,13 @@ func (be *postgresBackend) CreateOrchestrationInstance(ctx context.Context, e *b } if err = tx.Commit(ctx); err != nil { - return fmt.Errorf("failed to create orchestration: %w", err) + return fmt.Errorf("failed to create workflow: %w", err) } return nil } -func (be *postgresBackend) createOrchestrationInstanceInternal(ctx context.Context, e *backend.HistoryEvent, tx pgx.Tx, opts ...backend.OrchestrationIdReusePolicyOptions) (string, error) { +func (be *postgresBackend) createWorkflowInstanceInternal(ctx context.Context, e *backend.HistoryEvent, tx pgx.Tx) (string, error) { if e == nil { return "", errors.New("HistoryEvent must be non-nil") } else if e.Timestamp == nil { @@ -582,13 +582,7 @@ func (be *postgresBackend) createOrchestrationInstanceInternal(ctx context.Conte if startEvent == nil { return "", errors.New("HistoryEvent must be an ExecutionStartedEvent") } - instanceID := startEvent.OrchestrationInstance.InstanceId - - policy := &protos.OrchestrationIdReusePolicy{} - - for _, opt := range opts { - opt(policy) - } + instanceID := startEvent.WorkflowInstance.InstanceId rows, err := insertOrIgnoreInstanceTableInternal(ctx, tx, e, startEvent) if err != nil { @@ -597,7 +591,7 @@ func (be *postgresBackend) createOrchestrationInstanceInternal(ctx context.Conte // instance with same ID already exists if rows <= 0 { - return instanceID, be.handleInstanceExists(ctx, tx, startEvent, policy, e) + return instanceID, api.ErrDuplicateInstance } return instanceID, nil } @@ -616,8 +610,8 @@ func insertOrIgnoreInstanceTableInternal(ctx context.Context, tx pgx.Tx, e *back ) VALUES ($1, $2, $3, $4, $5, $6, $7) ON CONFLICT DO NOTHING`, startEvent.Name, startEvent.Version.GetValue(), - startEvent.OrchestrationInstance.InstanceId, - startEvent.OrchestrationInstance.ExecutionId.GetValue(), + startEvent.WorkflowInstance.InstanceId, + startEvent.WorkflowInstance.ExecutionId.GetValue(), startEvent.Input.GetValue(), "PENDING", e.Timestamp.AsTime(), @@ -633,53 +627,6 @@ func insertOrIgnoreInstanceTableInternal(ctx context.Context, tx pgx.Tx, e *back return rows, nil } -func (be *postgresBackend) handleInstanceExists(ctx context.Context, tx pgx.Tx, startEvent *protos.ExecutionStartedEvent, policy *protos.OrchestrationIdReusePolicy, e *backend.HistoryEvent) error { - // query RuntimeStatus for the existing instance - queryRow := tx.QueryRow( - ctx, - `SELECT RuntimeStatus FROM Instances WHERE InstanceID = $1`, - startEvent.OrchestrationInstance.InstanceId, - ) - var runtimeStatus *string - err := queryRow.Scan(&runtimeStatus) - if errors.Is(err, pgx.ErrNoRows) { - return api.ErrInstanceNotFound - } else if err != nil { - return fmt.Errorf("failed to scan the Instances table result: %w", err) - } - - // status not match, return instance duplicate error - if !isStatusMatch(policy.OperationStatus, helpers.FromRuntimeStatusString(*runtimeStatus)) { - return api.ErrDuplicateInstance - } - - // status match - switch policy.Action { - case protos.CreateOrchestrationAction_IGNORE: - // Log an warning message and ignore creating new instance - be.logger.Warnf("An instance with ID '%s' already exists; dropping duplicate create request", startEvent.OrchestrationInstance.InstanceId) - return api.ErrIgnoreInstance - case protos.CreateOrchestrationAction_TERMINATE: - // terminate existing instance - if err := be.cleanupOrchestrationStateInternal(ctx, tx, api.InstanceID(startEvent.OrchestrationInstance.InstanceId), false); err != nil { - return fmt.Errorf("failed to cleanup orchestration status: %w", err) - } - // create a new instance - var rows int64 - if rows, err = insertOrIgnoreInstanceTableInternal(ctx, tx, e, startEvent); err != nil { - return err - } - - // should never happen, because we clean up instance before create new one - if rows <= 0 { - return fmt.Errorf("failed to insert into Instances table because entry already exists") - } - return nil - } - // default behavior - return api.ErrDuplicateInstance -} - func isStatusMatch(statuses []protos.OrchestrationStatus, runtimeStatus protos.OrchestrationStatus) bool { for _, status := range statuses { if status == runtimeStatus { @@ -689,7 +636,7 @@ func isStatusMatch(statuses []protos.OrchestrationStatus, runtimeStatus protos.O return false } -func (be *postgresBackend) cleanupOrchestrationStateInternal(ctx context.Context, tx pgx.Tx, id api.InstanceID, requireCompleted bool) error { +func (be *postgresBackend) cleanupWorkflowStateInternal(ctx context.Context, tx pgx.Tx, id api.InstanceID, requireCompleted bool) error { row := tx.QueryRow(ctx, "SELECT 1 FROM Instances WHERE InstanceID = $1", string(id)) var unused int if err := row.Scan(&unused); errors.Is(err, pgx.ErrNoRows) { @@ -699,7 +646,7 @@ func (be *postgresBackend) cleanupOrchestrationStateInternal(ctx context.Context } if requireCompleted { - // purge orchestration in ['COMPLETED', 'FAILED', 'TERMINATED'] + // purge workflow in ['COMPLETED', 'FAILED', 'TERMINATED'] dbResult, err := tx.Exec(ctx, "DELETE FROM Instances WHERE InstanceID = $1 AND RuntimeStatus IN ('COMPLETED', 'FAILED', 'TERMINATED')", string(id)) if err != nil { return fmt.Errorf("failed to delete from the Instances table: %w", err) @@ -713,7 +660,7 @@ func (be *postgresBackend) cleanupOrchestrationStateInternal(ctx context.Context return api.ErrNotCompleted } } else { - // clean up orchestration in all RuntimeStatus + // clean up workflow in all RuntimeStatus _, err := tx.Exec(ctx, "DELETE FROM Instances WHERE InstanceID = $1", string(id)) if err != nil { return fmt.Errorf("failed to delete from the Instances table: %w", err) @@ -737,7 +684,7 @@ func (be *postgresBackend) cleanupOrchestrationStateInternal(ctx context.Context return nil } -func (be *postgresBackend) AddNewOrchestrationEvent(ctx context.Context, iid api.InstanceID, e *backend.HistoryEvent) error { +func (be *postgresBackend) AddNewWorkflowEvent(ctx context.Context, iid api.InstanceID, e *backend.HistoryEvent) error { if e == nil { return errors.New("HistoryEvent must be non-nil") } else if e.Timestamp == nil { @@ -763,8 +710,8 @@ func (be *postgresBackend) AddNewOrchestrationEvent(ctx context.Context, iid api return nil } -// GetOrchestrationMetadata implements backend.Backend -func (be *postgresBackend) GetOrchestrationMetadata(ctx context.Context, iid api.InstanceID) (*backend.OrchestrationMetadata, error) { +// GetWorkflowMetadata implements backend.Backend +func (be *postgresBackend) GetWorkflowMetadata(ctx context.Context, iid api.InstanceID) (*backend.WorkflowMetadata, error) { if err := be.ensureDB(); err != nil { return nil, err } @@ -826,7 +773,7 @@ func (be *postgresBackend) GetOrchestrationMetadata(ctx context.Context, iid api customStatusw = wrapperspb.String(*customStatus) } - return &backend.OrchestrationMetadata{ + return &backend.WorkflowMetadata{ InstanceId: string(iid), Name: *name, RuntimeStatus: helpers.FromRuntimeStatusString(*runtimeStatus), @@ -839,8 +786,8 @@ func (be *postgresBackend) GetOrchestrationMetadata(ctx context.Context, iid api }, nil } -// GetOrchestrationRuntimeState implements backend.Backend -func (be *postgresBackend) GetOrchestrationRuntimeState(ctx context.Context, wi *backend.OrchestrationWorkItem) (*backend.OrchestrationRuntimeState, error) { +// GetWorkflowRuntimeState implements backend.Backend +func (be *postgresBackend) GetWorkflowRuntimeState(ctx context.Context, wi *backend.WorkflowWorkItem) (*backend.WorkflowRuntimeState, error) { if err := be.ensureDB(); err != nil { return nil, err } @@ -852,7 +799,7 @@ func (be *postgresBackend) GetOrchestrationRuntimeState(ctx context.Context, wi return nil, err } - state := runtimestate.NewOrchestrationRuntimeState(string(wi.InstanceID), nil, resp.GetEvents()) + state := runtimestate.NewWorkflowRuntimeState(string(wi.InstanceID), nil, resp.GetEvents()) return state, nil } @@ -917,8 +864,8 @@ func (be *postgresBackend) ListInstanceIDs(ctx context.Context, wi *backend.List }, nil } -// GetOrchestrationWorkItem implements backend.Backend -func (be *postgresBackend) GetOrchestrationWorkItem(ctx context.Context) (*backend.OrchestrationWorkItem, error) { +// GetWorkflowWorkItem implements backend.Backend +func (be *postgresBackend) GetWorkflowWorkItem(ctx context.Context) (*backend.WorkflowWorkItem, error) { if err := be.ensureDB(); err != nil { return nil, err } @@ -930,9 +877,9 @@ func (be *postgresBackend) GetOrchestrationWorkItem(ctx context.Context) (*backe defer tx.Rollback(ctx) now := time.Now().UTC() - newLockExpiration := now.Add(be.options.OrchestrationLockTimeout) + newLockExpiration := now.Add(be.options.WorkflowLockTimeout) - // Place a lock on an orchestration instance that has new events that are ready to be executed. + // Place a lock on a workflow instance that has new events that are ready to be executed. row := tx.QueryRow( ctx, `UPDATE Instances SET LockedBy = $1, LockExpiration = $2 @@ -957,7 +904,7 @@ func (be *postgresBackend) GetOrchestrationWorkItem(ctx context.Context) (*backe return nil, errNoWorkItems } - return nil, fmt.Errorf("failed to scan the orchestration work-item: %w", err) + return nil, fmt.Errorf("failed to scan the workflow work-item: %w", err) } // TODO: Get all the unprocessed events associated with the locked instance @@ -974,7 +921,7 @@ func (be *postgresBackend) GetOrchestrationWorkItem(ctx context.Context) (*backe now, ) if err != nil { - return nil, fmt.Errorf("failed to query for orchestration work-items: %w", err) + return nil, fmt.Errorf("failed to query for workflow work-items: %w", err) } defer events.Close() @@ -1001,10 +948,10 @@ func (be *postgresBackend) GetOrchestrationWorkItem(ctx context.Context) (*backe } if err = tx.Commit(ctx); err != nil { - return nil, fmt.Errorf("failed to update orchestration work-item: %w", err) + return nil, fmt.Errorf("failed to update workflow work-item: %w", err) } - wi := &backend.OrchestrationWorkItem{ + wi := &backend.WorkflowWorkItem{ InstanceID: api.InstanceID(instanceID), NewEvents: newEvents, LockedBy: be.workerName, @@ -1020,7 +967,7 @@ func (be *postgresBackend) getActivityWorkItem(ctx context.Context) (*backend.Ac } now := time.Now().UTC() - newLockExpiration := now.Add(be.options.OrchestrationLockTimeout) + newLockExpiration := now.Add(be.options.WorkflowLockTimeout) row := be.db.QueryRow( ctx, @@ -1127,7 +1074,7 @@ func (be *postgresBackend) AbandonActivityWorkItem(ctx context.Context, wi *back return nil } -func (be *postgresBackend) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, force bool) error { +func (be *postgresBackend) PurgeWorkflowState(ctx context.Context, id api.InstanceID, force bool) error { if err := be.ensureDB(); err != nil { return err } @@ -1138,7 +1085,7 @@ func (be *postgresBackend) PurgeOrchestrationState(ctx context.Context, id api.I } defer tx.Rollback(ctx) - if err := be.cleanupOrchestrationStateInternal(ctx, tx, id, true); err != nil { + if err := be.cleanupWorkflowStateInternal(ctx, tx, id, true); err != nil { return err } diff --git a/backend/runtimestate/applier.go b/backend/runtimestate/applier.go index 8007e69a..fe4329b5 100644 --- a/backend/runtimestate/applier.go +++ b/backend/runtimestate/applier.go @@ -23,7 +23,7 @@ func NewApplier(appID string) *Applier { } // Actions takes a set of actions and updates its internal state, including populating the outbox. -func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wrapperspb.StringValue, actions []*protos.OrchestratorAction, currentTraceContext *protos.TraceContext) (bool, error) { +func (a *Applier) Actions(s *protos.WorkflowRuntimeState, customStatus *wrapperspb.StringValue, actions []*protos.WorkflowAction, currentTraceContext *protos.TraceContext) (bool, error) { s.CustomStatus = customStatus s.Stalled = nil @@ -36,15 +36,15 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra action.Router.SourceAppID = a.appID } - if completedAction := action.GetCompleteOrchestration(); completedAction != nil { - if completedAction.OrchestrationStatus == protos.OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW { - newState := NewOrchestrationRuntimeState(s.InstanceId, customStatus, []*protos.HistoryEvent{}) + if completedAction := action.GetCompleteWorkflow(); completedAction != nil { + if completedAction.WorkflowStatus == protos.OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW { + newState := NewWorkflowRuntimeState(s.InstanceId, customStatus, []*protos.HistoryEvent{}) newState.ContinuedAsNew = true _ = AddEvent(newState, &protos.HistoryEvent{ EventId: -1, Timestamp: timestamppb.Now(), - EventType: &protos.HistoryEvent_OrchestratorStarted{ - OrchestratorStarted: &protos.OrchestratorStartedEvent{}, + EventType: &protos.HistoryEvent_WorkflowStarted{ + WorkflowStarted: &protos.WorkflowStartedEvent{}, }, Router: action.Router, }) @@ -59,7 +59,7 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra Name: s.StartEvent.Name, ParentInstance: s.StartEvent.ParentInstance, Input: completedAction.Result, - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: s.InstanceId, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -86,7 +86,7 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra Timestamp: timestamppb.Now(), EventType: &protos.HistoryEvent_ExecutionCompleted{ ExecutionCompleted: &protos.ExecutionCompletedEvent{ - OrchestrationStatus: completedAction.OrchestrationStatus, + WorkflowStatus: completedAction.WorkflowStatus, Result: completedAction.Result, FailureDetails: completedAction.FailureDetails, }, @@ -105,25 +105,25 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra completionRouter = action.Router } - msg := &protos.OrchestrationRuntimeStateMessage{ + msg := &protos.WorkflowRuntimeStateMessage{ HistoryEvent: &protos.HistoryEvent{ EventId: -1, Timestamp: timestamppb.Now(), Router: completionRouter, }, - TargetInstanceID: s.StartEvent.GetParentInstance().OrchestrationInstance.InstanceId, + TargetInstanceId: s.StartEvent.GetParentInstance().WorkflowInstance.InstanceId, } - if completedAction.OrchestrationStatus == protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED { - msg.HistoryEvent.EventType = &protos.HistoryEvent_SubOrchestrationInstanceCompleted{ - SubOrchestrationInstanceCompleted: &protos.SubOrchestrationInstanceCompletedEvent{ + if completedAction.WorkflowStatus == protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED { + msg.HistoryEvent.EventType = &protos.HistoryEvent_ChildWorkflowInstanceCompleted{ + ChildWorkflowInstanceCompleted: &protos.ChildWorkflowInstanceCompletedEvent{ TaskScheduledId: s.StartEvent.ParentInstance.TaskScheduledId, Result: completedAction.Result, }, } } else { // TODO: What is the expected result for termination? - msg.HistoryEvent.EventType = &protos.HistoryEvent_SubOrchestrationInstanceFailed{ - SubOrchestrationInstanceFailed: &protos.SubOrchestrationInstanceFailedEvent{ + msg.HistoryEvent.EventType = &protos.HistoryEvent_ChildWorkflowInstanceFailed{ + ChildWorkflowInstanceFailed: &protos.ChildWorkflowInstanceFailedEvent{ TaskScheduledId: s.StartEvent.ParentInstance.TaskScheduledId, FailureDetails: completedAction.FailureDetails, }, @@ -172,8 +172,8 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra } _ = AddEvent(s, scheduledEvent) s.PendingTasks = append(s.PendingTasks, scheduledEvent) - } else if createSO := action.GetCreateSubOrchestration(); createSO != nil { - // Autogenerate an instance ID for the sub-orchestration if none is provided, using a + } else if createSO := action.GetCreateChildWorkflow(); createSO != nil { + // Autogenerate an instance ID for the child workflow if none is provided, using a // deterministic algorithm based on the parent instance ID to help enable de-duplication. if createSO.InstanceId == "" { createSO.InstanceId = fmt.Sprintf("%s:%04x", s.InstanceId, action.Id) @@ -181,8 +181,8 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra _ = AddEvent(s, &protos.HistoryEvent{ EventId: action.Id, Timestamp: timestamppb.New(time.Now()), - EventType: &protos.HistoryEvent_SubOrchestrationInstanceCreated{ - SubOrchestrationInstanceCreated: &protos.SubOrchestrationInstanceCreatedEvent{ + EventType: &protos.HistoryEvent_ChildWorkflowInstanceCreated{ + ChildWorkflowInstanceCreated: &protos.ChildWorkflowInstanceCreatedEvent{ Name: createSO.Name, Version: createSO.Version, Input: createSO.Input, @@ -201,11 +201,11 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra ParentInstance: &protos.ParentInstanceInfo{ TaskScheduledId: action.Id, Name: wrapperspb.String(s.StartEvent.Name), - OrchestrationInstance: &protos.OrchestrationInstance{InstanceId: string(s.InstanceId)}, + WorkflowInstance: &protos.WorkflowInstance{InstanceId: string(s.InstanceId)}, AppID: ptr.Of(action.Router.GetSourceAppID()), }, Input: createSO.Input, - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: createSO.InstanceId, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -215,7 +215,7 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra Router: action.Router, } - s.PendingMessages = append(s.PendingMessages, &protos.OrchestrationRuntimeStateMessage{HistoryEvent: startEvent, TargetInstanceID: createSO.InstanceId}) + s.PendingMessages = append(s.PendingMessages, &protos.WorkflowRuntimeStateMessage{HistoryEvent: startEvent, TargetInstanceId: createSO.InstanceId}) } else if sendEvent := action.GetSendEvent(); sendEvent != nil { e := &protos.HistoryEvent{ EventId: action.Id, @@ -230,11 +230,11 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra Router: action.Router, } _ = AddEvent(s, e) - s.PendingMessages = append(s.PendingMessages, &protos.OrchestrationRuntimeStateMessage{HistoryEvent: e, TargetInstanceID: sendEvent.Instance.InstanceId}) - } else if terminate := action.GetTerminateOrchestration(); terminate != nil { - // Send a message to terminate the target orchestration - msg := &protos.OrchestrationRuntimeStateMessage{ - TargetInstanceID: terminate.InstanceId, + s.PendingMessages = append(s.PendingMessages, &protos.WorkflowRuntimeStateMessage{HistoryEvent: e, TargetInstanceId: sendEvent.Instance.InstanceId}) + } else if terminate := action.GetTerminateWorkflow(); terminate != nil { + // Send a message to terminate the target workflow + msg := &protos.WorkflowRuntimeStateMessage{ + TargetInstanceId: terminate.InstanceId, HistoryEvent: &protos.HistoryEvent{ EventId: -1, Timestamp: timestamppb.Now(), @@ -248,16 +248,16 @@ func (a *Applier) Actions(s *protos.OrchestrationRuntimeState, customStatus *wra }, } s.PendingMessages = append(s.PendingMessages, msg) - } else if versionNotAvailable := action.GetOrchestratorVersionNotAvailable(); versionNotAvailable != nil { + } else if versionNotAvailable := action.GetWorkflowVersionNotAvailable(); versionNotAvailable != nil { versionName := "" for _, e := range s.OldEvents { - if es := e.GetOrchestratorStarted(); es != nil { + if es := e.GetWorkflowStarted(); es != nil { versionName = es.GetVersion().GetName() break } } - msg := &protos.OrchestrationRuntimeStateMessage{ + msg := &protos.WorkflowRuntimeStateMessage{ HistoryEvent: &protos.HistoryEvent{ EventId: -1, Timestamp: timestamppb.Now(), diff --git a/backend/runtimestate/runtimestate.go b/backend/runtimestate/runtimestate.go index a862b61c..ed4a22ac 100644 --- a/backend/runtimestate/runtimestate.go +++ b/backend/runtimestate/runtimestate.go @@ -15,8 +15,8 @@ import ( var ErrDuplicateEvent = errors.New("duplicate event") -func NewOrchestrationRuntimeState(instanceID string, customStatus *wrapperspb.StringValue, existingHistory []*protos.HistoryEvent) *protos.OrchestrationRuntimeState { - s := &protos.OrchestrationRuntimeState{ +func NewWorkflowRuntimeState(instanceID string, customStatus *wrapperspb.StringValue, existingHistory []*protos.HistoryEvent) *protos.WorkflowRuntimeState { + s := &protos.WorkflowRuntimeState{ InstanceId: instanceID, OldEvents: make([]*protos.HistoryEvent, 0, len(existingHistory)), NewEvents: make([]*protos.HistoryEvent, 0, 10), @@ -30,12 +30,12 @@ func NewOrchestrationRuntimeState(instanceID string, customStatus *wrapperspb.St return s } -// AddEvent appends a new history event to the orchestration history -func AddEvent(s *protos.OrchestrationRuntimeState, e *protos.HistoryEvent) error { +// AddEvent appends a new history event to the workflow history +func AddEvent(s *protos.WorkflowRuntimeState, e *protos.HistoryEvent) error { return addEvent(s, e, true) } -func addEvent(s *protos.OrchestrationRuntimeState, e *protos.HistoryEvent, isNew bool) error { +func addEvent(s *protos.WorkflowRuntimeState, e *protos.HistoryEvent, isNew bool) error { if startEvent := e.GetExecutionStarted(); startEvent != nil { if s.StartEvent != nil { return ErrDuplicateEvent @@ -77,18 +77,18 @@ func addEvent(s *protos.OrchestrationRuntimeState, e *protos.HistoryEvent, isNew return nil } -func IsValid(s *protos.OrchestrationRuntimeState) bool { +func IsValid(s *protos.WorkflowRuntimeState) bool { if len(s.OldEvents) == 0 && len(s.NewEvents) == 0 { - // empty orchestration state + // empty workflow state return true } else if s.StartEvent != nil { - // orchestration history has a start event + // workflow history has a start event return true } return false } -func Name(s *protos.OrchestrationRuntimeState) (string, error) { +func Name(s *protos.WorkflowRuntimeState) (string, error) { if s.StartEvent == nil { return "", api.ErrNotStarted } @@ -96,7 +96,7 @@ func Name(s *protos.OrchestrationRuntimeState) (string, error) { return s.StartEvent.Name, nil } -func Input(s *protos.OrchestrationRuntimeState) (*wrapperspb.StringValue, error) { +func Input(s *protos.WorkflowRuntimeState) (*wrapperspb.StringValue, error) { if s.StartEvent == nil { return nil, api.ErrNotStarted } @@ -105,7 +105,7 @@ func Input(s *protos.OrchestrationRuntimeState) (*wrapperspb.StringValue, error) return s.StartEvent.Input, nil } -func Output(s *protos.OrchestrationRuntimeState) (*wrapperspb.StringValue, error) { +func Output(s *protos.WorkflowRuntimeState) (*wrapperspb.StringValue, error) { if s.CompletedEvent == nil { return nil, api.ErrNotCompleted } @@ -114,11 +114,11 @@ func Output(s *protos.OrchestrationRuntimeState) (*wrapperspb.StringValue, error return s.CompletedEvent.Result, nil } -func RuntimeStatus(s *protos.OrchestrationRuntimeState) protos.OrchestrationStatus { +func RuntimeStatus(s *protos.WorkflowRuntimeState) protos.OrchestrationStatus { if s.StartEvent == nil { return protos.OrchestrationStatus_ORCHESTRATION_STATUS_PENDING } else if s.CompletedEvent != nil { - return s.CompletedEvent.GetOrchestrationStatus() + return s.CompletedEvent.GetWorkflowStatus() } else if s.Stalled != nil { return protos.OrchestrationStatus_ORCHESTRATION_STATUS_STALLED } else if s.IsSuspended { @@ -128,7 +128,7 @@ func RuntimeStatus(s *protos.OrchestrationRuntimeState) protos.OrchestrationStat return protos.OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING } -func CreatedTime(s *protos.OrchestrationRuntimeState) (time.Time, error) { +func CreatedTime(s *protos.WorkflowRuntimeState) (time.Time, error) { if s.StartEvent == nil { return time.Time{}, api.ErrNotStarted } @@ -136,7 +136,7 @@ func CreatedTime(s *protos.OrchestrationRuntimeState) (time.Time, error) { return s.CreatedTime.AsTime(), nil } -func LastUpdatedTime(s *protos.OrchestrationRuntimeState) (time.Time, error) { +func LastUpdatedTime(s *protos.WorkflowRuntimeState) (time.Time, error) { if s.StartEvent == nil { return time.Time{}, api.ErrNotStarted } @@ -144,7 +144,7 @@ func LastUpdatedTime(s *protos.OrchestrationRuntimeState) (time.Time, error) { return s.LastUpdatedTime.AsTime(), nil } -func CompletedTime(s *protos.OrchestrationRuntimeState) (time.Time, error) { +func CompletedTime(s *protos.WorkflowRuntimeState) (time.Time, error) { if s.CompletedEvent == nil { return time.Time{}, api.ErrNotCompleted } @@ -152,7 +152,7 @@ func CompletedTime(s *protos.OrchestrationRuntimeState) (time.Time, error) { return s.CompletedTime.AsTime(), nil } -func FailureDetails(s *protos.OrchestrationRuntimeState) (*protos.TaskFailureDetails, error) { +func FailureDetails(s *protos.WorkflowRuntimeState) (*protos.TaskFailureDetails, error) { if s.CompletedEvent == nil { return nil, api.ErrNotCompleted } else if s.CompletedEvent.FailureDetails == nil { @@ -162,19 +162,19 @@ func FailureDetails(s *protos.OrchestrationRuntimeState) (*protos.TaskFailureDet return s.CompletedEvent.FailureDetails, nil } -// useful for abruptly stopping any execution of an orchestration from the backend -func CancelPending(s *protos.OrchestrationRuntimeState) { +// useful for abruptly stopping any execution of a workflow from the backend +func CancelPending(s *protos.WorkflowRuntimeState) { s.NewEvents = []*protos.HistoryEvent{} - s.PendingMessages = []*protos.OrchestrationRuntimeStateMessage{} + s.PendingMessages = []*protos.WorkflowRuntimeStateMessage{} s.PendingTasks = []*protos.HistoryEvent{} s.PendingTimers = []*protos.HistoryEvent{} } -func String(s *protos.OrchestrationRuntimeState) string { +func String(s *protos.WorkflowRuntimeState) string { return fmt.Sprintf("%v:%v", s.InstanceId, helpers.ToRuntimeStatusString(RuntimeStatus(s))) } -func GetStartedTime(s *protos.OrchestrationRuntimeState) time.Time { +func GetStartedTime(s *protos.WorkflowRuntimeState) time.Time { var startTime time.Time if len(s.OldEvents) > 0 { startTime = s.OldEvents[0].Timestamp.AsTime() @@ -184,6 +184,6 @@ func GetStartedTime(s *protos.OrchestrationRuntimeState) time.Time { return startTime } -func IsCompleted(s *protos.OrchestrationRuntimeState) bool { +func IsCompleted(s *protos.WorkflowRuntimeState) bool { return s.CompletedEvent != nil } diff --git a/backend/runtimestate/runtimestate_test.go b/backend/runtimestate/runtimestate_test.go index 5b3367b3..806581bd 100644 --- a/backend/runtimestate/runtimestate_test.go +++ b/backend/runtimestate/runtimestate_test.go @@ -17,7 +17,7 @@ func startedEvent() *protos.HistoryEvent { Timestamp: timestamppb.Now(), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "test-orchestrator", + Name: "test-workflow", }, }, } @@ -82,7 +82,7 @@ func TestAddEvent_StalledClearedOnNewEvent(t *testing.T) { Timestamp: timestamppb.Now(), EventType: &protos.HistoryEvent_ExecutionCompleted{ ExecutionCompleted: &protos.ExecutionCompletedEvent{ - OrchestrationStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, + WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, }, }, }, @@ -94,7 +94,7 @@ func TestAddEvent_StalledClearedOnNewEvent(t *testing.T) { t.Run(tt.name, func(t *testing.T) { t.Parallel() - s := NewOrchestrationRuntimeState("test-instance", nil, nil) + s := NewWorkflowRuntimeState("test-instance", nil, nil) // Add a start event so RuntimeStatus can reach the stalled check. require.NoError(t, AddEvent(s, startedEvent())) @@ -117,7 +117,7 @@ func TestAddEvent_StalledClearedOnNewEvent(t *testing.T) { func TestAddEvent_StalledSetFromOldEvents(t *testing.T) { t.Parallel() - s := NewOrchestrationRuntimeState("test-instance", nil, []*protos.HistoryEvent{ + s := NewWorkflowRuntimeState("test-instance", nil, []*protos.HistoryEvent{ startedEvent(), stalledEvent(protos.StalledReason_VERSION_NOT_AVAILABLE, "old stall"), }) @@ -142,7 +142,7 @@ func TestAddEvent_StalledClearedBySubsequentOldEvent(t *testing.T) { // If the history contains a stalled event followed by another event, // the stalled state should be cleared. - s := NewOrchestrationRuntimeState("test-instance", nil, []*protos.HistoryEvent{ + s := NewWorkflowRuntimeState("test-instance", nil, []*protos.HistoryEvent{ startedEvent(), stalledEvent(protos.StalledReason_PATCH_MISMATCH, "stalled"), taskScheduled, @@ -154,7 +154,7 @@ func TestAddEvent_StalledClearedBySubsequentOldEvent(t *testing.T) { func TestAddEvent_StalledPreservedOnDuplicateError(t *testing.T) { t.Parallel() - s := NewOrchestrationRuntimeState("test-instance", nil, nil) + s := NewWorkflowRuntimeState("test-instance", nil, nil) require.NoError(t, AddEvent(s, startedEvent())) require.NoError(t, AddEvent(s, stalledEvent(protos.StalledReason_PATCH_MISMATCH, "stalled"))) require.NotNil(t, s.Stalled) @@ -170,7 +170,7 @@ func TestAddEvent_StalledPreservedOnDuplicateError(t *testing.T) { func TestAddEvent_StalledReplacedByNewStalled(t *testing.T) { t.Parallel() - s := NewOrchestrationRuntimeState("test-instance", nil, nil) + s := NewWorkflowRuntimeState("test-instance", nil, nil) require.NoError(t, AddEvent(s, startedEvent())) require.NoError(t, AddEvent(s, stalledEvent(protos.StalledReason_PATCH_MISMATCH, "first stall"))) diff --git a/backend/sqlite/sqlite.go b/backend/sqlite/sqlite.go index 7356819f..196e1657 100644 --- a/backend/sqlite/sqlite.go +++ b/backend/sqlite/sqlite.go @@ -35,7 +35,7 @@ var emptyString string = "" var errNoWorkItems = errors.New("no work items were found") type SqliteOptions struct { - OrchestrationLockTimeout time.Duration + WorkflowLockTimeout time.Duration ActivityLockTimeout time.Duration FilePath string } @@ -56,7 +56,7 @@ func NewSqliteOptions(filePath string) *SqliteOptions { // Default values are provided for required options return &SqliteOptions{ FilePath: filePath, - OrchestrationLockTimeout: 2 * time.Minute, + WorkflowLockTimeout: 2 * time.Minute, ActivityLockTimeout: 2 * time.Minute, } } @@ -138,8 +138,8 @@ func (be *sqliteBackend) DeleteTaskHub(ctx context.Context) error { } } -// AbandonOrchestrationWorkItem implements backend.Backend -func (be *sqliteBackend) AbandonOrchestrationWorkItem(ctx context.Context, wi *backend.OrchestrationWorkItem) error { +// AbandonWorkflowWorkItem implements backend.Backend +func (be *sqliteBackend) AbandonWorkflowWorkItem(ctx context.Context, wi *backend.WorkflowWorkItem) error { if err := be.ensureDB(); err != nil { return err } @@ -199,8 +199,8 @@ func (be *sqliteBackend) AbandonOrchestrationWorkItem(ctx context.Context, wi *b return nil } -// CompleteOrchestrationWorkItem implements backend.Backend -func (be *sqliteBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi *backend.OrchestrationWorkItem) error { +// CompleteWorkflowWorkItem implements backend.Backend +func (be *sqliteBackend) CompleteWorkflowWorkItem(ctx context.Context, wi *backend.WorkflowWorkItem) error { if err := be.ensureDB(); err != nil { return err } @@ -327,7 +327,7 @@ func (be *sqliteBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi * } } - // Save outbound orchestrator events + // Save outbound workflow events newEventCount := len(wi.State.PendingTimers) + len(wi.State.PendingMessages) if newEventCount > 0 { insertSql := "INSERT INTO NewEvents ([InstanceID], [EventPayload], [VisibleTime]) VALUES (?, ?, ?)" + @@ -347,15 +347,12 @@ func (be *sqliteBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi * for _, msg := range wi.State.PendingMessages { if es := msg.HistoryEvent.GetExecutionStarted(); es != nil { // Need to insert a new row into the DB - if _, err := be.createOrchestrationInstanceInternal(ctx, msg.HistoryEvent, tx, backend.WithOrchestrationIdReusePolicy(&protos.OrchestrationIdReusePolicy{ - OperationStatus: []protos.OrchestrationStatus{protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED}, - Action: api.REUSE_ID_ACTION_TERMINATE, - })); err != nil { - if err == runtimestate.ErrDuplicateEvent { + if _, err := be.createWorkflowInstanceInternal(ctx, msg.HistoryEvent, tx); err != nil { + if err == runtimestate.ErrDuplicateEvent || errors.Is(err, api.ErrDuplicateInstance) { be.logger.Warnf( - "%v: dropping sub-orchestration creation event because an instance with the target ID (%v) already exists.", + "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", wi.InstanceID, - es.OrchestrationInstance.InstanceId) + es.WorkflowInstance.InstanceId) } else { return err } @@ -367,7 +364,7 @@ func (be *sqliteBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi * return err } - sqlInsertArgs = append(sqlInsertArgs, msg.TargetInstanceID, eventPayload, nil) + sqlInsertArgs = append(sqlInsertArgs, msg.TargetInstanceId, eventPayload, nil) } _, err = tx.ExecContext(ctx, insertSql, sqlInsertArgs...) @@ -405,8 +402,8 @@ func (be *sqliteBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi * return nil } -// CreateOrchestrationInstance implements backend.Backend -func (be *sqliteBackend) CreateOrchestrationInstance(ctx context.Context, e *backend.HistoryEvent, opts ...backend.OrchestrationIdReusePolicyOptions) error { +// CreateWorkflowInstance implements backend.Backend +func (be *sqliteBackend) CreateWorkflowInstance(ctx context.Context, e *backend.HistoryEvent) error { if err := be.ensureDB(); err != nil { return err } @@ -418,7 +415,7 @@ func (be *sqliteBackend) CreateOrchestrationInstance(ctx context.Context, e *bac defer tx.Rollback() var instanceID string - if instanceID, err = be.createOrchestrationInstanceInternal(ctx, e, tx, opts...); errors.Is(err, api.ErrIgnoreInstance) { + if instanceID, err = be.createWorkflowInstanceInternal(ctx, e, tx); errors.Is(err, api.ErrIgnoreInstance) { // choose to ignore, do nothing return nil } else if err != nil { @@ -442,13 +439,13 @@ func (be *sqliteBackend) CreateOrchestrationInstance(ctx context.Context, e *bac } if err = tx.Commit(); err != nil { - return fmt.Errorf("failed to create orchestration: %w", err) + return fmt.Errorf("failed to create workflow: %w", err) } return nil } -func (be *sqliteBackend) createOrchestrationInstanceInternal(ctx context.Context, e *backend.HistoryEvent, tx *sql.Tx, opts ...backend.OrchestrationIdReusePolicyOptions) (string, error) { +func (be *sqliteBackend) createWorkflowInstanceInternal(ctx context.Context, e *backend.HistoryEvent, tx *sql.Tx) (string, error) { if e == nil { return "", errors.New("HistoryEvent must be non-nil") } else if e.Timestamp == nil { @@ -459,13 +456,7 @@ func (be *sqliteBackend) createOrchestrationInstanceInternal(ctx context.Context if startEvent == nil { return "", errors.New("HistoryEvent must be an ExecutionStartedEvent") } - instanceID := startEvent.OrchestrationInstance.InstanceId - - policy := &protos.OrchestrationIdReusePolicy{} - - for _, opt := range opts { - opt(policy) - } + instanceID := startEvent.WorkflowInstance.InstanceId rows, err := insertOrIgnoreInstanceTableInternal(ctx, tx, e, startEvent) if err != nil { @@ -474,7 +465,7 @@ func (be *sqliteBackend) createOrchestrationInstanceInternal(ctx context.Context // instance with same ID already exists if rows <= 0 { - return instanceID, be.handleInstanceExists(ctx, tx, startEvent, policy, e) + return instanceID, api.ErrDuplicateInstance } return instanceID, nil } @@ -493,8 +484,8 @@ func insertOrIgnoreInstanceTableInternal(ctx context.Context, tx *sql.Tx, e *bac ) VALUES (?, ?, ?, ?, ?, ?, ?)`, startEvent.Name, startEvent.Version.GetValue(), - startEvent.OrchestrationInstance.InstanceId, - startEvent.OrchestrationInstance.ExecutionId.GetValue(), + startEvent.WorkflowInstance.InstanceId, + startEvent.WorkflowInstance.ExecutionId.GetValue(), startEvent.Input.GetValue(), "PENDING", e.Timestamp.AsTime(), @@ -510,52 +501,6 @@ func insertOrIgnoreInstanceTableInternal(ctx context.Context, tx *sql.Tx, e *bac return rows, nil } -func (be *sqliteBackend) handleInstanceExists(ctx context.Context, tx *sql.Tx, startEvent *protos.ExecutionStartedEvent, policy *protos.OrchestrationIdReusePolicy, e *backend.HistoryEvent) error { - // query RuntimeStatus for the existing instance - queryRow := tx.QueryRowContext( - ctx, - `SELECT [RuntimeStatus] FROM Instances WHERE [InstanceID] = ?`, - startEvent.OrchestrationInstance.InstanceId, - ) - var runtimeStatus *string - err := queryRow.Scan(&runtimeStatus) - if errors.Is(err, sql.ErrNoRows) { - return api.ErrInstanceNotFound - } else if err != nil { - return fmt.Errorf("failed to scan the Instances table result: %w", err) - } - - // status not match, return instance duplicate error - if !isStatusMatch(policy.OperationStatus, helpers.FromRuntimeStatusString(*runtimeStatus)) { - return api.ErrDuplicateInstance - } - - // status match - switch policy.Action { - case protos.CreateOrchestrationAction_IGNORE: - // Log an warning message and ignore creating new instance - be.logger.Warnf("An instance with ID '%s' already exists; dropping duplicate create request", startEvent.OrchestrationInstance.InstanceId) - return api.ErrIgnoreInstance - case protos.CreateOrchestrationAction_TERMINATE: - // terminate existing instance - if err := be.cleanupOrchestrationStateInternal(ctx, tx, api.InstanceID(startEvent.OrchestrationInstance.InstanceId), false); err != nil { - return fmt.Errorf("failed to cleanup orchestration status: %w", err) - } - // create a new instance - var rows int64 - if rows, err = insertOrIgnoreInstanceTableInternal(ctx, tx, e, startEvent); err != nil { - return err - } - - // should never happen, because we clean up instance before create new one - if rows <= 0 { - return fmt.Errorf("failed to insert into [Instances] table because entry already exists.") - } - return nil - } - // default behavior - return api.ErrDuplicateInstance -} func isStatusMatch(statuses []protos.OrchestrationStatus, runtimeStatus protos.OrchestrationStatus) bool { for _, status := range statuses { @@ -566,7 +511,7 @@ func isStatusMatch(statuses []protos.OrchestrationStatus, runtimeStatus protos.O return false } -func (be *sqliteBackend) cleanupOrchestrationStateInternal(ctx context.Context, tx *sql.Tx, id api.InstanceID, requireCompleted bool) error { +func (be *sqliteBackend) cleanupWorkflowStateInternal(ctx context.Context, tx *sql.Tx, id api.InstanceID, requireCompleted bool) error { row := tx.QueryRowContext(ctx, "SELECT 1 FROM Instances WHERE [InstanceID] = ?", string(id)) if err := row.Err(); err != nil { return fmt.Errorf("failed to query for instance existence: %w", err) @@ -580,7 +525,7 @@ func (be *sqliteBackend) cleanupOrchestrationStateInternal(ctx context.Context, } if requireCompleted { - // purge orchestration in ['COMPLETED', 'FAILED', 'TERMINATED'] + // purge workflow in ['COMPLETED', 'FAILED', 'TERMINATED'] dbResult, err := tx.ExecContext(ctx, "DELETE FROM Instances WHERE [InstanceID] = ? AND [RuntimeStatus] IN ('COMPLETED', 'FAILED', 'TERMINATED')", string(id)) if err != nil { return fmt.Errorf("failed to delete from the Instances table: %w", err) @@ -594,7 +539,7 @@ func (be *sqliteBackend) cleanupOrchestrationStateInternal(ctx context.Context, return api.ErrNotCompleted } } else { - // clean up orchestration in all [RuntimeStatus] + // clean up workflow in all [RuntimeStatus] _, err := tx.ExecContext(ctx, "DELETE FROM Instances WHERE [InstanceID] = ?", string(id)) if err != nil { return fmt.Errorf("failed to delete from the Instances table: %w", err) @@ -618,7 +563,7 @@ func (be *sqliteBackend) cleanupOrchestrationStateInternal(ctx context.Context, return nil } -func (be *sqliteBackend) AddNewOrchestrationEvent(ctx context.Context, iid api.InstanceID, e *backend.HistoryEvent) error { +func (be *sqliteBackend) AddNewWorkflowEvent(ctx context.Context, iid api.InstanceID, e *backend.HistoryEvent) error { if e == nil { return errors.New("HistoryEvent must be non-nil") } else if e.Timestamp == nil { @@ -644,7 +589,7 @@ func (be *sqliteBackend) AddNewOrchestrationEvent(ctx context.Context, iid api.I return nil } -func (be *sqliteBackend) WatchOrchestrationRuntimeStatus(ctx context.Context, id api.InstanceID, fn func(*backend.OrchestrationMetadata) bool) error { +func (be *sqliteBackend) WatchWorkflowRuntimeStatus(ctx context.Context, id api.InstanceID, fn func(*backend.WorkflowMetadata) bool) error { b := backoff.ExponentialBackOff{ InitialInterval: 100 * time.Millisecond, MaxInterval: 10 * time.Second, @@ -665,7 +610,7 @@ func (be *sqliteBackend) WatchOrchestrationRuntimeStatus(ctx context.Context, id } return ctx.Err() case <-t.C: - meta, err := be.GetOrchestrationMetadata(ctx, id) + meta, err := be.GetWorkflowMetadata(ctx, id) if err != nil { return err } @@ -679,8 +624,8 @@ func (be *sqliteBackend) WatchOrchestrationRuntimeStatus(ctx context.Context, id return nil } -// GetOrchestrationMetadata implements backend.Backend -func (be *sqliteBackend) GetOrchestrationMetadata(ctx context.Context, iid api.InstanceID) (*backend.OrchestrationMetadata, error) { +// GetWorkflowMetadata implements backend.Backend +func (be *sqliteBackend) GetWorkflowMetadata(ctx context.Context, iid api.InstanceID) (*backend.WorkflowMetadata, error) { if err := be.ensureDB(); err != nil { return nil, err } @@ -737,7 +682,7 @@ func (be *sqliteBackend) GetOrchestrationMetadata(ctx context.Context, iid api.I } } - return &backend.OrchestrationMetadata{ + return &backend.WorkflowMetadata{ InstanceId: string(iid), Name: *name, RuntimeStatus: helpers.FromRuntimeStatusString(*runtimeStatus), @@ -750,8 +695,8 @@ func (be *sqliteBackend) GetOrchestrationMetadata(ctx context.Context, iid api.I }, nil } -// GetOrchestrationRuntimeState implements backend.Backend -func (be *sqliteBackend) GetOrchestrationRuntimeState(ctx context.Context, wi *backend.OrchestrationWorkItem) (*backend.OrchestrationRuntimeState, error) { +// GetWorkflowRuntimeState implements backend.Backend +func (be *sqliteBackend) GetWorkflowRuntimeState(ctx context.Context, wi *backend.WorkflowWorkItem) (*backend.WorkflowRuntimeState, error) { if err := be.ensureDB(); err != nil { return nil, err } @@ -780,12 +725,12 @@ func (be *sqliteBackend) GetOrchestrationRuntimeState(ctx context.Context, wi *b existingEvents = append(existingEvents, e) } - state := runtimestate.NewOrchestrationRuntimeState(string(wi.InstanceID), nil, existingEvents) + state := runtimestate.NewWorkflowRuntimeState(string(wi.InstanceID), nil, existingEvents) return state, nil } -// getOrchestrationWorkItem implements backend.Backend -func (be *sqliteBackend) getOrchestrationWorkItem(ctx context.Context) (*backend.OrchestrationWorkItem, error) { +// getWorkflowWorkItem implements backend.Backend +func (be *sqliteBackend) getWorkflowWorkItem(ctx context.Context) (*backend.WorkflowWorkItem, error) { if err := be.ensureDB(); err != nil { return nil, err } @@ -797,9 +742,9 @@ func (be *sqliteBackend) getOrchestrationWorkItem(ctx context.Context) (*backend defer tx.Rollback() now := time.Now().UTC() - newLockExpiration := now.Add(be.options.OrchestrationLockTimeout) + newLockExpiration := now.Add(be.options.WorkflowLockTimeout) - // Place a lock on an orchestration instance that has new events that are ready to be executed. + // Place a lock on a workflow instance that has new events that are ready to be executed. row := tx.QueryRowContext( ctx, `UPDATE Instances SET [LockedBy] = ?, [LockExpiration] = ? @@ -818,7 +763,7 @@ func (be *sqliteBackend) getOrchestrationWorkItem(ctx context.Context) (*backend ) if err := row.Err(); err != nil { - return nil, fmt.Errorf("failed to query for orchestration work-items: %w", err) + return nil, fmt.Errorf("failed to query for workflow work-items: %w", err) } var instanceID string @@ -828,7 +773,7 @@ func (be *sqliteBackend) getOrchestrationWorkItem(ctx context.Context) (*backend return nil, errNoWorkItems } - return nil, fmt.Errorf("failed to scan the orchestration work-item: %w", err) + return nil, fmt.Errorf("failed to scan the workflow work-item: %w", err) } // TODO: Get all the unprocessed events associated with the locked instance @@ -845,7 +790,7 @@ func (be *sqliteBackend) getOrchestrationWorkItem(ctx context.Context) (*backend now, ) if err != nil { - return nil, fmt.Errorf("failed to query for orchestration work-items: %w", err) + return nil, fmt.Errorf("failed to query for workflow work-items: %w", err) } maxDequeueCount := int32(0) @@ -871,10 +816,10 @@ func (be *sqliteBackend) getOrchestrationWorkItem(ctx context.Context) (*backend } if err = tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to update orchestration work-item: %w", err) + return nil, fmt.Errorf("failed to update workflow work-item: %w", err) } - wi := &backend.OrchestrationWorkItem{ + wi := &backend.WorkflowWorkItem{ InstanceID: api.InstanceID(instanceID), NewEvents: newEvents, LockedBy: be.workerName, @@ -884,7 +829,7 @@ func (be *sqliteBackend) getOrchestrationWorkItem(ctx context.Context) (*backend return wi, nil } -func (be *sqliteBackend) NextOrchestrationWorkItem(ctx context.Context) (*backend.OrchestrationWorkItem, error) { +func (be *sqliteBackend) NextWorkflowWorkItem(ctx context.Context) (*backend.WorkflowWorkItem, error) { b := backoff.WithContext(&backoff.ExponentialBackOff{ InitialInterval: 50 * time.Millisecond, MaxInterval: 5 * time.Second, @@ -895,7 +840,7 @@ func (be *sqliteBackend) NextOrchestrationWorkItem(ctx context.Context) (*backen }, ctx) for { - wi, err := be.getOrchestrationWorkItem(ctx) + wi, err := be.getWorkflowWorkItem(ctx) if err == nil { return wi, nil } @@ -956,7 +901,7 @@ func (be *sqliteBackend) getActivityWorkItem(ctx context.Context) (*backend.Acti } now := time.Now().UTC() - newLockExpiration := now.Add(be.options.OrchestrationLockTimeout) + newLockExpiration := now.Add(be.options.WorkflowLockTimeout) row := be.db.QueryRowContext( ctx, @@ -1067,7 +1012,7 @@ func (be *sqliteBackend) AbandonActivityWorkItem(ctx context.Context, wi *backen return nil } -func (be *sqliteBackend) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, force bool) error { +func (be *sqliteBackend) PurgeWorkflowState(ctx context.Context, id api.InstanceID, force bool) error { if err := be.ensureDB(); err != nil { return err } @@ -1078,7 +1023,7 @@ func (be *sqliteBackend) PurgeOrchestrationState(ctx context.Context, id api.Ins } defer tx.Rollback() - if err := be.cleanupOrchestrationStateInternal(ctx, tx, id, true); err != nil { + if err := be.cleanupWorkflowStateInternal(ctx, tx, id, true); err != nil { return err } diff --git a/backend/taskhub.go b/backend/taskhub.go index 2fa92ccc..df9b0ec6 100644 --- a/backend/taskhub.go +++ b/backend/taskhub.go @@ -15,15 +15,15 @@ type TaskHubWorker interface { type taskHubWorker struct { backend Backend - orchestrationWorker TaskWorker[*OrchestrationWorkItem] + workflowWorker TaskWorker[*WorkflowWorkItem] activityWorker TaskWorker[*ActivityWorkItem] logger Logger } -func NewTaskHubWorker(be Backend, orchestrationWorker TaskWorker[*OrchestrationWorkItem], activityWorker TaskWorker[*ActivityWorkItem], logger Logger) TaskHubWorker { +func NewTaskHubWorker(be Backend, workflowWorker TaskWorker[*WorkflowWorkItem], activityWorker TaskWorker[*ActivityWorkItem], logger Logger) TaskHubWorker { return &taskHubWorker{ backend: be, - orchestrationWorker: orchestrationWorker, + workflowWorker: workflowWorker, activityWorker: activityWorker, logger: logger, } @@ -40,7 +40,7 @@ func (w *taskHubWorker) Start(ctx context.Context) error { w.logger.Infof("worker started with backend %v", w.backend) - w.orchestrationWorker.Start(ctx) + w.workflowWorker.Start(ctx) w.activityWorker.Start(ctx) return nil } @@ -58,7 +58,7 @@ func (w *taskHubWorker) Shutdown(ctx context.Context) error { wg.Add(1) go func() { defer wg.Done() - w.orchestrationWorker.StopAndDrain() + w.workflowWorker.StopAndDrain() }() wg.Add(1) diff --git a/backend/workitem.go b/backend/workitem.go index d4849570..9d1ce4b7 100644 --- a/backend/workitem.go +++ b/backend/workitem.go @@ -13,26 +13,26 @@ type WorkItem interface { IsWorkItem() bool } -type OrchestrationWorkItem struct { +type WorkflowWorkItem struct { InstanceID api.InstanceID NewEvents []*HistoryEvent LockedBy string RetryCount int32 - State *protos.OrchestrationRuntimeState + State *protos.WorkflowRuntimeState Properties map[string]interface{} } // String implements core.WorkItem and fmt.Stringer -func (wi OrchestrationWorkItem) String() string { +func (wi WorkflowWorkItem) String() string { return fmt.Sprintf("%s (%d event(s))", wi.InstanceID, len(wi.NewEvents)) } // IsWorkItem implements core.WorkItem -func (wi OrchestrationWorkItem) IsWorkItem() bool { +func (wi WorkflowWorkItem) IsWorkItem() bool { return true } -func (wi *OrchestrationWorkItem) GetAbandonDelay() time.Duration { +func (wi *WorkflowWorkItem) GetAbandonDelay() time.Duration { switch { case wi.RetryCount == 0: return time.Duration(0) // no delay diff --git a/client/client_grpc.go b/client/client_grpc.go index 52e63309..b1289681 100644 --- a/client/client_grpc.go +++ b/client/client_grpc.go @@ -23,7 +23,7 @@ type TaskHubGrpcClient struct { logger backend.Logger } -// NewTaskHubGrpcClient creates a client that can be used to manage orchestrations over a gRPC connection. +// NewTaskHubGrpcClient creates a client that can be used to manage workflows over a gRPC connection. // The gRPC connection must be to a task hub worker that understands the Durable Task gRPC protocol. func NewTaskHubGrpcClient(cc grpc.ClientConnInterface, logger backend.Logger) *TaskHubGrpcClient { return &TaskHubGrpcClient{ @@ -32,9 +32,9 @@ func NewTaskHubGrpcClient(cc grpc.ClientConnInterface, logger backend.Logger) *T } } -// ScheduleNewOrchestration schedules a new orchestration instance with a specified set of options for execution. -func (c *TaskHubGrpcClient) ScheduleNewOrchestration(ctx context.Context, orchestrator string, opts ...api.NewOrchestrationOptions) (api.InstanceID, error) { - req := &protos.CreateInstanceRequest{Name: orchestrator} +// ScheduleNewWorkflow schedules a new workflow instance with a specified set of options for execution. +func (c *TaskHubGrpcClient) ScheduleNewWorkflow(ctx context.Context, workflow string, opts ...api.NewWorkflowOptions) (api.InstanceID, error) { + req := &protos.CreateInstanceRequest{Name: workflow} for _, configure := range opts { configure(req) } @@ -56,14 +56,14 @@ func (c *TaskHubGrpcClient) ScheduleNewOrchestration(ctx context.Context, orches if ctx.Err() != nil { return api.EmptyInstanceID, ctx.Err() } - return api.EmptyInstanceID, fmt.Errorf("failed to start orchestrator: %w", err) + return api.EmptyInstanceID, fmt.Errorf("failed to start workflow: %w", err) } return api.InstanceID(resp.InstanceId), nil } -// FetchWorkflowMetadata fetches metadata for the specified orchestration from the configured task hub. +// FetchWorkflowMetadata fetches metadata for the specified workflow from the configured task hub. // -// api.ErrInstanceNotFound is returned when the specified orchestration doesn't exist. +// api.ErrInstanceNotFound is returned when the specified workflow doesn't exist. func (c *TaskHubGrpcClient) FetchWorkflowMetadata(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { req := makeGetInstanceRequest(id, opts) resp, err := c.client.GetInstance(ctx, req) @@ -71,16 +71,16 @@ func (c *TaskHubGrpcClient) FetchWorkflowMetadata(ctx context.Context, id api.In if ctx.Err() != nil { return nil, ctx.Err() } - return nil, fmt.Errorf("failed to fetch orchestration metadata: %w", err) + return nil, fmt.Errorf("failed to fetch workflow metadata: %w", err) } return makeWorkflowMetadata(resp) } -// WaitForOrchestrationStart waits for an orchestration to start running and returns an [backend.WorkflowMetadata] object that contains +// WaitForWorkflowStart waits for a workflow to start running and returns an [backend.WorkflowMetadata] object that contains // metadata about the started instance. // -// api.ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *TaskHubGrpcClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { +// api.ErrInstanceNotFound is returned when the specified workflow doesn't exist. +func (c *TaskHubGrpcClient) WaitForWorkflowStart(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { var resp *protos.GetInstanceResponse var err error err = backoff.Retry(func() error { @@ -91,7 +91,7 @@ func (c *TaskHubGrpcClient) WaitForOrchestrationStart(ctx context.Context, id ap if ctx.Err() != nil { return backoff.Permanent(ctx.Err()) } - return fmt.Errorf("failed to wait for orchestration start: %w", err) + return fmt.Errorf("failed to wait for workflow start: %w", err) } return nil }, backoff.WithContext(newInfiniteRetries(), ctx)) @@ -101,11 +101,11 @@ func (c *TaskHubGrpcClient) WaitForOrchestrationStart(ctx context.Context, id ap return makeWorkflowMetadata(resp) } -// WaitForOrchestrationCompletion waits for an orchestration to complete and returns an [backend.WorkflowMetadata] object that contains +// WaitForWorkflowCompletion waits for a workflow to complete and returns an [backend.WorkflowMetadata] object that contains // metadata about the completed instance. // -// api.ErrInstanceNotFound is returned when the specified orchestration doesn't exist. -func (c *TaskHubGrpcClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { +// api.ErrInstanceNotFound is returned when the specified workflow doesn't exist. +func (c *TaskHubGrpcClient) WaitForWorkflowCompletion(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { var resp *protos.GetInstanceResponse var err error err = backoff.Retry(func() error { @@ -116,7 +116,7 @@ func (c *TaskHubGrpcClient) WaitForOrchestrationCompletion(ctx context.Context, if ctx.Err() != nil { return backoff.Permanent(ctx.Err()) } - return fmt.Errorf("failed to wait for orchestration completion: %w", err) + return fmt.Errorf("failed to wait for workflow completion: %w", err) } return nil }, backoff.WithContext(newInfiniteRetries(), ctx)) @@ -126,9 +126,9 @@ func (c *TaskHubGrpcClient) WaitForOrchestrationCompletion(ctx context.Context, return makeWorkflowMetadata(resp) } -// TerminateOrchestration terminates a running orchestration by causing it to stop receiving new events and +// TerminateWorkflow terminates a running workflow by causing it to stop receiving new events and // putting it directly into the TERMINATED state. -func (c *TaskHubGrpcClient) TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error { +func (c *TaskHubGrpcClient) TerminateWorkflow(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error { req := &protos.TerminateRequest{InstanceId: string(id), Recursive: true} for _, configure := range opts { if err := configure(req); err != nil { @@ -146,7 +146,7 @@ func (c *TaskHubGrpcClient) TerminateOrchestration(ctx context.Context, id api.I return nil } -// RaiseEvent sends an asynchronous event notification to a waiting orchestration. +// RaiseEvent sends an asynchronous event notification to a waiting workflow. func (c *TaskHubGrpcClient) RaiseEvent(ctx context.Context, id api.InstanceID, eventName string, opts ...api.RaiseEventOptions) error { req := &protos.RaiseEventRequest{InstanceId: string(id), Name: eventName} for _, configure := range opts { @@ -164,10 +164,10 @@ func (c *TaskHubGrpcClient) RaiseEvent(ctx context.Context, id api.InstanceID, e return nil } -// SuspendOrchestration suspends an orchestration instance, halting processing of its events until a "resume" operation resumes it. +// SuspendWorkflow suspends a workflow instance, halting processing of its events until a "resume" operation resumes it. // -// Note that suspended orchestrations are still considered to be "running" even though they will not process events. -func (c *TaskHubGrpcClient) SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) error { +// Note that suspended workflows are still considered to be "running" even though they will not process events. +func (c *TaskHubGrpcClient) SuspendWorkflow(ctx context.Context, id api.InstanceID, reason string) error { req := &protos.SuspendRequest{ InstanceId: string(id), Reason: wrapperspb.String(reason), @@ -176,13 +176,13 @@ func (c *TaskHubGrpcClient) SuspendOrchestration(ctx context.Context, id api.Ins if ctx.Err() != nil { return ctx.Err() } - return fmt.Errorf("failed to suspend orchestration: %w", err) + return fmt.Errorf("failed to suspend workflow: %w", err) } return nil } -// ResumeOrchestration resumes an orchestration instance that was previously suspended. -func (c *TaskHubGrpcClient) ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) error { +// ResumeWorkflow resumes a workflow instance that was previously suspended. +func (c *TaskHubGrpcClient) ResumeWorkflow(ctx context.Context, id api.InstanceID, reason string) error { req := &protos.ResumeRequest{ InstanceId: string(id), Reason: wrapperspb.String(reason), @@ -191,14 +191,14 @@ func (c *TaskHubGrpcClient) ResumeOrchestration(ctx context.Context, id api.Inst if ctx.Err() != nil { return ctx.Err() } - return fmt.Errorf("failed to resume orchestration: %w", err) + return fmt.Errorf("failed to resume workflow: %w", err) } return nil } -// PurgeWorkflowState deletes the state of the specified orchestration instance. +// PurgeWorkflowState deletes the state of the specified workflow instance. // -// [api.api.ErrInstanceNotFound] is returned if the specified orchestration instance doesn't exist. +// [api.api.ErrInstanceNotFound] is returned if the specified workflow instance doesn't exist. func (c *TaskHubGrpcClient) PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { req := &protos.PurgeInstancesRequest{ Request: &protos.PurgeInstancesRequest_InstanceId{InstanceId: string(id)}, @@ -214,7 +214,7 @@ func (c *TaskHubGrpcClient) PurgeWorkflowState(ctx context.Context, id api.Insta if ctx.Err() != nil { return ctx.Err() } - return fmt.Errorf("failed to purge orchestration state: %w", err) + return fmt.Errorf("failed to purge workflow state: %w", err) } else if res.GetDeletedInstanceCount() == 0 { return api.ErrInstanceNotFound } @@ -299,13 +299,13 @@ func makeGetInstanceRequest(id api.InstanceID, opts []api.FetchWorkflowMetadataO } // makeWorkflowMetadata validates and converts protos.GetInstanceResponse to backend.WorkflowMetadata -// api.ErrInstanceNotFound is returned when the specified orchestration doesn't exist. +// api.ErrInstanceNotFound is returned when the specified workflow doesn't exist. func makeWorkflowMetadata(resp *protos.GetInstanceResponse) (*backend.WorkflowMetadata, error) { if !resp.Exists { return nil, api.ErrInstanceNotFound } if resp.WorkflowState == nil { - return nil, fmt.Errorf("orchestration state is nil") + return nil, fmt.Errorf("workflow state is nil") } metadata := &backend.WorkflowMetadata{ InstanceId: resp.WorkflowState.InstanceId, diff --git a/client/worker_grpc.go b/client/worker_grpc.go index c831e3b7..6ac295e3 100644 --- a/client/worker_grpc.go +++ b/client/worker_grpc.go @@ -148,7 +148,7 @@ func (c *TaskHubGrpcClient) StartWorkItemListener(ctx context.Context, r *task.T } if orchReq := workItem.GetWorkflowRequest(); orchReq != nil { - go c.processOrchestrationWorkItem(ctx, executor, orchReq) + go c.processWorkflowWorkItem(ctx, executor, orchReq) } else if actReq := workItem.GetActivityRequest(); actReq != nil { go c.processActivityWorkItem(ctx, executor, actReq) } else { @@ -159,12 +159,12 @@ func (c *TaskHubGrpcClient) StartWorkItemListener(ctx context.Context, r *task.T return nil } -func (c *TaskHubGrpcClient) processOrchestrationWorkItem( +func (c *TaskHubGrpcClient) processWorkflowWorkItem( ctx context.Context, executor backend.Executor, workItem *protos.WorkflowRequest, ) { - results, err := executor.ExecuteOrchestrator(ctx, api.InstanceID(workItem.InstanceId), workItem.PastEvents, workItem.NewEvents) + results, err := executor.ExecuteWorkflow(ctx, api.InstanceID(workItem.InstanceId), workItem.PastEvents, workItem.NewEvents) resp := protos.WorkflowResponse{InstanceId: workItem.InstanceId} if err != nil { @@ -176,7 +176,7 @@ func (c *TaskHubGrpcClient) processOrchestrationWorkItem( WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ CompleteWorkflow: &protos.CompleteWorkflowAction{ WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, - Result: wrapperspb.String("An internal error occured while executing the orchestration."), + Result: wrapperspb.String("An internal error occured while executing the workflow."), FailureDetails: &protos.TaskFailureDetails{ ErrorType: fmt.Sprintf("%T", err), ErrorMessage: err.Error(), @@ -193,9 +193,9 @@ func (c *TaskHubGrpcClient) processOrchestrationWorkItem( if _, err = c.client.CompleteWorkflowTask(ctx, &resp); err != nil { if ctx.Err() != nil { - c.logger.Warn("failed to complete orchestration task: context canceled") + c.logger.Warn("failed to complete workflow task: context canceled") } else { - c.logger.Errorf("failed to complete orchestration task: %v", err) + c.logger.Errorf("failed to complete workflow task: %v", err) } } } diff --git a/main.go b/main.go index 9cd9e2fa..55f9ec30 100644 --- a/main.go +++ b/main.go @@ -46,13 +46,13 @@ func createTaskHubWorker(server *grpc.Server, sqliteFilePath string, logger back be := sqlite.NewSqliteBackend(sqliteOptions, logger) executor, registerFn := backend.NewGrpcExecutor(be, logger) registerFn(server) - orchestrationWorker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + workflowWorker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: executor, Logger: logger, AppID: "example", }) activityWorker := backend.NewActivityTaskWorker(be, executor, logger) - taskHubWorker := backend.NewTaskHubWorker(be, orchestrationWorker, activityWorker, logger) + taskHubWorker := backend.NewTaskHubWorker(be, workflowWorker, activityWorker, logger) return taskHubWorker } diff --git a/samples/azurefunctions/main.go b/samples/azurefunctions/main.go index 919dc0ef..c41827f4 100644 --- a/samples/azurefunctions/main.go +++ b/samples/azurefunctions/main.go @@ -9,8 +9,8 @@ import ( "github.com/dapr/durabletask-go/task" ) -// HelloCities is an orchestrator function that generates a "hello" message for several cities. -func HelloCities(ctx *task.OrchestrationContext) (any, error) { +// HelloCities is an workflow function that generates a "hello" message for several cities. +func HelloCities(ctx *task.WorkflowContext) (any, error) { var helloTokyo string if err := ctx.CallActivity(SayHello, task.WithActivityInput("Tokyo")).Await(&helloTokyo); err != nil { return nil, err @@ -41,7 +41,7 @@ func main() { listenAddr = ":" + val } - http.HandleFunc("/HelloCities", MapOrchestrator(HelloCities)) + http.HandleFunc("/HelloCities", MapWorkflow(HelloCities)) http.HandleFunc("/SayHello", MapActivity(SayHello)) log.Printf("Listening for function invocations on %s\n", listenAddr) diff --git a/samples/azurefunctions/middleware.go b/samples/azurefunctions/middleware.go index 995b4d35..3b3273e6 100644 --- a/samples/azurefunctions/middleware.go +++ b/samples/azurefunctions/middleware.go @@ -29,10 +29,10 @@ type InvokeResponse struct { ReturnValue json.RawMessage } -func MapOrchestrator(o task.Orchestrator) func(http.ResponseWriter, *http.Request) { +func MapWorkflow(o task.Workflow) func(http.ResponseWriter, *http.Request) { r := task.NewTaskRegistry() - if err := r.AddOrchestratorN("*", o); err != nil { - panic(fmt.Errorf("ERROR: Failed to register the orchestrator function: %w", err)) + if err := r.AddWorkflowN("*", o); err != nil { + panic(fmt.Errorf("ERROR: Failed to register the workflow function: %w", err)) } executor := task.NewTaskExecutor(r) @@ -41,7 +41,7 @@ func MapOrchestrator(o task.Orchestrator) func(http.ResponseWriter, *http.Reques d := json.NewDecoder(httpReq.Body) d.Decode(&invokeRequest) - // TODO: Give the schema, construct the context object and invoke the orchestrator + // TODO: Give the schema, construct the context object and invoke the workflow contextParam := invokeRequest.Data["context"] base64encodedPayload := contextParam.(string) @@ -56,23 +56,23 @@ func MapOrchestrator(o task.Orchestrator) func(http.ResponseWriter, *http.Reques return } - var request protos.OrchestratorRequest + var request protos.WorkflowRequest if err := proto.Unmarshal(protoBytes, &request); err != nil { fmt.Printf("ERROR: Failed to deserialize request protobuf: %v\n", err) return } - fmt.Printf("Orchestrator request for instance ID '%s': %v\n", request.InstanceId, &request) + fmt.Printf("Workflow request for instance ID '%s': %v\n", request.InstanceId, &request) - results, err := executor.ExecuteOrchestrator(context.TODO(), api.InstanceID(request.InstanceId), request.PastEvents, request.NewEvents) + results, err := executor.ExecuteWorkflow(context.TODO(), api.InstanceID(request.InstanceId), request.PastEvents, request.NewEvents) if err != nil { - fmt.Printf("ERROR: Unexpected failure executing the orchestrator function: %v\n", err) + fmt.Printf("ERROR: Unexpected failure executing the workflow function: %v\n", err) return } - fmt.Printf("Orchestrator returned a response: %v\n", results) + fmt.Printf("Workflow returned a response: %v\n", results) respBytes, err := proto.Marshal(results) if err != nil { - fmt.Printf("ERROR: Failed to marshal orchestrator results to protobuf: %v\n", err) + fmt.Printf("ERROR: Failed to marshal workflow results to protobuf: %v\n", err) return } diff --git a/samples/distributedtracing/distributedtracing.go b/samples/distributedtracing/distributedtracing.go index 9d3a6538..5c0f2a0c 100644 --- a/samples/distributedtracing/distributedtracing.go +++ b/samples/distributedtracing/distributedtracing.go @@ -21,7 +21,7 @@ import ( var tracer = otel.Tracer("distributedtracing-example") func main() { - // Tracing can be configured independently of the orchestration code. + // Tracing can be configured independently of the workflow code. tp, err := ConfigureZipkinTracing() if err != nil { log.Fatalf("Failed to create tracer: %v", err) @@ -32,9 +32,9 @@ func main() { } }() - // Create a new task registry and add the orchestrator and activities + // Create a new task registry and add the workflow and activities r := task.NewTaskRegistry() - r.AddOrchestrator(DistributedTraceSampleOrchestrator) + r.AddWorkflow(DistributedTraceSampleWorkflow) r.AddActivity(DoWorkActivity) r.AddActivity(CallHttpEndpointActivity) @@ -46,16 +46,16 @@ func main() { } defer worker.Shutdown(ctx) - // Start a new orchestration - id, err := client.ScheduleNewOrchestration(ctx, DistributedTraceSampleOrchestrator) + // Start a new workflow + id, err := client.ScheduleNewWorkflow(ctx, DistributedTraceSampleWorkflow) if err != nil { - log.Fatalf("Failed to schedule new orchestration: %v", err) + log.Fatalf("Failed to schedule new workflow: %v", err) } - // Wait for the orchestration to complete - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + // Wait for the workflow to complete + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if err != nil { - log.Fatalf("Failed to wait for orchestration to complete: %v", err) + log.Fatalf("Failed to wait for workflow to complete: %v", err) } // Print the results @@ -63,7 +63,7 @@ func main() { if err != nil { log.Fatalf("Failed to encode result to JSON: %v", err) } - log.Printf("Orchestration completed: %v", string(metadataEnc)) + log.Printf("Workflow completed: %v", string(metadataEnc)) } // Init creates and initializes an in-memory client and worker pair with default configuration. @@ -76,13 +76,13 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac // Create a new backend // Use the in-memory sqlite provider by specifying "" be := sqlite.NewSqliteBackend(sqlite.NewSqliteOptions(""), logger) - orchestrationWorker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + workflowWorker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: executor, Logger: logger, }) activityWorker := backend.NewActivityTaskWorker(be, executor, logger) - taskHubWorker := backend.NewTaskHubWorker(be, orchestrationWorker, activityWorker, logger) + taskHubWorker := backend.NewTaskHubWorker(be, workflowWorker, activityWorker, logger) // Start the worker err := taskHubWorker.Start(ctx) @@ -120,9 +120,9 @@ func ConfigureZipkinTracing() (*trace.TracerProvider, error) { return tp, nil } -// DistributedTraceSampleOrchestrator is a simple orchestration that's intended to generate +// DistributedTraceSampleWorkflow is a simple workflow that's intended to generate // distributed trace output to the configured exporter (e.g. zipkin). -func DistributedTraceSampleOrchestrator(ctx *task.OrchestrationContext) (any, error) { +func DistributedTraceSampleWorkflow(ctx *task.WorkflowContext) (any, error) { if err := ctx.CallActivity(DoWorkActivity, task.WithActivityInput(1*time.Second)).Await(nil); err != nil { return nil, err } diff --git a/samples/externalevents/externalevents.go b/samples/externalevents/externalevents.go index 3960e760..a0c933e0 100644 --- a/samples/externalevents/externalevents.go +++ b/samples/externalevents/externalevents.go @@ -13,9 +13,9 @@ import ( ) func main() { - // Create a new task registry and add the orchestrator and activities + // Create a new task registry and add the workflow and activities r := task.NewTaskRegistry() - r.AddOrchestrator(ExternalEventOrchestrator) + r.AddWorkflow(ExternalEventWorkflow) // Init the client ctx := context.Background() @@ -25,17 +25,17 @@ func main() { } defer worker.Shutdown(ctx) - // Start a new orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ExternalEventOrchestrator") + // Start a new workflow + id, err := client.ScheduleNewWorkflow(ctx, "ExternalEventWorkflow") if err != nil { - log.Fatalf("Failed to schedule new orchestration: %v", err) + log.Fatalf("Failed to schedule new workflow: %v", err) } - metadata, err := client.WaitForOrchestrationStart(ctx, id) + metadata, err := client.WaitForWorkflowStart(ctx, id) if err != nil { - log.Fatalf("Failed to wait for orchestration to start: %v", err) + log.Fatalf("Failed to wait for workflow to start: %v", err) } - // Prompt the user for their name and send that to the orchestrator + // Prompt the user for their name and send that to the workflow go func() { fmt.Println("Enter your first name: ") var nameInput string @@ -45,15 +45,15 @@ func main() { } }() - // After the orchestration receives the event, it should complete on its own - metadata, err = client.WaitForOrchestrationCompletion(ctx, id) + // After the workflow receives the event, it should complete on its own + metadata, err = client.WaitForWorkflowCompletion(ctx, id) if err != nil { - log.Fatalf("Failed to wait for orchestration to complete: %v", err) + log.Fatalf("Failed to wait for workflow to complete: %v", err) } if metadata.FailureDetails != nil { - log.Println("orchestration failed:", metadata.FailureDetails.ErrorMessage) + log.Println("workflow failed:", metadata.FailureDetails.ErrorMessage) } else { - log.Println("orchestration completed:", metadata.Output) + log.Println("workflow completed:", metadata.Output) } } @@ -67,13 +67,13 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac // Create a new backend // Use the in-memory sqlite provider by specifying "" be := sqlite.NewSqliteBackend(sqlite.NewSqliteOptions(""), logger) - orchestrationWorker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + workflowWorker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: executor, Logger: logger, }) activityWorker := backend.NewActivityTaskWorker(be, executor, logger) - taskHubWorker := backend.NewTaskHubWorker(be, orchestrationWorker, activityWorker, logger) + taskHubWorker := backend.NewTaskHubWorker(be, workflowWorker, activityWorker, logger) // Start the worker err := taskHubWorker.Start(ctx) @@ -87,9 +87,9 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac return taskHubClient, taskHubWorker, nil } -// ExternalEventOrchestrator is an orchestrator function that blocks for 30 seconds or +// ExternalEventWorkflow is an workflow function that blocks for 30 seconds or // until a "Name" event is sent to it. -func ExternalEventOrchestrator(ctx *task.OrchestrationContext) (any, error) { +func ExternalEventWorkflow(ctx *task.WorkflowContext) (any, error) { var nameInput string if err := ctx.WaitForSingleEvent("Name", 30*time.Second).Await(&nameInput); err != nil { // Timeout expired diff --git a/samples/parallel/parallel.go b/samples/parallel/parallel.go index b950968f..2a15a1ce 100644 --- a/samples/parallel/parallel.go +++ b/samples/parallel/parallel.go @@ -15,9 +15,9 @@ import ( ) func main() { - // Create a new task registry and add the orchestrator and activities + // Create a new task registry and add the workflow and activities r := task.NewTaskRegistry() - r.AddOrchestrator(UpdateDevicesOrchestrator) + r.AddWorkflow(UpdateDevicesWorkflow) r.AddActivity(GetDevicesToUpdate) r.AddActivity(UpdateDevice) @@ -29,16 +29,16 @@ func main() { } defer worker.Shutdown(ctx) - // Start a new orchestration - id, err := client.ScheduleNewOrchestration(ctx, UpdateDevicesOrchestrator) + // Start a new workflow + id, err := client.ScheduleNewWorkflow(ctx, UpdateDevicesWorkflow) if err != nil { - log.Fatalf("Failed to schedule new orchestration: %v", err) + log.Fatalf("Failed to schedule new workflow: %v", err) } - // Wait for the orchestration to complete - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + // Wait for the workflow to complete + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if err != nil { - log.Fatalf("Failed to wait for orchestration to complete: %v", err) + log.Fatalf("Failed to wait for workflow to complete: %v", err) } // Print the results @@ -46,7 +46,7 @@ func main() { if err != nil { log.Fatalf("Failed to encode result to JSON: %v", err) } - log.Printf("Orchestration completed: %v", string(metadataEnc)) + log.Printf("Workflow completed: %v", string(metadataEnc)) } // Init creates and initializes an in-memory client and worker pair with default configuration. @@ -59,13 +59,13 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac // Create a new backend // Use the in-memory sqlite provider by specifying "" be := sqlite.NewSqliteBackend(sqlite.NewSqliteOptions(""), logger) - orchestrationWorker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + workflowWorker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: executor, Logger: logger, }) activityWorker := backend.NewActivityTaskWorker(be, executor, logger) - taskHubWorker := backend.NewTaskHubWorker(be, orchestrationWorker, activityWorker, logger) + taskHubWorker := backend.NewTaskHubWorker(be, workflowWorker, activityWorker, logger) // Start the worker err := taskHubWorker.Start(ctx) @@ -79,8 +79,8 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac return taskHubClient, taskHubWorker, nil } -// UpdateDevicesOrchestrator is an orchestrator that runs activities in parallel -func UpdateDevicesOrchestrator(ctx *task.OrchestrationContext) (any, error) { +// UpdateDevicesWorkflow is an workflow that runs activities in parallel +func UpdateDevicesWorkflow(ctx *task.WorkflowContext) (any, error) { // Get a dynamic list of devices to perform updates on var devices []string if err := ctx.CallActivity(GetDevicesToUpdate).Await(&devices); err != nil { @@ -105,7 +105,7 @@ func UpdateDevicesOrchestrator(ctx *task.OrchestrationContext) (any, error) { return float32(successCount) / float32(len(devices)), nil } -// GetDevicesToUpdate is an activity that returns a list of random device IDs to an orchestration. +// GetDevicesToUpdate is an activity that returns a list of random device IDs to a workflow. func GetDevicesToUpdate(task.ActivityContext) (any, error) { // Return a fake list of device IDs const deviceCount = 10 diff --git a/samples/retries/retries.go b/samples/retries/retries.go index 45fdc7fa..dedbdfdc 100644 --- a/samples/retries/retries.go +++ b/samples/retries/retries.go @@ -14,9 +14,9 @@ import ( ) func main() { - // Create a new task registry and add the orchestrator and activities + // Create a new task registry and add the workflow and activities r := task.NewTaskRegistry() - r.AddOrchestrator(RetryActivityOrchestrator) + r.AddWorkflow(RetryActivityWorkflow) r.AddActivity(RandomFailActivity) // Init the client @@ -27,16 +27,16 @@ func main() { } defer worker.Shutdown(ctx) - // Start a new orchestration - id, err := client.ScheduleNewOrchestration(ctx, RetryActivityOrchestrator) + // Start a new workflow + id, err := client.ScheduleNewWorkflow(ctx, RetryActivityWorkflow) if err != nil { - log.Fatalf("Failed to schedule new orchestration: %v", err) + log.Fatalf("Failed to schedule new workflow: %v", err) } - // Wait for the orchestration to complete - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + // Wait for the workflow to complete + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if err != nil { - log.Fatalf("Failed to wait for orchestration to complete: %v", err) + log.Fatalf("Failed to wait for workflow to complete: %v", err) } // Print the results @@ -44,7 +44,7 @@ func main() { if err != nil { log.Fatalf("Failed to encode result to JSON: %v", err) } - log.Printf("Orchestration completed: %v", string(metadataEnc)) + log.Printf("Workflow completed: %v", string(metadataEnc)) } // Init creates and initializes an in-memory client and worker pair with default configuration. @@ -57,13 +57,13 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac // Create a new backend // Use the in-memory sqlite provider by specifying "" be := sqlite.NewSqliteBackend(sqlite.NewSqliteOptions(""), logger) - orchestrationWorker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + workflowWorker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: executor, Logger: logger, }) activityWorker := backend.NewActivityTaskWorker(be, executor, logger) - taskHubWorker := backend.NewTaskHubWorker(be, orchestrationWorker, activityWorker, logger) + taskHubWorker := backend.NewTaskHubWorker(be, workflowWorker, activityWorker, logger) // Start the worker err := taskHubWorker.Start(ctx) @@ -77,7 +77,7 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac return taskHubClient, taskHubWorker, nil } -func RetryActivityOrchestrator(ctx *task.OrchestrationContext) (any, error) { +func RetryActivityWorkflow(ctx *task.WorkflowContext) (any, error) { if err := ctx.CallActivity(RandomFailActivity, task.WithActivityRetryPolicy(&task.RetryPolicy{ MaxAttempts: 10, InitialRetryInterval: 100 * time.Millisecond, diff --git a/samples/sequence/sequence.go b/samples/sequence/sequence.go index ec940900..4d1877aa 100644 --- a/samples/sequence/sequence.go +++ b/samples/sequence/sequence.go @@ -12,9 +12,9 @@ import ( ) func main() { - // Create a new task registry and add the orchestrator and activities + // Create a new task registry and add the workflow and activities r := task.NewTaskRegistry() - r.AddOrchestrator(ActivitySequenceOrchestrator) + r.AddWorkflow(ActivitySequenceWorkflow) r.AddActivity(SayHelloActivity) // Init the client @@ -25,16 +25,16 @@ func main() { } defer worker.Shutdown(ctx) - // Start a new orchestration - id, err := client.ScheduleNewOrchestration(ctx, ActivitySequenceOrchestrator) + // Start a new workflow + id, err := client.ScheduleNewWorkflow(ctx, ActivitySequenceWorkflow) if err != nil { - log.Fatalf("Failed to schedule new orchestration: %v", err) + log.Fatalf("Failed to schedule new workflow: %v", err) } - // Wait for the orchestration to complete - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + // Wait for the workflow to complete + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if err != nil { - log.Fatalf("Failed to wait for orchestration to complete: %v", err) + log.Fatalf("Failed to wait for workflow to complete: %v", err) } // Print the results @@ -42,7 +42,7 @@ func main() { if err != nil { log.Fatalf("Failed to encode result to JSON: %v", err) } - log.Printf("Orchestration completed: %v", string(metadataEnc)) + log.Printf("Workflow completed: %v", string(metadataEnc)) } // Init creates and initializes an in-memory client and worker pair with default configuration. @@ -55,13 +55,13 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac // Create a new backend // Use the in-memory sqlite provider by specifying "" be := sqlite.NewSqliteBackend(sqlite.NewSqliteOptions(""), logger) - orchestrationWorker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + workflowWorker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: executor, Logger: logger, }) activityWorker := backend.NewActivityTaskWorker(be, executor, logger) - taskHubWorker := backend.NewTaskHubWorker(be, orchestrationWorker, activityWorker, logger) + taskHubWorker := backend.NewTaskHubWorker(be, workflowWorker, activityWorker, logger) // Start the worker err := taskHubWorker.Start(ctx) @@ -75,9 +75,9 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac return taskHubClient, taskHubWorker, nil } -// ActivitySequenceOrchestrator makes three activity calls in sequence and results the results +// ActivitySequenceWorkflow makes three activity calls in sequence and results the results // as an array. -func ActivitySequenceOrchestrator(ctx *task.OrchestrationContext) (any, error) { +func ActivitySequenceWorkflow(ctx *task.WorkflowContext) (any, error) { var helloTokyo string if err := ctx.CallActivity(SayHelloActivity, task.WithActivityInput("Tokyo")).Await(&helloTokyo); err != nil { return nil, err @@ -93,7 +93,7 @@ func ActivitySequenceOrchestrator(ctx *task.OrchestrationContext) (any, error) { return []string{helloTokyo, helloLondon, helloSeattle}, nil } -// SayHelloActivity can be called by an orchestrator function and will return a friendly greeting. +// SayHelloActivity can be called by an workflow function and will return a friendly greeting. func SayHelloActivity(ctx task.ActivityContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { diff --git a/samples/taskexecutionid/taskexecutionid.go b/samples/taskexecutionid/taskexecutionid.go index 5a329b3d..46bdacbf 100644 --- a/samples/taskexecutionid/taskexecutionid.go +++ b/samples/taskexecutionid/taskexecutionid.go @@ -16,9 +16,9 @@ import ( ) func main() { - // Create a new task registry and add the orchestrator and activities + // Create a new task registry and add the workflow and activities r := task.NewTaskRegistry() - must(r.AddOrchestrator(RetryActivityOrchestrator)) + must(r.AddWorkflow(RetryActivityWorkflow)) must(r.AddActivity(RandomFailActivity)) // Init the client @@ -31,16 +31,16 @@ func main() { must(worker.Shutdown(ctx)) }() - // Start a new orchestration - id, err := client.ScheduleNewOrchestration(ctx, RetryActivityOrchestrator) + // Start a new workflow + id, err := client.ScheduleNewWorkflow(ctx, RetryActivityWorkflow) if err != nil { - log.Fatalf("Failed to schedule new orchestration: %v", err) + log.Fatalf("Failed to schedule new workflow: %v", err) } - // Wait for the orchestration to complete - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + // Wait for the workflow to complete + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if err != nil { - log.Fatalf("Failed to wait for orchestration to complete: %v", err) + log.Fatalf("Failed to wait for workflow to complete: %v", err) } // Print the results @@ -48,7 +48,7 @@ func main() { if err != nil { log.Fatalf("Failed to encode result to JSON: %v", err) } - log.Printf("Orchestration completed: %v", string(metadataEnc)) + log.Printf("Workflow completed: %v", string(metadataEnc)) } // Init creates and initializes an in-memory client and worker pair with default configuration. @@ -61,13 +61,13 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac // Create a new backend // Use the in-memory sqlite provider by specifying "" be := sqlite.NewSqliteBackend(sqlite.NewSqliteOptions(""), logger) - orchestrationWorker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + workflowWorker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: executor, Logger: logger, }) activityWorker := backend.NewActivityTaskWorker(be, executor, logger) - taskHubWorker := backend.NewTaskHubWorker(be, orchestrationWorker, activityWorker, logger) + taskHubWorker := backend.NewTaskHubWorker(be, workflowWorker, activityWorker, logger) // Start the worker err := taskHubWorker.Start(ctx) @@ -81,7 +81,7 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac return taskHubClient, taskHubWorker, nil } -func RetryActivityOrchestrator(ctx *task.OrchestrationContext) (any, error) { +func RetryActivityWorkflow(ctx *task.WorkflowContext) (any, error) { t := ctx.CallActivity(RandomFailActivity, task.WithActivityRetryPolicy(&task.RetryPolicy{ MaxAttempts: 10, InitialRetryInterval: 100 * time.Millisecond, diff --git a/submodules/durabletask-protobuf b/submodules/durabletask-protobuf index e562b416..b21e2def 160000 --- a/submodules/durabletask-protobuf +++ b/submodules/durabletask-protobuf @@ -1 +1 @@ -Subproject commit e562b416c6286c41159efe833f8a27c85851538a +Subproject commit b21e2def4d2ecf326493e743424e622b33a0c012 diff --git a/task/executor.go b/task/executor.go index a6158133..5608b4ca 100644 --- a/task/executor.go +++ b/task/executor.go @@ -18,7 +18,7 @@ type taskExecutor struct { Registry *TaskRegistry } -// NewTaskExecutor returns a [backend.Executor] implementation that executes orchestrator and activity functions in-memory. +// NewTaskExecutor returns a [backend.Executor] implementation that executes workflow and activity functions in-memory. func NewTaskExecutor(registry *TaskRegistry) backend.Executor { return &taskExecutor{ Registry: registry, @@ -127,28 +127,28 @@ func (te *taskExecutor) ExecuteActivity(ctx context.Context, id api.InstanceID, }, nil } -// ExecuteOrchestrator implements backend.Executor and executes an orchestrator function in the current goroutine. -func (te *taskExecutor) ExecuteOrchestrator(ctx context.Context, id api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.OrchestratorResponse, error) { - orchestrationCtx := NewOrchestrationContext(te.Registry, id, oldEvents, newEvents) - actions := orchestrationCtx.start() +// ExecuteWorkflow implements backend.Executor and executes an workflow function in the current goroutine. +func (te *taskExecutor) ExecuteWorkflow(ctx context.Context, id api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.WorkflowResponse, error) { + workflowCtx := NewWorkflowContext(te.Registry, id, oldEvents, newEvents) + actions := workflowCtx.start() - response := &protos.OrchestratorResponse{ + response := &protos.WorkflowResponse{ InstanceId: string(id), Actions: actions, - CustomStatus: wrapperspb.String(orchestrationCtx.customStatus), + CustomStatus: wrapperspb.String(workflowCtx.customStatus), } - if len(orchestrationCtx.encounteredPatches) > 0 { + if len(workflowCtx.encounteredPatches) > 0 { if response.Version == nil { - response.Version = new(protos.OrchestrationVersion) + response.Version = new(protos.WorkflowVersion) } - response.Version.Patches = orchestrationCtx.encounteredPatches + response.Version.Patches = workflowCtx.encounteredPatches } - if orchestrationCtx.VersionName != nil { + if workflowCtx.VersionName != nil { if response.Version == nil { - response.Version = new(protos.OrchestrationVersion) + response.Version = new(protos.WorkflowVersion) } - response.Version.Name = orchestrationCtx.VersionName + response.Version.Name = workflowCtx.VersionName } return response, nil diff --git a/task/orchestrator.go b/task/orchestrator.go index 4c7ca9b6..7d816918 100644 --- a/task/orchestrator.go +++ b/task/orchestrator.go @@ -20,11 +20,11 @@ import ( "github.com/dapr/kit/ptr" ) -// Orchestrator is the functional interface for orchestrator functions. -type Orchestrator func(ctx *OrchestrationContext) (any, error) +// Workflow is the functional interface for workflow functions. +type Workflow func(ctx *WorkflowContext) (any, error) -// OrchestrationContext is the parameter type for orchestrator functions. -type OrchestrationContext struct { +// WorkflowContext is the parameter type for workflow functions. +type WorkflowContext struct { ID api.InstanceID Name string VersionName *string @@ -39,7 +39,7 @@ type OrchestrationContext struct { isSuspended bool historyIndex int sequenceNumber int32 - pendingActions map[int32]*protos.OrchestratorAction + pendingActions map[int32]*protos.WorkflowAction pendingTasks map[int32]*completableTask continuedAsNew bool continuedAsNewInput any @@ -53,23 +53,23 @@ type OrchestrationContext struct { encounteredPatches []string } -// callSubOrchestratorOptions is a struct that holds the options for the CallSubOrchestrator orchestrator method. -type callSubOrchestratorOptions struct { +// callChildWorkflowOptions is a struct that holds the options for the CallChildWorkflow workflow method. +type callChildWorkflowOptions struct { instanceID string rawInput *wrapperspb.StringValue targetAppID *string retryPolicy *RetryPolicy } -// SubOrchestratorOption is a functional option type for the CallSubOrchestrator orchestrator method. -type SubOrchestratorOption func(*callSubOrchestratorOptions) error +// ChildWorkflowOption is a functional option type for the CallChildWorkflow workflow method. +type ChildWorkflowOption func(*callChildWorkflowOptions) error -// ContinueAsNewOption is a functional option type for the ContinueAsNew orchestrator method. -type ContinueAsNewOption func(*OrchestrationContext) +// ContinueAsNewOption is a functional option type for the ContinueAsNew workflow method. +type ContinueAsNewOption func(*WorkflowContext) -// WithSubOrchestratorAppID is a functional option type for the CallSubOrchestrator orchestrator method that specifies the app ID of the target activity. -func WithSubOrchestratorAppID(appID string) SubOrchestratorOption { - return func(opts *callSubOrchestratorOptions) error { +// WithChildWorkflowAppID is a functional option type for the CallChildWorkflow workflow method that specifies the app ID of the target activity. +func WithChildWorkflowAppID(appID string) ChildWorkflowOption { + return func(opts *callChildWorkflowOptions) error { opts.targetAppID = &appID return nil } @@ -78,15 +78,15 @@ func WithSubOrchestratorAppID(appID string) SubOrchestratorOption { // WithKeepUnprocessedEvents returns a ContinueAsNewOptions struct that instructs the // runtime to carry forward any unprocessed external events to the new instance. func WithKeepUnprocessedEvents() ContinueAsNewOption { - return func(ctx *OrchestrationContext) { + return func(ctx *WorkflowContext) { ctx.saveBufferedExternalEvents = true } } -// WithSubOrchestratorInput is a functional option type for the CallSubOrchestrator -// orchestrator method that takes an input value and marshals it to JSON. -func WithSubOrchestratorInput(input any) SubOrchestratorOption { - return func(opts *callSubOrchestratorOptions) error { +// WithChildWorkflowInput is a functional option type for the CallChildWorkflow +// workflow method that takes an input value and marshals it to JSON. +func WithChildWorkflowInput(input any) ChildWorkflowOption { + return func(opts *callChildWorkflowOptions) error { bytes, err := marshalData(input) if err != nil { return fmt.Errorf("failed to marshal input to JSON: %w", err) @@ -96,26 +96,26 @@ func WithSubOrchestratorInput(input any) SubOrchestratorOption { } } -// WithRawSubOrchestratorInput is a functional option type for the CallSubOrchestrator -// orchestrator method that takes a raw input value. -func WithRawSubOrchestratorInput(input *wrapperspb.StringValue) SubOrchestratorOption { - return func(opts *callSubOrchestratorOptions) error { +// WithRawChildWorkflowInput is a functional option type for the CallChildWorkflow +// workflow method that takes a raw input value. +func WithRawChildWorkflowInput(input *wrapperspb.StringValue) ChildWorkflowOption { + return func(opts *callChildWorkflowOptions) error { opts.rawInput = input return nil } } -// WithSubOrchestrationInstanceID is a functional option type for the CallSubOrchestrator -// orchestrator method that specifies the instance ID of the sub-orchestration. -func WithSubOrchestrationInstanceID(instanceID string) SubOrchestratorOption { - return func(opts *callSubOrchestratorOptions) error { +// WithChildWorkflowInstanceID is a functional option type for the CallChildWorkflow +// workflow method that specifies the instance ID of the child workflow. +func WithChildWorkflowInstanceID(instanceID string) ChildWorkflowOption { + return func(opts *callChildWorkflowOptions) error { opts.instanceID = instanceID return nil } } -func WithSubOrchestrationRetryPolicy(policy *RetryPolicy) SubOrchestratorOption { - return func(opt *callSubOrchestratorOptions) error { +func WithChildWorkflowRetryPolicy(policy *RetryPolicy) ChildWorkflowOption { + return func(opt *callChildWorkflowOptions) error { if policy == nil { return nil } @@ -128,9 +128,9 @@ func WithSubOrchestrationRetryPolicy(policy *RetryPolicy) SubOrchestratorOption } } -// NewOrchestrationContext returns a new [OrchestrationContext] struct with the specified parameters. -func NewOrchestrationContext(registry *TaskRegistry, id api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) *OrchestrationContext { - return &OrchestrationContext{ +// NewWorkflowContext returns a new [WorkflowContext] struct with the specified parameters. +func NewWorkflowContext(registry *TaskRegistry, id api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) *WorkflowContext { + return &WorkflowContext{ ID: id, registry: registry, oldEvents: oldEvents, @@ -143,10 +143,10 @@ func NewOrchestrationContext(registry *TaskRegistry, id api.InstanceID, oldEvent } } -func (ctx *OrchestrationContext) start() (actions []*protos.OrchestratorAction) { +func (ctx *WorkflowContext) start() (actions []*protos.WorkflowAction) { ctx.historyIndex = 0 ctx.sequenceNumber = 0 - ctx.pendingActions = make(map[int32]*protos.OrchestratorAction) + ctx.pendingActions = make(map[int32]*protos.WorkflowAction) ctx.pendingTasks = make(map[int32]*completableTask) defer func() { @@ -169,14 +169,14 @@ func (ctx *OrchestrationContext) start() (actions []*protos.OrchestratorAction) ctx.setFailed(err) break } else if !ok { - // Orchestrator finished, break out of the loop and return any pending actions + // Workflow finished, break out of the loop and return any pending actions break } } return ctx.actions() } -func (ctx *OrchestrationContext) processNextEvent() (bool, error) { +func (ctx *WorkflowContext) processNextEvent() (bool, error) { e, ok := ctx.getNextHistoryEvent() if !ok { // No more history @@ -190,7 +190,7 @@ func (ctx *OrchestrationContext) processNextEvent() (bool, error) { return true, nil } -func (ctx *OrchestrationContext) getNextHistoryEvent() (*protos.HistoryEvent, bool) { +func (ctx *WorkflowContext) getNextHistoryEvent() (*protos.HistoryEvent, bool) { var historyList []*protos.HistoryEvent index := ctx.historyIndex if ctx.historyIndex >= len(ctx.oldEvents)+len(ctx.newEvents) { @@ -209,7 +209,7 @@ func (ctx *OrchestrationContext) getNextHistoryEvent() (*protos.HistoryEvent, bo return e, true } -func (ctx *OrchestrationContext) processEvent(e *backend.HistoryEvent) error { +func (ctx *WorkflowContext) processEvent(e *backend.HistoryEvent) error { // Buffer certain events if we're in a suspended state if ctx.isSuspended && (e.GetExecutionResumed() == nil && e.GetExecutionTerminated() == nil) { ctx.suspendedEvents = append(ctx.suspendedEvents, e) @@ -217,8 +217,8 @@ func (ctx *OrchestrationContext) processEvent(e *backend.HistoryEvent) error { } var err error = nil - if os := e.GetOrchestratorStarted(); os != nil { - // OrchestratorStarted is only used to update the current orchestration time and history patches + if os := e.GetWorkflowStarted(); os != nil { + // WorkflowStarted is only used to update the current workflow time and history patches ctx.CurrentTimeUtc = e.Timestamp.AsTime() if version := os.GetVersion(); version != nil { for _, p := range version.GetPatches() { @@ -236,12 +236,12 @@ func (ctx *OrchestrationContext) processEvent(e *backend.HistoryEvent) error { err = ctx.onTaskCompleted(tc) } else if tf := e.GetTaskFailed(); tf != nil { err = ctx.onTaskFailed(tf) - } else if ts := e.GetSubOrchestrationInstanceCreated(); ts != nil { - err = ctx.onSubOrchestrationScheduled(e.EventId, ts) - } else if sc := e.GetSubOrchestrationInstanceCompleted(); sc != nil { - err = ctx.onSubOrchestrationCompleted(sc) - } else if sf := e.GetSubOrchestrationInstanceFailed(); sf != nil { - err = ctx.onSubOrchestrationFailed(sf) + } else if ts := e.GetChildWorkflowInstanceCreated(); ts != nil { + err = ctx.onChildWorkflowScheduled(e.EventId, ts) + } else if sc := e.GetChildWorkflowInstanceCompleted(); sc != nil { + err = ctx.onChildWorkflowCompleted(sc) + } else if sf := e.GetChildWorkflowInstanceFailed(); sf != nil { + err = ctx.onChildWorkflowFailed(sf) } else if tc := e.GetTimerCreated(); tc != nil { err = ctx.onTimerCreated(e) } else if tf := e.GetTimerFired(); tf != nil { @@ -256,7 +256,7 @@ func (ctx *OrchestrationContext) processEvent(e *backend.HistoryEvent) error { err = ctx.onExecutionTerminated(et) } else if e.GetExecutionStalled() != nil { // Nothing to do - } else if oc := e.GetOrchestratorCompleted(); oc != nil { + } else if oc := e.GetWorkflowCompleted(); oc != nil { // Nothing to do } else { err = fmt.Errorf("don't know how to handle event: %v", e) @@ -264,19 +264,19 @@ func (ctx *OrchestrationContext) processEvent(e *backend.HistoryEvent) error { return err } -func (octx *OrchestrationContext) SetCustomStatus(cs string) { +func (octx *WorkflowContext) SetCustomStatus(cs string) { octx.customStatus = cs } -// GetInput unmarshals the serialized orchestration input and stores it in [v]. -func (octx *OrchestrationContext) GetInput(v any) error { +// GetInput unmarshals the serialized workflow input and stores it in [v]. +func (octx *WorkflowContext) GetInput(v any) error { return unmarshalData(octx.rawInput, v) } // CallActivity schedules an asynchronous invocation of an activity function. The [activity] // parameter can be either the name of an activity as a string or can be a pointer to the function // that implements the activity, in which case the name is obtained via reflection. -func (ctx *OrchestrationContext) CallActivity(activity interface{}, opts ...CallActivityOption) Task { +func (ctx *WorkflowContext) CallActivity(activity interface{}, opts ...CallActivityOption) Task { options := new(callActivityOptions) for _, configure := range opts { if err := configure(options); err != nil { @@ -300,10 +300,10 @@ func (ctx *OrchestrationContext) CallActivity(activity interface{}, opts ...Call return ctx.internalScheduleActivity(activityName, uuid.NewString(), options) } -func (ctx *OrchestrationContext) internalScheduleActivity(activityName, taskExecutionId string, options *callActivityOptions) Task { - scheduleTaskAction := &protos.OrchestratorAction{ +func (ctx *WorkflowContext) internalScheduleActivity(activityName, taskExecutionId string, options *callActivityOptions) Task { + scheduleTaskAction := &protos.WorkflowAction{ Id: ctx.getNextSequenceNumber(), - OrchestratorActionType: &protos.OrchestratorAction_ScheduleTask{ + WorkflowActionType: &protos.WorkflowAction_ScheduleTask{ ScheduleTask: &protos.ScheduleTaskAction{Name: activityName, TaskExecutionId: taskExecutionId, Input: options.rawInput}, }, } @@ -321,8 +321,8 @@ func (ctx *OrchestrationContext) internalScheduleActivity(activityName, taskExec return task } -func (ctx *OrchestrationContext) CallSubOrchestrator(orchestrator interface{}, opts ...SubOrchestratorOption) Task { - options := new(callSubOrchestratorOptions) +func (ctx *WorkflowContext) CallChildWorkflow(workflow interface{}, opts ...ChildWorkflowOption) Task { + options := new(callChildWorkflowOptions) for _, configure := range opts { if err := configure(options); err != nil { failedTask := newTask(ctx) @@ -334,23 +334,23 @@ func (ctx *OrchestrationContext) CallSubOrchestrator(orchestrator interface{}, o } } - orchestratorName := helpers.GetTaskFunctionName(orchestrator) + workflowName := helpers.GetTaskFunctionName(workflow) if options.retryPolicy != nil { - return ctx.internalScheduleTaskWithRetries(orchestratorName+"-retry", ctx.CurrentTimeUtc, func(_ string) Task { - return ctx.internalCallSubOrchestrator(orchestratorName, options) + return ctx.internalScheduleTaskWithRetries(workflowName+"-retry", ctx.CurrentTimeUtc, func(_ string) Task { + return ctx.internalCallChildWorkflow(workflowName, options) }, *options.retryPolicy, 0, uuid.NewString()) } - return ctx.internalCallSubOrchestrator(orchestratorName, options) + return ctx.internalCallChildWorkflow(workflowName, options) } -func (ctx *OrchestrationContext) internalCallSubOrchestrator(orchestratorName string, options *callSubOrchestratorOptions) Task { - createSubOrchestrationAction := &protos.OrchestratorAction{ +func (ctx *WorkflowContext) internalCallChildWorkflow(workflowName string, options *callChildWorkflowOptions) Task { + createChildWorkflowAction := &protos.WorkflowAction{ Id: ctx.getNextSequenceNumber(), - OrchestratorActionType: &protos.OrchestratorAction_CreateSubOrchestration{ - CreateSubOrchestration: &protos.CreateSubOrchestrationAction{ - Name: orchestratorName, + WorkflowActionType: &protos.WorkflowAction_CreateChildWorkflow{ + CreateChildWorkflow: &protos.CreateChildWorkflowAction{ + Name: workflowName, Input: options.rawInput, InstanceId: options.instanceID, }, @@ -358,19 +358,19 @@ func (ctx *OrchestrationContext) internalCallSubOrchestrator(orchestratorName st } if options.targetAppID != nil { - createSubOrchestrationAction.Router = &protos.TaskRouter{ + createChildWorkflowAction.Router = &protos.TaskRouter{ TargetAppID: ptr.Of(*options.targetAppID), } } - ctx.pendingActions[createSubOrchestrationAction.Id] = createSubOrchestrationAction + ctx.pendingActions[createChildWorkflowAction.Id] = createChildWorkflowAction task := newTask(ctx) - ctx.pendingTasks[createSubOrchestrationAction.Id] = task + ctx.pendingTasks[createChildWorkflowAction.Id] = task return task } -func (ctx *OrchestrationContext) internalScheduleTaskWithRetries(name string, initialAttempt time.Time, schedule func(taskExecutionId string) Task, policy RetryPolicy, retryCount int, taskExecutionId string) Task { +func (ctx *WorkflowContext) internalScheduleTaskWithRetries(name string, initialAttempt time.Time, schedule func(taskExecutionId string) Task, policy RetryPolicy, retryCount int, taskExecutionId string) Task { return &taskWrapper{ delegate: schedule(taskExecutionId), onAwaitResult: func(v any, taskExecutionId string, err error) error { @@ -422,7 +422,7 @@ func computeNextDelay(currentTimeUtc time.Time, policy RetryPolicy, attempt int, } // CreateTimer schedules a durable timer that expires after the specified delay. -func (ctx *OrchestrationContext) CreateTimer(delay time.Duration, opts ...CreateTimerOption) Task { +func (ctx *WorkflowContext) CreateTimer(delay time.Duration, opts ...CreateTimerOption) Task { options := new(createTimerOptions) for _, configure := range opts { if err := configure(options); err != nil { @@ -437,11 +437,11 @@ func (ctx *OrchestrationContext) CreateTimer(delay time.Duration, opts ...Create return ctx.createTimerInternal(options.name, delay) } -func (ctx *OrchestrationContext) createTimerInternal(name *string, delay time.Duration) *completableTask { +func (ctx *WorkflowContext) createTimerInternal(name *string, delay time.Duration) *completableTask { fireAt := ctx.CurrentTimeUtc.Add(delay) - timerAction := &protos.OrchestratorAction{ + timerAction := &protos.WorkflowAction{ Id: ctx.getNextSequenceNumber(), - OrchestratorActionType: &protos.OrchestratorAction_CreateTimer{ + WorkflowActionType: &protos.WorkflowAction_CreateTimer{ CreateTimer: &protos.CreateTimerAction{ FireAt: timestamppb.New(fireAt), Name: name, @@ -455,7 +455,7 @@ func (ctx *OrchestrationContext) createTimerInternal(name *string, delay time.Du return task } -// WaitForSingleEvent creates a task that is completed only after an event named [eventName] is received by this orchestration +// WaitForSingleEvent creates a task that is completed only after an event named [eventName] is received by this workflow // or when the specified timeout expires. // // The [timeout] parameter can be used to define a timeout for receiving the event. If the timeout expires before the @@ -464,11 +464,11 @@ func (ctx *OrchestrationContext) createTimerInternal(name *string, delay time.Du // of zero returns a canceled task if the event isn't already available in the history. Use a negative Duration to // wait indefinitely for the event to be received. // -// Orchestrators can wait for the same event name multiple times, so waiting for multiple events with the same name -// is allowed. Each event received by an orchestrator will complete just one task returned by this method. +// Workflows can wait for the same event name multiple times, so waiting for multiple events with the same name +// is allowed. Each event received by an workflow will complete just one task returned by this method. // // Note that event names are case-insensitive. -func (ctx *OrchestrationContext) WaitForSingleEvent(eventName string, timeout time.Duration) Task { +func (ctx *WorkflowContext) WaitForSingleEvent(eventName string, timeout time.Duration) Task { task := newTask(ctx) key := strings.ToUpper(eventName) if eventList, ok := ctx.bufferedExternalEvents[key]; ok { @@ -508,7 +508,7 @@ func (ctx *OrchestrationContext) WaitForSingleEvent(eventName string, timeout ti return task } -func (ctx *OrchestrationContext) ContinueAsNew(newInput any, options ...ContinueAsNewOption) { +func (ctx *WorkflowContext) ContinueAsNew(newInput any, options ...ContinueAsNewOption) { ctx.continuedAsNew = true ctx.continuedAsNewInput = newInput for _, option := range options { @@ -516,7 +516,7 @@ func (ctx *OrchestrationContext) ContinueAsNew(newInput any, options ...Continue } } -func (ctx *OrchestrationContext) IsPatched(patchName string) bool { +func (ctx *WorkflowContext) IsPatched(patchName string) bool { isPatched := ctx.isPatched(patchName) if isPatched { ctx.encounteredPatches = append(ctx.encounteredPatches, patchName) @@ -524,7 +524,7 @@ func (ctx *OrchestrationContext) IsPatched(patchName string) bool { return isPatched } -func (ctx *OrchestrationContext) isPatched(patchName string) bool { +func (ctx *WorkflowContext) isPatched(patchName string) bool { if patched, exists := ctx.appliedPatches[patchName]; exists { return patched } @@ -546,41 +546,41 @@ func (ctx *OrchestrationContext) isPatched(patchName string) bool { return true } -func (ctx *OrchestrationContext) getOrchestrator(es *protos.ExecutionStartedEvent) (Orchestrator, error) { - orchestrator, ok := ctx.registry.orchestrators[es.Name] +func (ctx *WorkflowContext) getWorkflow(es *protos.ExecutionStartedEvent) (Workflow, error) { + workflow, ok := ctx.registry.workflows[es.Name] if ok { - return orchestrator, nil + return workflow, nil } - if versions, ok := ctx.registry.versionedOrchestrators[es.Name]; ok { + if versions, ok := ctx.registry.versionedWorkflows[es.Name]; ok { var versionToUse string if ctx.VersionName != nil { versionToUse = *ctx.VersionName } else { - if latest, ok := ctx.registry.latestVersionedOrchestrators[es.Name]; ok { + if latest, ok := ctx.registry.latestVersionedWorkflows[es.Name]; ok { versionToUse = latest } else { return nil, fmt.Errorf("versioned workflow '%s' does not have a latest version registered", es.Name) } } - if orchestrator, ok = versions[versionToUse]; ok { + if workflow, ok = versions[versionToUse]; ok { ctx.VersionName = &versionToUse - return orchestrator, nil + return workflow, nil } else { return nil, api.NewUnsupportedVersionError() } } - if orchestrator, ok = ctx.registry.orchestrators["*"]; ok { - return orchestrator, nil + if workflow, ok = ctx.registry.workflows["*"]; ok { + return workflow, nil } - return nil, fmt.Errorf("orchestrator named '%s' is not registered", es.Name) + return nil, fmt.Errorf("workflow named '%s' is not registered", es.Name) } -func (ctx *OrchestrationContext) onExecutionStarted(es *protos.ExecutionStartedEvent) error { - orchestrator, err := ctx.getOrchestrator(es) +func (ctx *WorkflowContext) onExecutionStarted(es *protos.ExecutionStartedEvent) error { + workflow, err := ctx.getWorkflow(es) if err != nil { return err } @@ -589,7 +589,7 @@ func (ctx *OrchestrationContext) onExecutionStarted(es *protos.ExecutionStartedE ctx.rawInput = []byte(es.Input.Value) } - output, appError := orchestrator(ctx) + output, appError := workflow(ctx) if appError != nil { err = ctx.setFailed(appError) @@ -600,7 +600,7 @@ func (ctx *OrchestrationContext) onExecutionStarted(es *protos.ExecutionStartedE } if appError == nil && err != nil { - completionErr := fmt.Errorf("failed to complete the orchestration: %w", err) + completionErr := fmt.Errorf("failed to complete the workflow: %w", err) if err2 := ctx.setFailed(completionErr); err2 != nil { return completionErr } @@ -608,10 +608,10 @@ func (ctx *OrchestrationContext) onExecutionStarted(es *protos.ExecutionStartedE return nil } -func (ctx *OrchestrationContext) onTaskScheduled(taskID int32, ts *protos.TaskScheduledEvent) error { +func (ctx *WorkflowContext) onTaskScheduled(taskID int32, ts *protos.TaskScheduledEvent) error { if a, ok := ctx.pendingActions[taskID]; !ok || a.GetScheduleTask() == nil { return fmt.Errorf( - "a previous execution called CallActivity for '%s' and sequence number %d at this point in the orchestration logic, but the current execution doesn't have this action with this sequence number", + "a previous execution called CallActivity for '%s' and sequence number %d at this point in the workflow logic, but the current execution doesn't have this action with this sequence number", ts.Name, taskID, ) @@ -620,13 +620,13 @@ func (ctx *OrchestrationContext) onTaskScheduled(taskID int32, ts *protos.TaskSc return nil } -func (ctx *OrchestrationContext) onTaskCompleted(tc *protos.TaskCompletedEvent) error { +func (ctx *WorkflowContext) onTaskCompleted(tc *protos.TaskCompletedEvent) error { taskID := tc.TaskScheduledId task, ok := ctx.pendingTasks[taskID] if !ok { - // TODO: This could be a duplicate event or it could be a non-deterministic orchestration. + // TODO: This could be a duplicate event or it could be a non-deterministic workflow. // Duplicate events should be handled gracefully with a warning. Otherwise, the - // orchestration should probably fail with an error. + // workflow should probably fail with an error. return nil } delete(ctx.pendingTasks, taskID) @@ -639,13 +639,13 @@ func (ctx *OrchestrationContext) onTaskCompleted(tc *protos.TaskCompletedEvent) return nil } -func (ctx *OrchestrationContext) onTaskFailed(tf *protos.TaskFailedEvent) error { +func (ctx *WorkflowContext) onTaskFailed(tf *protos.TaskFailedEvent) error { taskID := tf.TaskScheduledId task, ok := ctx.pendingTasks[taskID] if !ok { - // TODO: This could be a duplicate event or it could be a non-deterministic orchestration. + // TODO: This could be a duplicate event or it could be a non-deterministic workflow. // Duplicate events should be handled gracefully with a warning. Otherwise, the - // orchestration should probably fail with an error. + // workflow should probably fail with an error. return nil } delete(ctx.pendingTasks, taskID) @@ -656,10 +656,10 @@ func (ctx *OrchestrationContext) onTaskFailed(tf *protos.TaskFailedEvent) error return nil } -func (ctx *OrchestrationContext) onSubOrchestrationScheduled(taskID int32, ts *protos.SubOrchestrationInstanceCreatedEvent) error { - if a, ok := ctx.pendingActions[taskID]; !ok || a.GetCreateSubOrchestration() == nil { +func (ctx *WorkflowContext) onChildWorkflowScheduled(taskID int32, ts *protos.ChildWorkflowInstanceCreatedEvent) error { + if a, ok := ctx.pendingActions[taskID]; !ok || a.GetCreateChildWorkflow() == nil { return fmt.Errorf( - "a previous execution called CallSubOrchestrator for '%s' and sequence number %d at this point in the orchestration logic, but the current execution doesn't have this action with this sequence number", + "a previous execution called CallChildWorkflow for '%s' and sequence number %d at this point in the workflow logic, but the current execution doesn't have this action with this sequence number", ts.Name, taskID, ) @@ -668,13 +668,13 @@ func (ctx *OrchestrationContext) onSubOrchestrationScheduled(taskID int32, ts *p return nil } -func (ctx *OrchestrationContext) onSubOrchestrationCompleted(soc *protos.SubOrchestrationInstanceCompletedEvent) error { +func (ctx *WorkflowContext) onChildWorkflowCompleted(soc *protos.ChildWorkflowInstanceCompletedEvent) error { taskID := soc.TaskScheduledId task, ok := ctx.pendingTasks[taskID] if !ok { - // TODO: This could be a duplicate event or it could be a non-deterministic orchestration. + // TODO: This could be a duplicate event or it could be a non-deterministic workflow. // Duplicate events should be handled gracefully with a warning. Otherwise, the - // orchestration should probably fail with an error. + // workflow should probably fail with an error. return nil } delete(ctx.pendingTasks, taskID) @@ -688,13 +688,13 @@ func (ctx *OrchestrationContext) onSubOrchestrationCompleted(soc *protos.SubOrch return nil } -func (ctx *OrchestrationContext) onSubOrchestrationFailed(sof *protos.SubOrchestrationInstanceFailedEvent) error { +func (ctx *WorkflowContext) onChildWorkflowFailed(sof *protos.ChildWorkflowInstanceFailedEvent) error { taskID := sof.TaskScheduledId task, ok := ctx.pendingTasks[taskID] if !ok { - // TODO: This could be a duplicate event or it could be a non-deterministic orchestration. + // TODO: This could be a duplicate event or it could be a non-deterministic workflow. // Duplicate events should be handled gracefully with a warning. Otherwise, the - // orchestration should probably fail with an error. + // workflow should probably fail with an error. return nil } delete(ctx.pendingTasks, taskID) @@ -704,7 +704,7 @@ func (ctx *OrchestrationContext) onSubOrchestrationFailed(sof *protos.SubOrchest return nil } -func (ctx *OrchestrationContext) onTimerCreated(e *protos.HistoryEvent) error { +func (ctx *WorkflowContext) onTimerCreated(e *protos.HistoryEvent) error { if a, ok := ctx.pendingActions[e.EventId]; !ok || a.GetCreateTimer() == nil { return fmt.Errorf( "a previous execution called CreateTimer with sequence number %d, but the current execution doesn't have this action with this sequence number", @@ -715,13 +715,13 @@ func (ctx *OrchestrationContext) onTimerCreated(e *protos.HistoryEvent) error { return nil } -func (ctx *OrchestrationContext) onTimerFired(tf *protos.TimerFiredEvent) error { +func (ctx *WorkflowContext) onTimerFired(tf *protos.TimerFiredEvent) error { timerID := tf.TimerId task, ok := ctx.pendingTasks[timerID] if !ok { - // TODO: This could be a duplicate event or it could be a non-deterministic orchestration. + // TODO: This could be a duplicate event or it could be a non-deterministic workflow. // Duplicate events should be handled gracefully with a warning. Otherwise, the - // orchestration should probably fail with an error. + // workflow should probably fail with an error. return nil } delete(ctx.pendingTasks, timerID) @@ -731,7 +731,7 @@ func (ctx *OrchestrationContext) onTimerFired(tf *protos.TimerFiredEvent) error return nil } -func (ctx *OrchestrationContext) onExternalEventRaised(e *protos.HistoryEvent) error { +func (ctx *WorkflowContext) onExternalEventRaised(e *protos.HistoryEvent) error { er := e.GetEventRaised() key := strings.ToUpper(er.GetName()) if pendingTasks, ok := ctx.pendingExternalEventTasks[key]; ok { @@ -758,12 +758,12 @@ func (ctx *OrchestrationContext) onExternalEventRaised(e *protos.HistoryEvent) e return nil } -func (ctx *OrchestrationContext) onExecutionSuspended(er *protos.ExecutionSuspendedEvent) error { +func (ctx *WorkflowContext) onExecutionSuspended(er *protos.ExecutionSuspendedEvent) error { ctx.isSuspended = true return nil } -func (ctx *OrchestrationContext) onExecutionResumed(er *protos.ExecutionResumedEvent) error { +func (ctx *WorkflowContext) onExecutionResumed(er *protos.ExecutionResumedEvent) error { ctx.isSuspended = false for _, e := range ctx.suspendedEvents { if err := ctx.processEvent(e); err != nil { @@ -774,14 +774,14 @@ func (ctx *OrchestrationContext) onExecutionResumed(er *protos.ExecutionResumedE return nil } -func (ctx *OrchestrationContext) onExecutionTerminated(et *protos.ExecutionTerminatedEvent) error { +func (ctx *WorkflowContext) onExecutionTerminated(et *protos.ExecutionTerminatedEvent) error { if err := ctx.setCompleteInternal(et.Input, protos.OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED, nil); err != nil { return err } return nil } -func (ctx *OrchestrationContext) setComplete(output any) error { +func (ctx *WorkflowContext) setComplete(output any) error { status := protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED var rawOutput *wrapperspb.StringValue if output != nil { @@ -797,7 +797,7 @@ func (ctx *OrchestrationContext) setComplete(output any) error { return nil } -func (ctx *OrchestrationContext) setFailed(appError error) error { +func (ctx *WorkflowContext) setFailed(appError error) error { fd := &protos.TaskFailureDetails{ ErrorType: reflect.TypeOf(appError).String(), ErrorMessage: appError.Error(), @@ -809,7 +809,7 @@ func (ctx *OrchestrationContext) setFailed(appError error) error { return nil } -func (ctx *OrchestrationContext) setContinuedAsNew() error { +func (ctx *WorkflowContext) setContinuedAsNew() error { status := protos.OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW var newRawInput *wrapperspb.StringValue if ctx.continuedAsNewInput != nil { @@ -825,17 +825,17 @@ func (ctx *OrchestrationContext) setContinuedAsNew() error { return nil } -func (ctx *OrchestrationContext) setCompleteInternal( +func (ctx *WorkflowContext) setCompleteInternal( rawResult *wrapperspb.StringValue, status protos.OrchestrationStatus, failureDetails *protos.TaskFailureDetails, ) error { sequenceNumber := ctx.getNextSequenceNumber() - completedAction := &protos.OrchestratorAction{ + completedAction := &protos.WorkflowAction{ Id: sequenceNumber, - OrchestratorActionType: &protos.OrchestratorAction_CompleteOrchestration{ - CompleteOrchestration: &protos.CompleteOrchestrationAction{ - OrchestrationStatus: status, + WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ + CompleteWorkflow: &protos.CompleteWorkflowAction{ + WorkflowStatus: status, Result: rawResult, FailureDetails: failureDetails, }, @@ -846,33 +846,33 @@ func (ctx *OrchestrationContext) setCompleteInternal( return nil } -func (ctx *OrchestrationContext) setVersionNotRegistered() error { +func (ctx *WorkflowContext) setVersionNotRegistered() error { sequenceNumber := ctx.getNextSequenceNumber() - ctx.pendingActions[sequenceNumber] = &protos.OrchestratorAction{ + ctx.pendingActions[sequenceNumber] = &protos.WorkflowAction{ Id: sequenceNumber, - OrchestratorActionType: &protos.OrchestratorAction_OrchestratorVersionNotAvailable{ - OrchestratorVersionNotAvailable: &protos.OrchestratorVersionNotAvailableAction{}, + WorkflowActionType: &protos.WorkflowAction_WorkflowVersionNotAvailable{ + WorkflowVersionNotAvailable: &protos.WorkflowVersionNotAvailableAction{}, }, } return nil } -func (ctx *OrchestrationContext) getNextSequenceNumber() int32 { +func (ctx *WorkflowContext) getNextSequenceNumber() int32 { current := ctx.sequenceNumber ctx.sequenceNumber++ return current } -func (ctx *OrchestrationContext) actions() []*protos.OrchestratorAction { +func (ctx *WorkflowContext) actions() []*protos.WorkflowAction { if ctx.isSuspended { return nil } - var actions []*protos.OrchestratorAction + var actions []*protos.WorkflowAction for _, a := range ctx.pendingActions { actions = append(actions, a) if ctx.continuedAsNew && ctx.saveBufferedExternalEvents { - if co := a.GetCompleteOrchestration(); co != nil { + if co := a.GetCompleteWorkflow(); co != nil { for _, eventList := range ctx.bufferedExternalEvents { for item := eventList.Front(); item != nil; item = item.Next() { e := item.Value.(*protos.HistoryEvent) diff --git a/task/registry.go b/task/registry.go index 8d38ed8e..ad73d7da 100644 --- a/task/registry.go +++ b/task/registry.go @@ -6,58 +6,58 @@ import ( "github.com/dapr/durabletask-go/api/helpers" ) -// TaskRegistry contains maps of names to corresponding orchestrator and activity functions. +// TaskRegistry contains maps of names to corresponding workflow and activity functions. type TaskRegistry struct { - orchestrators map[string]Orchestrator - versionedOrchestrators map[string]map[string]Orchestrator - latestVersionedOrchestrators map[string]string + workflows map[string]Workflow + versionedWorkflows map[string]map[string]Workflow + latestVersionedWorkflows map[string]string activities map[string]Activity } // NewTaskRegistry returns a new [TaskRegistry] struct. func NewTaskRegistry() *TaskRegistry { r := &TaskRegistry{ - orchestrators: make(map[string]Orchestrator), + workflows: make(map[string]Workflow), activities: make(map[string]Activity), - versionedOrchestrators: make(map[string]map[string]Orchestrator), - latestVersionedOrchestrators: make(map[string]string), + versionedWorkflows: make(map[string]map[string]Workflow), + latestVersionedWorkflows: make(map[string]string), } return r } -// AddOrchestrator adds an orchestrator function to the registry. The name of the orchestrator +// AddWorkflow adds an workflow function to the registry. The name of the workflow // function is determined using reflection. -func (r *TaskRegistry) AddOrchestrator(o Orchestrator) error { +func (r *TaskRegistry) AddWorkflow(o Workflow) error { name := helpers.GetTaskFunctionName(o) - return r.AddOrchestratorN(name, o) + return r.AddWorkflowN(name, o) } -// AddOrchestratorN adds an orchestrator function to the registry with a specified name. -func (r *TaskRegistry) AddOrchestratorN(name string, o Orchestrator) error { - if _, ok := r.orchestrators[name]; ok { - return fmt.Errorf("orchestrator named '%s' is already registered", name) +// AddWorkflowN adds an workflow function to the registry with a specified name. +func (r *TaskRegistry) AddWorkflowN(name string, o Workflow) error { + if _, ok := r.workflows[name]; ok { + return fmt.Errorf("workflow named '%s' is already registered", name) } - r.orchestrators[name] = o + r.workflows[name] = o return nil } -// AddVersionedOrchestrator adds a versioned orchestrator function to the registry with a specified name. -func (r *TaskRegistry) AddVersionedOrchestrator(canonicalName string, isLatest bool, o Orchestrator) error { +// AddVersionedWorkflow adds a versioned workflow function to the registry with a specified name. +func (r *TaskRegistry) AddVersionedWorkflow(canonicalName string, isLatest bool, o Workflow) error { name := helpers.GetTaskFunctionName(o) - return r.AddVersionedOrchestratorN(canonicalName, name, isLatest, o) + return r.AddVersionedWorkflowN(canonicalName, name, isLatest, o) } -// AddVersionedOrchestratorN adds a versioned orchestrator function to the registry with a specified name. -func (r *TaskRegistry) AddVersionedOrchestratorN(canonicalName string, name string, isLatest bool, o Orchestrator) error { - if _, ok := r.versionedOrchestrators[canonicalName]; !ok { - r.versionedOrchestrators[canonicalName] = make(map[string]Orchestrator) +// AddVersionedWorkflowN adds a versioned workflow function to the registry with a specified name. +func (r *TaskRegistry) AddVersionedWorkflowN(canonicalName string, name string, isLatest bool, o Workflow) error { + if _, ok := r.versionedWorkflows[canonicalName]; !ok { + r.versionedWorkflows[canonicalName] = make(map[string]Workflow) } - if _, ok := r.versionedOrchestrators[canonicalName][name]; ok { - return fmt.Errorf("versioned orchestrator named '%s' is already registered", name) + if _, ok := r.versionedWorkflows[canonicalName][name]; ok { + return fmt.Errorf("versioned workflow named '%s' is already registered", name) } - r.versionedOrchestrators[canonicalName][name] = o + r.versionedWorkflows[canonicalName][name] = o if isLatest { - r.latestVersionedOrchestrators[canonicalName] = name + r.latestVersionedWorkflows[canonicalName] = name } return nil } diff --git a/task/task.go b/task/task.go index dd5a965b..55e6e89f 100644 --- a/task/task.go +++ b/task/task.go @@ -7,7 +7,7 @@ import ( "github.com/dapr/durabletask-go/api/protos" ) -// ErrTaskBlocked is not an error, but rather a control flow signal indicating that an orchestrator +// ErrTaskBlocked is not an error, but rather a control flow signal indicating that an workflow // function has executed as far as it can and that it now needs to unload, dispatch any scheduled tasks, // and commit its current execution progress to durable storage. var ErrTaskBlocked = errors.New("the current task is blocked") @@ -23,7 +23,7 @@ type Task interface { } type completableTask struct { - orchestrationCtx *OrchestrationContext + workflowCtx *WorkflowContext isCompleted bool isCanceled bool rawResult []byte @@ -32,21 +32,21 @@ type completableTask struct { taskExecutionId string } -func newTask(ctx *OrchestrationContext) *completableTask { +func newTask(ctx *WorkflowContext) *completableTask { return &completableTask{ - orchestrationCtx: ctx, + workflowCtx: ctx, } } -// Await blocks the current orchestrator until the task is complete and then saves the unmarshalled +// Await blocks the current workflow until the task is complete and then saves the unmarshalled // result of the task (if any) into [v]. // // Await will return ErrTaskCanceled if the task was canceled - e.g. due to a timeout. // // Await may panic with ErrTaskBlocked as the panic value if called on a task that has not yet completed. -// This is normal control flow behavior for orchestrator functions and doesn't actually indicate a failure -// of any kind. However, orchestrator functions must never attempt to recover from such panics to ensure that -// the orchestration execution can procede normally. +// This is normal control flow behavior for workflow functions and doesn't actually indicate a failure +// of any kind. However, workflow functions must never attempt to recover from such panics to ensure that +// the workflow execution can procede normally. func (t *completableTask) Await(v any) error { for { if t.isCompleted { @@ -63,7 +63,7 @@ func (t *completableTask) Await(v any) error { return nil } - ok, err := t.orchestrationCtx.processNextEvent() + ok, err := t.workflowCtx.processNextEvent() if err != nil { return err } @@ -71,7 +71,7 @@ func (t *completableTask) Await(v any) error { break } } - // TODO: Need a rule about using "defer" in orchestrations because planned panics will invoke them unexpectedly + // TODO: Need a rule about using "defer" in workflows because planned panics will invoke them unexpectedly // TODO: @joshvanl: remove panic- panic is something that should // _never_ be called in normal operation. panic(ErrTaskBlocked) diff --git a/tests/backend_test.go b/tests/backend_test.go index 3f8e3806..b81b70cc 100644 --- a/tests/backend_test.go +++ b/tests/backend_test.go @@ -54,24 +54,24 @@ const ( defaultInput = "Hello, 世界!" ) -// Test_NewOrchestrationWorkItem_Single enqueues a single work item into the backend +// Test_NewWorkflowWorkItem_Single enqueues a single work item into the backend // store and attempts to fetch it immediately afterwards. -func Test_NewOrchestrationWorkItem_Single(t *testing.T) { +func Test_NewWorkflowWorkItem_Single(t *testing.T) { for i, be := range backends { initTest(t, be, i, true) expectedID := "myinstance" - if createOrchestrationInstance(t, be, expectedID) { - if wi, ok := getOrchestrationWorkItem(t, be, expectedID); ok { + if createWorkflowInstance(t, be, expectedID) { + if wi, ok := getWorkflowWorkItem(t, be, expectedID); ok { if assert.Equal(t, 1, len(wi.NewEvents)) { startEvent := wi.NewEvents[0].GetExecutionStarted() if assert.NotNil(t, startEvent) { - assert.Equal(t, expectedID, startEvent.OrchestrationInstance.GetInstanceId()) + assert.Equal(t, expectedID, startEvent.WorkflowInstance.GetInstanceId()) assert.Equal(t, defaultName, startEvent.Name) assert.Equal(t, defaultInput, startEvent.Input.GetValue()) } } - if state, ok := getOrchestrationRuntimeState(t, be, wi); ok { + if state, ok := getWorkflowRuntimeState(t, be, wi); ok { // initial state should be empty since this is a new instance iid := state.InstanceId assert.Equal(t, wi.InstanceID, api.InstanceID(iid)) @@ -87,9 +87,9 @@ func Test_NewOrchestrationWorkItem_Single(t *testing.T) { } } -// Test_NewOrchestrationWorkItem_Multiple enqueues multiple work items into the sqlite backend +// Test_NewWorkflowWorkItem_Multiple enqueues multiple work items into the sqlite backend // store and then attempts to fetch them one-at-a-time, in order. -func Test_NewOrchestrationWorkItem_Multiple(t *testing.T) { +func Test_NewWorkflowWorkItem_Multiple(t *testing.T) { for i, be := range backends { initTest(t, be, i, true) @@ -98,21 +98,21 @@ func Test_NewOrchestrationWorkItem_Multiple(t *testing.T) { // Create multiple work items up front for j := 0; j < WorkItems; j++ { expectedID := fmt.Sprintf("instance_%d", j) - createOrchestrationInstance(t, be, expectedID) + createWorkflowInstance(t, be, expectedID) } for j := 0; j < WorkItems; j++ { expectedID := fmt.Sprintf("instance_%d", j) - if wi, ok := getOrchestrationWorkItem(t, be, expectedID); ok { + if wi, ok := getWorkflowWorkItem(t, be, expectedID); ok { if assert.Equal(t, 1, len(wi.NewEvents)) { startEvent := wi.NewEvents[0].GetExecutionStarted() if assert.NotNil(t, startEvent) { - assert.Equal(t, expectedID, startEvent.OrchestrationInstance.GetInstanceId()) + assert.Equal(t, expectedID, startEvent.WorkflowInstance.GetInstanceId()) assert.Equal(t, defaultName, startEvent.Name) assert.Equal(t, defaultInput, startEvent.Input.GetValue()) } } - if state, ok := getOrchestrationRuntimeState(t, be, wi); ok { + if state, ok := getWorkflowRuntimeState(t, be, wi); ok { // initial state should be empty since this is a new instance _, err := runtimestate.Name(state) assert.ErrorIs(t, err, api.ErrNotStarted) @@ -126,7 +126,7 @@ func Test_NewOrchestrationWorkItem_Multiple(t *testing.T) { } } -func Test_CompleteOrchestration(t *testing.T) { +func Test_CompleteWorkflow(t *testing.T) { for i, be := range backends { for _, expectedStatus := range completionStatusValues { initTest(t, be, i, true) @@ -136,8 +136,8 @@ func Test_CompleteOrchestration(t *testing.T) { var expectedStackTrace string = "" // Produce an ExecutionCompleted event with a particular output - getOrchestratorActions := func() []*protos.OrchestratorAction { - completeAction := &protos.CompleteOrchestrationAction{OrchestrationStatus: expectedStatus} + getWorkflowActions := func() []*protos.WorkflowAction { + completeAction := &protos.CompleteWorkflowAction{WorkflowStatus: expectedStatus} if expectedStatus == protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED { runtime.Stack(stackTraceBuffer, false) expectedStackTrace = string(stackTraceBuffer) @@ -150,16 +150,16 @@ func Test_CompleteOrchestration(t *testing.T) { completeAction.Result = wrapperspb.String(expectedResult) } - return []*protos.OrchestratorAction{{ - OrchestratorActionType: &protos.OrchestratorAction_CompleteOrchestration{ - CompleteOrchestration: completeAction, + return []*protos.WorkflowAction{{ + WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ + CompleteWorkflow: completeAction, }, }} } - validateMetadata := func(metadata *backend.OrchestrationMetadata) { - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) - assert.False(t, api.OrchestrationMetadataIsRunning(metadata)) + validateMetadata := func(metadata *backend.WorkflowMetadata) { + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) + assert.False(t, api.WorkflowMetadataIsRunning(metadata)) if expectedStatus == protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED { assert.Equal(t, "MyError", metadata.FailureDetails.ErrorType) @@ -171,7 +171,7 @@ func Test_CompleteOrchestration(t *testing.T) { } // Execute the test, which calls the above callbacks - workItemProcessingTestLogic(t, be, getOrchestratorActions, validateMetadata) + workItemProcessingTestLogic(t, be, getWorkflowActions, validateMetadata) } } } @@ -186,24 +186,24 @@ func Test_ScheduleActivityTasks(t *testing.T) { initTest(t, be, i, true) // Produce a TaskScheduled event with a particular input - getOrchestratorActions := func() []*protos.OrchestratorAction { - return []*protos.OrchestratorAction{ + getWorkflowActions := func() []*protos.WorkflowAction { + return []*protos.WorkflowAction{ { Id: expectedTaskID, - OrchestratorActionType: &protos.OrchestratorAction_ScheduleTask{ + WorkflowActionType: &protos.WorkflowAction_ScheduleTask{ ScheduleTask: &protos.ScheduleTaskAction{Name: expectedName, Input: wrapperspb.String(expectedInput)}, }, }, } } - // Make sure the metadata reflects that the orchestration is running - validateMetadata := func(metadata *backend.OrchestrationMetadata) { - assert.True(t, api.OrchestrationMetadataIsRunning(metadata)) + // Make sure the metadata reflects that the workflow is running + validateMetadata := func(metadata *backend.WorkflowMetadata) { + assert.True(t, api.WorkflowMetadataIsRunning(metadata)) } // Execute the test, which calls the above callbacks - workItemProcessingTestLogic(t, be, getOrchestratorActions, validateMetadata) + workItemProcessingTestLogic(t, be, getWorkflowActions, validateMetadata) // However, there should be an activity work item wi, err := be.NextActivityWorkItem(ctx) @@ -226,7 +226,7 @@ func Test_ScheduleActivityTasks(t *testing.T) { err = be.CompleteActivityWorkItem(ctx, wi) if assert.NoError(t, err) { // Completing the activity work item should create a new TaskCompleted event - wi, err := be.NextOrchestrationWorkItem(ctx) + wi, err := be.NextWorkflowWorkItem(ctx) if assert.NoError(t, err) && assert.NotNil(t, wi) && assert.Len(t, wi.NewEvents, 1) { assert.Equal(t, expectedTaskID, wi.NewEvents[0].GetTaskCompleted().GetTaskScheduledId()) assert.Equal(t, expectedResult, wi.NewEvents[0].GetTaskCompleted().GetResult().GetValue()) @@ -243,27 +243,27 @@ func Test_ScheduleTimerTasks(t *testing.T) { expectedFireAt := time.Now().Add(timerDuration) // Produce a TimerCreated event with a particular fireat time - getOrchestratorActions := func() []*protos.OrchestratorAction { - return []*protos.OrchestratorAction{{ - OrchestratorActionType: &protos.OrchestratorAction_CreateTimer{ + getWorkflowActions := func() []*protos.WorkflowAction { + return []*protos.WorkflowAction{{ + WorkflowActionType: &protos.WorkflowAction_CreateTimer{ CreateTimer: &protos.CreateTimerAction{FireAt: timestamppb.New(expectedFireAt)}, }, }} } - // Make sure the metadata reflects that the orchestration is running - validateMetadata := func(metadata *backend.OrchestrationMetadata) { - assert.True(t, api.OrchestrationMetadataIsRunning(metadata)) + // Make sure the metadata reflects that the workflow is running + validateMetadata := func(metadata *backend.WorkflowMetadata) { + assert.True(t, api.WorkflowMetadataIsRunning(metadata)) } // Execute the test, which calls the above callbacks - workItemProcessingTestLogic(t, be, getOrchestratorActions, validateMetadata) + workItemProcessingTestLogic(t, be, getWorkflowActions, validateMetadata) // Sleep until the expected visibility time expires time.Sleep(timerDuration) // Validate that the timer work-item is now visible - wi, err := be.NextOrchestrationWorkItem(ctx) + wi, err := be.NextWorkflowWorkItem(ctx) if assert.NoError(t, err) && assert.Equal(t, 1, len(wi.NewEvents)) { e := wi.NewEvents[0] tf := e.GetTimerFired() @@ -274,17 +274,17 @@ func Test_ScheduleTimerTasks(t *testing.T) { } } -func Test_AbandonOrchestrationWorkItem(t *testing.T) { +func Test_AbandonWorkflowWorkItem(t *testing.T) { iid := "abc" for i, be := range backends { initTest(t, be, i, true) - if createOrchestrationInstance(t, be, iid) { - if wi, ok := getOrchestrationWorkItem(t, be, iid); ok { - if err := be.AbandonOrchestrationWorkItem(ctx, wi); assert.NoError(t, err) { + if createWorkflowInstance(t, be, iid) { + if wi, ok := getWorkflowWorkItem(t, be, iid); ok { + if err := be.AbandonWorkflowWorkItem(ctx, wi); assert.NoError(t, err) { // Make sure we can fetch it again immediately after abandoning - getOrchestrationWorkItem(t, be, iid) + getWorkflowWorkItem(t, be, iid) } } } @@ -295,24 +295,24 @@ func Test_AbandonActivityWorkItem(t *testing.T) { for i, be := range backends { initTest(t, be, i, true) - getOrchestratorActions := func() []*protos.OrchestratorAction { - return []*protos.OrchestratorAction{ + getWorkflowActions := func() []*protos.WorkflowAction { + return []*protos.WorkflowAction{ { Id: 123, - OrchestratorActionType: &protos.OrchestratorAction_ScheduleTask{ + WorkflowActionType: &protos.WorkflowAction_ScheduleTask{ ScheduleTask: &protos.ScheduleTaskAction{Name: "MyActivity"}, }, }, } } - // Make sure the metadata reflects that the orchestration is running - validateMetadata := func(metadata *backend.OrchestrationMetadata) { - assert.True(t, api.OrchestrationMetadataIsRunning(metadata)) + // Make sure the metadata reflects that the workflow is running + validateMetadata := func(metadata *backend.WorkflowMetadata) { + assert.True(t, api.WorkflowMetadataIsRunning(metadata)) } // Execute the test, which calls the above callbacks - workItemProcessingTestLogic(t, be, getOrchestratorActions, validateMetadata) + workItemProcessingTestLogic(t, be, getWorkflowActions, validateMetadata) // The NewScheduleTaskAction should have created an activity work item wi, err := be.NextActivityWorkItem(ctx) @@ -332,17 +332,17 @@ func Test_UninitializedBackend(t *testing.T) { for i, be := range backends { initTest(t, be, i, false) - err := be.AbandonOrchestrationWorkItem(ctx, nil) + err := be.AbandonWorkflowWorkItem(ctx, nil) assert.Equal(t, err, backend.ErrNotInitialized) - err = be.CompleteOrchestrationWorkItem(ctx, nil) + err = be.CompleteWorkflowWorkItem(ctx, nil) assert.Equal(t, err, backend.ErrNotInitialized) - err = be.CreateOrchestrationInstance(ctx, nil) + err = be.CreateWorkflowInstance(ctx, nil) assert.Equal(t, err, backend.ErrNotInitialized) - _, err = be.GetOrchestrationMetadata(ctx, api.InstanceID("")) + _, err = be.GetWorkflowMetadata(ctx, api.InstanceID("")) assert.Equal(t, err, backend.ErrNotInitialized) - _, err = be.GetOrchestrationRuntimeState(ctx, nil) + _, err = be.GetWorkflowRuntimeState(ctx, nil) assert.Equal(t, err, backend.ErrNotInitialized) - _, err = be.NextOrchestrationWorkItem(ctx) + _, err = be.NextWorkflowWorkItem(ctx) assert.Equal(t, err, backend.ErrNotInitialized) _, err = be.NextActivityWorkItem(ctx) assert.Equal(t, err, backend.ErrNotInitialized) @@ -353,52 +353,52 @@ func Test_GetNonExistingMetadata(t *testing.T) { for i, be := range backends { initTest(t, be, i, true) - _, err := be.GetOrchestrationMetadata(ctx, api.InstanceID("bogus")) + _, err := be.GetWorkflowMetadata(ctx, api.InstanceID("bogus")) assert.ErrorIs(t, err, api.ErrInstanceNotFound) } } -func Test_PurgeOrchestrationState(t *testing.T) { +func Test_PurgeWorkflowState(t *testing.T) { for i, be := range backends { initTest(t, be, i, true) expectedResult := "done!" // Produce an ExecutionCompleted event with a particular output - getOrchestratorActions := func() []*protos.OrchestratorAction { - return []*protos.OrchestratorAction{{ - OrchestratorActionType: &protos.OrchestratorAction_CompleteOrchestration{ - CompleteOrchestration: &protos.CompleteOrchestrationAction{ - OrchestrationStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, + getWorkflowActions := func() []*protos.WorkflowAction { + return []*protos.WorkflowAction{{ + WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ + CompleteWorkflow: &protos.CompleteWorkflowAction{ + WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, Result: wrapperspb.String(expectedResult), }, }, }} } - // Make sure the orchestration actually completed and get the instance ID + // Make sure the workflow actually completed and get the instance ID var instanceID api.InstanceID - validateMetadata := func(metadata *backend.OrchestrationMetadata) { + validateMetadata := func(metadata *backend.WorkflowMetadata) { instanceID = api.InstanceID(metadata.InstanceId) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) - assert.False(t, api.OrchestrationMetadataIsRunning(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) + assert.False(t, api.WorkflowMetadataIsRunning(metadata)) } // Execute the test, which calls the above callbacks - workItemProcessingTestLogic(t, be, getOrchestratorActions, validateMetadata) + workItemProcessingTestLogic(t, be, getWorkflowActions, validateMetadata) // Purge the workflow state - if err := be.PurgeOrchestrationState(ctx, instanceID, false); !assert.NoError(t, err) { + if err := be.PurgeWorkflowState(ctx, instanceID, false); !assert.NoError(t, err) { return } // The metadata should be gone - if _, err := be.GetOrchestrationMetadata(ctx, instanceID); !assert.ErrorIs(t, err, api.ErrInstanceNotFound) { + if _, err := be.GetWorkflowMetadata(ctx, instanceID); !assert.ErrorIs(t, err, api.ErrInstanceNotFound) { return } - wi := &backend.OrchestrationWorkItem{InstanceID: instanceID} - state, err := be.GetOrchestrationRuntimeState(ctx, wi) + wi := &backend.WorkflowWorkItem{InstanceID: instanceID} + state, err := be.GetWorkflowRuntimeState(ctx, wi) assert.NoError(t, err) // The state should be empty @@ -406,7 +406,7 @@ func Test_PurgeOrchestrationState(t *testing.T) { assert.Equal(t, 0, len(state.OldEvents)) // Attempting to purge again should fail with api.ErrInstanceNotFound - if err := be.PurgeOrchestrationState(ctx, instanceID, false); !assert.ErrorIs(t, err, api.ErrInstanceNotFound) { + if err := be.PurgeWorkflowState(ctx, instanceID, false); !assert.ErrorIs(t, err, api.ErrInstanceNotFound) { return } } @@ -427,15 +427,15 @@ func initTest(t *testing.T, be backend.Backend, testIteration int, createTaskHub func workItemProcessingTestLogic( t *testing.T, be backend.Backend, - getOrchestratorActions func() []*protos.OrchestratorAction, - validateMetadata func(metadata *backend.OrchestrationMetadata), + getWorkflowActions func() []*protos.WorkflowAction, + validateMetadata func(metadata *backend.WorkflowMetadata), ) { expectedID := "myinstance" startTime := time.Now().UTC() - if createOrchestrationInstance(t, be, expectedID) { - if wi, ok := getOrchestrationWorkItem(t, be, expectedID); ok { - if state, ok := getOrchestrationRuntimeState(t, be, wi); ok { + if createWorkflowInstance(t, be, expectedID) { + if wi, ok := getWorkflowWorkItem(t, be, expectedID); ok { + if state, ok := getWorkflowRuntimeState(t, be, wi); ok { // Update the state with new events. Normally the worker logic would do this. for _, e := range wi.NewEvents { runtimestate.AddEvent(state, e) @@ -443,14 +443,14 @@ func workItemProcessingTestLogic( applier := runtimestate.NewApplier("example") - actions := getOrchestratorActions() + actions := getWorkflowActions() _, err := applier.Actions(state, nil, actions, nil) if assert.NoError(t, err) { wi.State = state - err := be.CompleteOrchestrationWorkItem(ctx, wi) + err := be.CompleteWorkflowWorkItem(ctx, wi) if assert.NoError(t, err) { // Validate runtime state - if state, ok = getOrchestrationRuntimeState(t, be, wi); ok { + if state, ok = getWorkflowRuntimeState(t, be, wi); ok { createdTime, err := runtimestate.CreatedTime(state) if assert.NoError(t, err) { assert.GreaterOrEqual(t, createdTime, startTime) @@ -459,8 +459,8 @@ func workItemProcessingTestLogic( // State should be initialized with only "old" events assert.Empty(t, state.GetNewEvents()) assert.NotEmpty(t, state.GetOldEvents()) - // Validate orchestration metadata - if metadata, ok := getOrchestrationMetadata(t, be, api.InstanceID(state.InstanceId)); ok { + // Validate workflow metadata + if metadata, ok := getWorkflowMetadata(t, be, api.InstanceID(state.InstanceId)); ok { assert.Equal(t, defaultName, metadata.Name) assert.Equal(t, defaultInput, metadata.Input.Value) assert.Less(t, createdTime.Sub(metadata.CreatedAt.AsTime()).Abs(), time.Microsecond) // Some database backends (like postgres) don't support sub-microsecond precision @@ -476,24 +476,23 @@ func workItemProcessingTestLogic( } } -func createOrchestrationInstance(t assert.TestingT, be backend.Backend, instanceID string) bool { +func createWorkflowInstance(t assert.TestingT, be backend.Backend, instanceID string) bool { e := &protos.HistoryEvent{ Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: defaultName, - OrchestrationInstance: &protos.OrchestrationInstance{InstanceId: instanceID}, + WorkflowInstance: &protos.WorkflowInstance{InstanceId: instanceID}, Input: wrapperspb.String(defaultInput), }, }, } - policy := &protos.OrchestrationIdReusePolicy{} - err := be.CreateOrchestrationInstance(ctx, e, backend.WithOrchestrationIdReusePolicy(policy)) + err := be.CreateWorkflowInstance(ctx, e) return assert.NoError(t, err) } -func getOrchestrationWorkItem(t assert.TestingT, be backend.Backend, expectedInstanceID string) (*backend.OrchestrationWorkItem, bool) { - wi, err := be.NextOrchestrationWorkItem(ctx) +func getWorkflowWorkItem(t assert.TestingT, be backend.Backend, expectedInstanceID string) (*backend.WorkflowWorkItem, bool) { + wi, err := be.NextWorkflowWorkItem(ctx) if assert.NoError(t, err) && assert.NotNil(t, wi) { assert.NotEmpty(t, wi.LockedBy) return wi, assert.Equal(t, expectedInstanceID, string(wi.InstanceID)) @@ -502,8 +501,8 @@ func getOrchestrationWorkItem(t assert.TestingT, be backend.Backend, expectedIns return nil, false } -func getOrchestrationRuntimeState(t assert.TestingT, be backend.Backend, wi *backend.OrchestrationWorkItem) (*backend.OrchestrationRuntimeState, bool) { - state, err := be.GetOrchestrationRuntimeState(ctx, wi) +func getWorkflowRuntimeState(t assert.TestingT, be backend.Backend, wi *backend.WorkflowWorkItem) (*backend.WorkflowRuntimeState, bool) { + state, err := be.GetWorkflowRuntimeState(ctx, wi) if assert.NoError(t, err) && assert.NotNil(t, state) { iid := state.InstanceId return state, assert.Equal(t, wi.InstanceID, api.InstanceID(iid)) @@ -512,8 +511,8 @@ func getOrchestrationRuntimeState(t assert.TestingT, be backend.Backend, wi *bac return nil, false } -func getOrchestrationMetadata(t assert.TestingT, be backend.Backend, iid api.InstanceID) (*backend.OrchestrationMetadata, bool) { - metadata, err := be.GetOrchestrationMetadata(ctx, iid) +func getWorkflowMetadata(t assert.TestingT, be backend.Backend, iid api.InstanceID) (*backend.WorkflowMetadata, bool) { + metadata, err := be.GetWorkflowMetadata(ctx, iid) if assert.NoError(t, err) && assert.NotNil(t, metadata) { return metadata, assert.Equal(t, iid, api.InstanceID(metadata.InstanceId)) } diff --git a/tests/grpc/grpc_test.go b/tests/grpc/grpc_test.go index aae673d6..c355eb7e 100644 --- a/tests/grpc/grpc_test.go +++ b/tests/grpc/grpc_test.go @@ -42,7 +42,7 @@ func TestMain(m *testing.M) { grpcServer := grpc.NewServer() grpcExecutor, registerFn := backend.NewGrpcExecutor(be, logger) registerFn(grpcServer) - orchestrationWorker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + workflowWorker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: grpcExecutor, Logger: logger, @@ -50,7 +50,7 @@ func TestMain(m *testing.M) { }) activityWorker := backend.NewActivityTaskWorker(be, grpcExecutor, logger) - taskHubWorker := backend.NewTaskHubWorker(be, orchestrationWorker, activityWorker, logger) + taskHubWorker := backend.NewTaskHubWorker(be, workflowWorker, activityWorker, logger) if err := taskHubWorker.Start(ctx); err != nil { log.Fatalf("failed to start worker: %v", err) } @@ -103,7 +103,7 @@ func startGrpcListener(t *testing.T, r *task.TaskRegistry) context.CancelFunc { func Test_Grpc_WaitForInstanceStart_Timeout(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("WaitForInstanceStartThrowsException", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("WaitForInstanceStartThrowsException", func(ctx *task.WorkflowContext) (any, error) { // sleep 5 seconds time.Sleep(5 * time.Second) return 42, nil @@ -112,10 +112,10 @@ func Test_Grpc_WaitForInstanceStart_Timeout(t *testing.T) { cancelListener := startGrpcListener(t, r) defer cancelListener() - go grpcClient.ScheduleNewOrchestration(ctx, "WaitForInstanceStartThrowsException", api.WithInput("世界"), api.WithInstanceID("helloworld")) + go grpcClient.ScheduleNewWorkflow(ctx, "WaitForInstanceStartThrowsException", api.WithInput("世界"), api.WithInstanceID("helloworld")) timeoutCtx, cancelTimeout := context.WithTimeout(ctx, time.Second) defer cancelTimeout() - _, err := grpcClient.WaitForOrchestrationStart(timeoutCtx, "helloworld", api.WithFetchPayloads(true)) + _, err := grpcClient.WaitForWorkflowStart(timeoutCtx, "helloworld", api.WithFetchPayloads(true)) if assert.Error(t, err) { assert.Contains(t, err.Error(), "context deadline exceeded") } @@ -124,7 +124,7 @@ func Test_Grpc_WaitForInstanceStart_Timeout(t *testing.T) { func Test_Grpc_WaitForInstanceStart_ConnectionResume(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("WaitForInstanceStartThrowsException", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("WaitForInstanceStartThrowsException", func(ctx *task.WorkflowContext) (any, error) { // sleep 5 seconds time.Sleep(5 * time.Second) return 42, nil @@ -132,10 +132,10 @@ func Test_Grpc_WaitForInstanceStart_ConnectionResume(t *testing.T) { cancelListener := startGrpcListener(t, r) - go grpcClient.ScheduleNewOrchestration(ctx, "WaitForInstanceStartThrowsException", api.WithInput("世界"), api.WithInstanceID("worldhello")) + go grpcClient.ScheduleNewWorkflow(ctx, "WaitForInstanceStartThrowsException", api.WithInput("世界"), api.WithInstanceID("worldhello")) timeoutCtx, cancelTimeout := context.WithTimeout(ctx, time.Second) defer cancelTimeout() - _, err := grpcClient.WaitForOrchestrationStart(timeoutCtx, "worldhello", api.WithFetchPayloads(true)) + _, err := grpcClient.WaitForWorkflowStart(timeoutCtx, "worldhello", api.WithFetchPayloads(true)) if assert.Error(t, err) { assert.Contains(t, err.Error(), "context deadline exceeded") } @@ -149,16 +149,16 @@ func Test_Grpc_WaitForInstanceStart_ConnectionResume(t *testing.T) { // workitem should be retried and completed. timeoutCtx, cancelTimeout = context.WithTimeout(ctx, 30*time.Second) defer cancelTimeout() - metadata, err := grpcClient.WaitForOrchestrationCompletion(timeoutCtx, "worldhello", api.WithFetchPayloads(true)) + metadata, err := grpcClient.WaitForWorkflowCompletion(timeoutCtx, "worldhello", api.WithFetchPayloads(true)) require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) assert.Equal(t, "42", metadata.Output.Value) time.Sleep(1 * time.Second) } -func Test_Grpc_HelloOrchestration(t *testing.T) { +func Test_Grpc_HelloWorkflow(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SingleActivity", func(ctx *task.WorkflowContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { return nil, err @@ -179,18 +179,18 @@ func Test_Grpc_HelloOrchestration(t *testing.T) { cancelListener := startGrpcListener(t, r) defer cancelListener() - id, err := grpcClient.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("世界")) + id, err := grpcClient.ScheduleNewWorkflow(ctx, "SingleActivity", api.WithInput("世界")) require.NoError(t, err) timeoutCtx, cancelTimeout := context.WithTimeout(ctx, 30*time.Second) defer cancelTimeout() - metadata, err := grpcClient.WaitForOrchestrationCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) + metadata, err := grpcClient.WaitForWorkflowCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) assert.Equal(t, `"Hello, 世界!"`, metadata.Output.Value) assert.Equal(t, "hello-test", metadata.CustomStatus.Value) time.Sleep(1 * time.Second) - err = grpcClient.PurgeOrchestrationState(ctx, id) + err = grpcClient.PurgeWorkflowState(ctx, id) assert.NoError(t, err) } @@ -199,7 +199,7 @@ func Test_Grpc_SuspendResume(t *testing.T) { const eventCount = 10 r := task.NewTaskRegistry() - r.AddOrchestratorN("SuspendResumeOrchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SuspendResumeWorkflow", func(ctx *task.WorkflowContext) (any, error) { for i := 0; i < eventCount; i++ { var value int ctx.WaitForSingleEvent("MyEvent", 5*time.Second).Await(&value) @@ -213,36 +213,36 @@ func Test_Grpc_SuspendResume(t *testing.T) { cancelListener := startGrpcListener(t, r) defer cancelListener() - // Run the orchestration, which will block waiting for external events - id, err := grpcClient.ScheduleNewOrchestration(ctx, "SuspendResumeOrchestration", api.WithInput(0)) + // Run the workflow, which will block waiting for external events + id, err := grpcClient.ScheduleNewWorkflow(ctx, "SuspendResumeWorkflow", api.WithInput(0)) require.NoError(t, err) - // Suspend the orchestration - require.NoError(t, grpcClient.SuspendOrchestration(ctx, id, "")) + // Suspend the workflow + require.NoError(t, grpcClient.SuspendWorkflow(ctx, id, "")) - // Raise a bunch of events to the orchestration (they should get buffered but not consumed) + // Raise a bunch of events to the workflow (they should get buffered but not consumed) for i := 0; i < eventCount; i++ { opts := api.WithEventPayload(i) require.NoError(t, grpcClient.RaiseEvent(ctx, id, "MyEvent", opts)) } - // Make sure the orchestration *doesn't* complete + // Make sure the workflow *doesn't* complete timeoutCtx, cancelWait := context.WithTimeout(ctx, 3*time.Second) defer cancelWait() - _, err = grpcClient.WaitForOrchestrationCompletion(timeoutCtx, id) + _, err = grpcClient.WaitForWorkflowCompletion(timeoutCtx, id) require.ErrorIs(t, err, timeoutCtx.Err()) - var metadata *backend.OrchestrationMetadata - metadata, err = grpcClient.FetchOrchestrationMetadata(ctx, id) + var metadata *backend.WorkflowMetadata + metadata, err = grpcClient.FetchWorkflowMetadata(ctx, id) require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsRunning(metadata)) + assert.True(t, api.WorkflowMetadataIsRunning(metadata)) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_SUSPENDED, metadata.RuntimeStatus) - // Resume the orchestration and wait for it to complete - require.NoError(t, grpcClient.ResumeOrchestration(ctx, id, "")) + // Resume the workflow and wait for it to complete + require.NoError(t, grpcClient.ResumeWorkflow(ctx, id, "")) timeoutCtx, cancelWait = context.WithTimeout(ctx, 3*time.Second) defer cancelWait() - _, err = grpcClient.WaitForOrchestrationCompletion(timeoutCtx, id) + _, err = grpcClient.WaitForWorkflowCompletion(timeoutCtx, id) require.NoError(t, err) time.Sleep(1 * time.Second) } @@ -251,10 +251,10 @@ func Test_Grpc_Terminate_Recursive(t *testing.T) { delayTime := 4 * time.Second executedActivity := false r := task.NewTaskRegistry() - r.AddOrchestratorN("Root", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Root", func(ctx *task.WorkflowContext) (any, error) { tasks := []task.Task{} for i := 0; i < 5; i++ { - task := ctx.CallSubOrchestrator("L1") + task := ctx.CallChildWorkflow("L1") tasks = append(tasks, task) } for _, task := range tasks { @@ -262,11 +262,11 @@ func Test_Grpc_Terminate_Recursive(t *testing.T) { } return nil, nil }) - r.AddOrchestratorN("L1", func(ctx *task.OrchestrationContext) (any, error) { - ctx.CallSubOrchestrator("L2").Await(nil) + r.AddWorkflowN("L1", func(ctx *task.WorkflowContext) (any, error) { + ctx.CallChildWorkflow("L2").Await(nil) return nil, nil }) - r.AddOrchestratorN("L2", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("L2", func(ctx *task.WorkflowContext) (any, error) { ctx.CreateTimer(delayTime).Await(nil) ctx.CallActivity("Fail").Await(nil) return nil, nil @@ -282,25 +282,25 @@ func Test_Grpc_Terminate_Recursive(t *testing.T) { // Test terminating with and without recursion for _, recurse := range []bool{true, false} { t.Run(fmt.Sprintf("Recurse = %v", recurse), func(t *testing.T) { - // Run the orchestration, which will block waiting for external events - id, err := grpcClient.ScheduleNewOrchestration(ctx, "Root") + // Run the workflow, which will block waiting for external events + id, err := grpcClient.ScheduleNewWorkflow(ctx, "Root") require.NoError(t, err) - // Wait long enough to ensure all orchestrations have started (but not longer than the timer delay) + // Wait long enough to ensure all workflows have started (but not longer than the timer delay) time.Sleep(2 * time.Second) - // Terminate the root orchestration and mark whether a recursive termination + // Terminate the root workflow and mark whether a recursive termination output := fmt.Sprintf("Recursive termination = %v", recurse) opts := []api.TerminateOptions{api.WithOutput(output), api.WithRecursiveTerminate(recurse)} - require.NoError(t, grpcClient.TerminateOrchestration(ctx, id, opts...)) + require.NoError(t, grpcClient.TerminateWorkflow(ctx, id, opts...)) - // Wait for the root orchestration to complete and verify its terminated status - metadata, err := grpcClient.WaitForOrchestrationCompletion(ctx, id) + // Wait for the root workflow to complete and verify its terminated status + metadata, err := grpcClient.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED, metadata.RuntimeStatus) require.Equal(t, fmt.Sprintf("\"%s\"", output), metadata.Output.Value) - // Wait longer to ensure that none of the sub-orchestrations continued to the next step + // Wait longer to ensure that none of the child workflows continued to the next step // of executing the activity function. time.Sleep(delayTime) assert.NotEqual(t, recurse, executedActivity) @@ -308,106 +308,10 @@ func Test_Grpc_Terminate_Recursive(t *testing.T) { } } -func Test_Grpc_ReuseInstanceIDIgnore(t *testing.T) { - delayTime := 2 * time.Second - r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity", func(ctx *task.OrchestrationContext) (any, error) { - var input string - if err := ctx.GetInput(&input); err != nil { - return nil, err - } - var output string - ctx.CreateTimer(delayTime).Await(nil) - err := ctx.CallActivity("SayHello", task.WithActivityInput(input)).Await(&output) - return output, err - }) - r.AddActivityN("SayHello", func(ctx task.ActivityContext) (any, error) { - var name string - if err := ctx.GetInput(&name); err != nil { - return nil, err - } - return fmt.Sprintf("Hello, %s!", name), nil - }) - - cancelListener := startGrpcListener(t, r) - defer cancelListener() - instanceID := api.InstanceID("SKIP_IF_RUNNING_OR_COMPLETED") - reuseIdPolicy := &api.OrchestrationIdReusePolicy{ - Action: api.REUSE_ID_ACTION_IGNORE, - OperationStatus: []api.OrchestrationStatus{api.RUNTIME_STATUS_RUNNING, api.RUNTIME_STATUS_COMPLETED, api.RUNTIME_STATUS_PENDING}, - } - - id, err := grpcClient.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("世界"), api.WithInstanceID(instanceID)) - require.NoError(t, err) - // wait orchestration to start - grpcClient.WaitForOrchestrationStart(ctx, id) - pivotTime := time.Now() - // schedule again, it should ignore creating the new orchestration - id, err = grpcClient.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id), api.WithOrchestrationIdReusePolicy(reuseIdPolicy)) - require.NoError(t, err) - timeoutCtx, cancelTimeout := context.WithTimeout(ctx, 30*time.Second) - defer cancelTimeout() - metadata, err := grpcClient.WaitForOrchestrationCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) - require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) - // the first orchestration should complete as the second one is ignored - assert.Equal(t, `"Hello, 世界!"`, metadata.Output.Value) - // assert the orchestration created timestamp - assert.True(t, pivotTime.After(metadata.CreatedAt.AsTime())) -} - -func Test_Grpc_ReuseInstanceIDTerminate(t *testing.T) { - delayTime := 2 * time.Second - r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity", func(ctx *task.OrchestrationContext) (any, error) { - var input string - if err := ctx.GetInput(&input); err != nil { - return nil, err - } - var output string - ctx.CreateTimer(delayTime).Await(nil) - err := ctx.CallActivity("SayHello", task.WithActivityInput(input)).Await(&output) - return output, err - }) - r.AddActivityN("SayHello", func(ctx task.ActivityContext) (any, error) { - var name string - if err := ctx.GetInput(&name); err != nil { - return nil, err - } - return fmt.Sprintf("Hello, %s!", name), nil - }) - - cancelListener := startGrpcListener(t, r) - defer cancelListener() - instanceID := api.InstanceID("TERMINATE_IF_RUNNING_OR_COMPLETED") - reuseIdPolicy := &api.OrchestrationIdReusePolicy{ - Action: api.REUSE_ID_ACTION_TERMINATE, - OperationStatus: []api.OrchestrationStatus{api.RUNTIME_STATUS_RUNNING, api.RUNTIME_STATUS_COMPLETED, api.RUNTIME_STATUS_PENDING}, - } - - id, err := grpcClient.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("世界"), api.WithInstanceID(instanceID)) - require.NoError(t, err) - // wait orchestration to start - grpcClient.WaitForOrchestrationStart(ctx, id) - pivotTime := time.Now() - // schedule again, it should terminate the first orchestration and start a new one - id, err = grpcClient.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id), api.WithOrchestrationIdReusePolicy(reuseIdPolicy)) - require.NoError(t, err) - timeoutCtx, cancelTimeout := context.WithTimeout(ctx, 30*time.Second) - defer cancelTimeout() - metadata, err := grpcClient.WaitForOrchestrationCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) - require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) - // the second orchestration should complete. - assert.Equal(t, `"Hello, World!"`, metadata.Output.Value) - // assert the orchestration created timestamp - assert.True(t, pivotTime.Before(metadata.CreatedAt.AsTime())) -} - func Test_Grpc_ReuseInstanceIDError(t *testing.T) { delayTime := 4 * time.Second r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SingleActivity", func(ctx *task.WorkflowContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { return nil, err @@ -429,17 +333,17 @@ func Test_Grpc_ReuseInstanceIDError(t *testing.T) { defer cancelListener() instanceID := api.InstanceID("THROW_IF_RUNNING_OR_COMPLETED") - id, err := grpcClient.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("世界"), api.WithInstanceID(instanceID)) + id, err := grpcClient.ScheduleNewWorkflow(ctx, "SingleActivity", api.WithInput("世界"), api.WithInstanceID(instanceID)) require.NoError(t, err) - id, err = grpcClient.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id)) + id, err = grpcClient.ScheduleNewWorkflow(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id)) if assert.Error(t, err) { - assert.Contains(t, err.Error(), "orchestration instance already exists") + assert.Contains(t, err.Error(), "workflow instance already exists") } } func Test_Grpc_ActivityRetries(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("ActivityRetries", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ActivityRetries", func(ctx *task.WorkflowContext) (any, error) { if err := ctx.CallActivity("FailActivity", task.WithActivityRetryPolicy(&task.RetryPolicy{ MaxAttempts: 3, InitialRetryInterval: 10 * time.Millisecond, @@ -456,46 +360,46 @@ func Test_Grpc_ActivityRetries(t *testing.T) { defer cancelListener() instanceID := api.InstanceID("activity_retries") - id, err := grpcClient.ScheduleNewOrchestration(ctx, "ActivityRetries", api.WithInstanceID(instanceID)) + id, err := grpcClient.ScheduleNewWorkflow(ctx, "ActivityRetries", api.WithInstanceID(instanceID)) require.NoError(t, err) timeoutCtx, cancelTimeout := context.WithTimeout(ctx, 30*time.Second) defer cancelTimeout() - metadata, err := grpcClient.WaitForOrchestrationCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) + metadata, err := grpcClient.WaitForWorkflowCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, metadata.RuntimeStatus) // With 3 max attempts there will be two retries with 10 millis delay before each require.GreaterOrEqual(t, metadata.LastUpdatedAt.AsTime(), metadata.CreatedAt.AsTime().Add(2*10*time.Millisecond)) } -func Test_Grpc_SubOrchestratorRetries(t *testing.T) { +func Test_Grpc_ChildWorkflowRetries(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("Parent", func(ctx *task.OrchestrationContext) (any, error) { - err := ctx.CallSubOrchestrator( + r.AddWorkflowN("Parent", func(ctx *task.WorkflowContext) (any, error) { + err := ctx.CallChildWorkflow( "Child", - task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_child"), - task.WithSubOrchestrationRetryPolicy(&task.RetryPolicy{ + task.WithChildWorkflowInstanceID(string(ctx.ID)+"_child"), + task.WithChildWorkflowRetryPolicy(&task.RetryPolicy{ MaxAttempts: 3, InitialRetryInterval: 10 * time.Millisecond, BackoffCoefficient: 2, })).Await(nil) return nil, err }) - r.AddOrchestratorN("Child", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Child", func(ctx *task.WorkflowContext) (any, error) { return nil, errors.New("Child failed") }) cancelListener := startGrpcListener(t, r) defer cancelListener() - instanceID := api.InstanceID("orchestrator_retries") + instanceID := api.InstanceID("workflow_retries") - id, err := grpcClient.ScheduleNewOrchestration(ctx, "Parent", api.WithInstanceID(instanceID)) + id, err := grpcClient.ScheduleNewWorkflow(ctx, "Parent", api.WithInstanceID(instanceID)) require.NoError(t, err) timeoutCtx, cancelTimeout := context.WithTimeout(ctx, 30*time.Second) defer cancelTimeout() - metadata, err := grpcClient.WaitForOrchestrationCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) + metadata, err := grpcClient.WaitForWorkflowCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, metadata.RuntimeStatus) // With 3 max attempts there will be two retries with 10 millis delay before each require.GreaterOrEqual(t, metadata.LastUpdatedAt.AsTime(), metadata.CreatedAt.AsTime().Add(2*10*time.Millisecond)) @@ -504,7 +408,7 @@ func Test_Grpc_SubOrchestratorRetries(t *testing.T) { func Test_SingleActivity_TaskSpan(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity_TestSpan", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SingleActivity_TestSpan", func(ctx *task.WorkflowContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { return nil, err @@ -527,10 +431,10 @@ func Test_SingleActivity_TaskSpan(t *testing.T) { cancelListener := startGrpcListener(t, r) defer cancelListener() - // Run the orchestration - id, err := grpcClient.ScheduleNewOrchestration(ctx, "SingleActivity_TestSpan", api.WithInput("世界"), api.WithStartTime(time.Now())) + // Run the workflow + id, err := grpcClient.ScheduleNewWorkflow(ctx, "SingleActivity_TestSpan", api.WithInput("世界"), api.WithStartTime(time.Now())) if assert.NoError(t, err) { - metadata, err := grpcClient.WaitForOrchestrationCompletion(ctx, id) + metadata, err := grpcClient.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `"Hello, 世界!"`, metadata.Output.Value) @@ -540,10 +444,10 @@ func Test_SingleActivity_TaskSpan(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("SingleActivity_TestSpan", id), + utils.AssertWorkflowCreated("SingleActivity_TestSpan", id), utils.AssertSpan("activityChild_TestSpan"), utils.AssertActivity("SayHello", id, 0), - utils.AssertOrchestratorExecuted("SingleActivity_TestSpan", id, "COMPLETED"), + utils.AssertWorkflowExecuted("SingleActivity_TestSpan", id, "COMPLETED"), ) // assert child-parent relationship assert.Equal(t, spans[1].Parent().SpanID(), spans[2].SpanContext().SpanID()) @@ -551,7 +455,7 @@ func Test_SingleActivity_TaskSpan(t *testing.T) { func Test_Grpc_ListInstanceIDs(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("foo", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("foo", func(ctx *task.WorkflowContext) (any, error) { return 42, nil }) @@ -559,7 +463,7 @@ func Test_Grpc_ListInstanceIDs(t *testing.T) { defer cancelListener() for i := range 5 { - _, err := grpcClient.ScheduleNewOrchestration(ctx, "foo", api.WithInstanceID(api.InstanceID(strconv.Itoa(i)))) + _, err := grpcClient.ScheduleNewWorkflow(ctx, "foo", api.WithInstanceID(api.InstanceID(strconv.Itoa(i)))) require.NoError(t, err) } @@ -570,7 +474,7 @@ func Test_Grpc_ListInstanceIDs(t *testing.T) { func Test_Grpc_GetInstanceHistory(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("foo", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("foo", func(ctx *task.WorkflowContext) (any, error) { if err := ctx.CallActivity("bar").Await(nil); err != nil { return nil, err } @@ -589,7 +493,7 @@ func Test_Grpc_GetInstanceHistory(t *testing.T) { cancelListener := startGrpcListener(t, r) defer cancelListener() - id, err := grpcClient.ScheduleNewOrchestration(ctx, "foo") + id, err := grpcClient.ScheduleNewWorkflow(ctx, "foo") require.NoError(t, err) resp, err := grpcClient.GetInstanceHistory(ctx, id) @@ -597,12 +501,12 @@ func Test_Grpc_GetInstanceHistory(t *testing.T) { require.Len(t, resp.Events, 12) } -func Test_Grpc_PatchedOrchestration(t *testing.T) { +func Test_Grpc_PatchedWorkflow(t *testing.T) { r := task.NewTaskRegistry() patches1Found := []bool{} patches2Found := []bool{} runNumber := atomic.Uint32{} - r.AddOrchestratorN("Orchestrator", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Workflow", func(ctx *task.WorkflowContext) (any, error) { currentRun := runNumber.Add(1) if currentRun > 1 { patches1Found = append(patches1Found, ctx.IsPatched("patch1")) @@ -617,13 +521,13 @@ func Test_Grpc_PatchedOrchestration(t *testing.T) { cancelListener := startGrpcListener(t, r) defer cancelListener() - id, err := grpcClient.ScheduleNewOrchestration(ctx, "Orchestrator") + id, err := grpcClient.ScheduleNewWorkflow(ctx, "Workflow") require.NoError(t, err) timeoutCtx, cancelTimeout := context.WithTimeout(ctx, 30*time.Second) defer cancelTimeout() - metadata, err := grpcClient.WaitForOrchestrationCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) + metadata, err := grpcClient.WaitForWorkflowCompletion(timeoutCtx, id, api.WithFetchPayloads(true)) require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) assert.Equal(t, []bool{false}, patches1Found) assert.Equal(t, []bool{true}, patches2Found) } diff --git a/tests/mocks/Backend.go b/tests/mocks/Backend.go index c13df73c..3dd13bfc 100644 --- a/tests/mocks/Backend.go +++ b/tests/mocks/Backend.go @@ -73,16 +73,16 @@ func (_c *Backend_AbandonActivityWorkItem_Call) RunAndReturn(run func(context.Co return _c } -// AbandonOrchestrationWorkItem provides a mock function with given fields: _a0, _a1 -func (_m *Backend) AbandonOrchestrationWorkItem(_a0 context.Context, _a1 *backend.OrchestrationWorkItem) error { +// AbandonWorkflowWorkItem provides a mock function with given fields: _a0, _a1 +func (_m *Backend) AbandonWorkflowWorkItem(_a0 context.Context, _a1 *backend.WorkflowWorkItem) error { ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for AbandonOrchestrationWorkItem") + panic("no return value specified for AbandonWorkflowWorkItem") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *backend.OrchestrationWorkItem) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, *backend.WorkflowWorkItem) error); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) @@ -91,41 +91,41 @@ func (_m *Backend) AbandonOrchestrationWorkItem(_a0 context.Context, _a1 *backen return r0 } -// Backend_AbandonOrchestrationWorkItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbandonOrchestrationWorkItem' -type Backend_AbandonOrchestrationWorkItem_Call struct { +// Backend_AbandonWorkflowWorkItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbandonWorkflowWorkItem' +type Backend_AbandonWorkflowWorkItem_Call struct { *mock.Call } -// AbandonOrchestrationWorkItem is a helper method to define mock.On call +// AbandonWorkflowWorkItem is a helper method to define mock.On call // - _a0 context.Context -// - _a1 *backend.OrchestrationWorkItem -func (_e *Backend_Expecter) AbandonOrchestrationWorkItem(_a0 interface{}, _a1 interface{}) *Backend_AbandonOrchestrationWorkItem_Call { - return &Backend_AbandonOrchestrationWorkItem_Call{Call: _e.mock.On("AbandonOrchestrationWorkItem", _a0, _a1)} +// - _a1 *backend.WorkflowWorkItem +func (_e *Backend_Expecter) AbandonWorkflowWorkItem(_a0 interface{}, _a1 interface{}) *Backend_AbandonWorkflowWorkItem_Call { + return &Backend_AbandonWorkflowWorkItem_Call{Call: _e.mock.On("AbandonWorkflowWorkItem", _a0, _a1)} } -func (_c *Backend_AbandonOrchestrationWorkItem_Call) Run(run func(_a0 context.Context, _a1 *backend.OrchestrationWorkItem)) *Backend_AbandonOrchestrationWorkItem_Call { +func (_c *Backend_AbandonWorkflowWorkItem_Call) Run(run func(_a0 context.Context, _a1 *backend.WorkflowWorkItem)) *Backend_AbandonWorkflowWorkItem_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*backend.OrchestrationWorkItem)) + run(args[0].(context.Context), args[1].(*backend.WorkflowWorkItem)) }) return _c } -func (_c *Backend_AbandonOrchestrationWorkItem_Call) Return(_a0 error) *Backend_AbandonOrchestrationWorkItem_Call { +func (_c *Backend_AbandonWorkflowWorkItem_Call) Return(_a0 error) *Backend_AbandonWorkflowWorkItem_Call { _c.Call.Return(_a0) return _c } -func (_c *Backend_AbandonOrchestrationWorkItem_Call) RunAndReturn(run func(context.Context, *backend.OrchestrationWorkItem) error) *Backend_AbandonOrchestrationWorkItem_Call { +func (_c *Backend_AbandonWorkflowWorkItem_Call) RunAndReturn(run func(context.Context, *backend.WorkflowWorkItem) error) *Backend_AbandonWorkflowWorkItem_Call { _c.Call.Return(run) return _c } -// AddNewOrchestrationEvent provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Backend) AddNewOrchestrationEvent(_a0 context.Context, _a1 api.InstanceID, _a2 *protos.HistoryEvent) error { +// AddNewWorkflowEvent provides a mock function with given fields: _a0, _a1, _a2 +func (_m *Backend) AddNewWorkflowEvent(_a0 context.Context, _a1 api.InstanceID, _a2 *protos.HistoryEvent) error { ret := _m.Called(_a0, _a1, _a2) if len(ret) == 0 { - panic("no return value specified for AddNewOrchestrationEvent") + panic("no return value specified for AddNewWorkflowEvent") } var r0 error @@ -138,32 +138,32 @@ func (_m *Backend) AddNewOrchestrationEvent(_a0 context.Context, _a1 api.Instanc return r0 } -// Backend_AddNewOrchestrationEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddNewOrchestrationEvent' -type Backend_AddNewOrchestrationEvent_Call struct { +// Backend_AddNewWorkflowEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddNewWorkflowEvent' +type Backend_AddNewWorkflowEvent_Call struct { *mock.Call } -// AddNewOrchestrationEvent is a helper method to define mock.On call +// AddNewWorkflowEvent is a helper method to define mock.On call // - _a0 context.Context // - _a1 api.InstanceID // - _a2 *protos.HistoryEvent -func (_e *Backend_Expecter) AddNewOrchestrationEvent(_a0 interface{}, _a1 interface{}, _a2 interface{}) *Backend_AddNewOrchestrationEvent_Call { - return &Backend_AddNewOrchestrationEvent_Call{Call: _e.mock.On("AddNewOrchestrationEvent", _a0, _a1, _a2)} +func (_e *Backend_Expecter) AddNewWorkflowEvent(_a0 interface{}, _a1 interface{}, _a2 interface{}) *Backend_AddNewWorkflowEvent_Call { + return &Backend_AddNewWorkflowEvent_Call{Call: _e.mock.On("AddNewWorkflowEvent", _a0, _a1, _a2)} } -func (_c *Backend_AddNewOrchestrationEvent_Call) Run(run func(_a0 context.Context, _a1 api.InstanceID, _a2 *protos.HistoryEvent)) *Backend_AddNewOrchestrationEvent_Call { +func (_c *Backend_AddNewWorkflowEvent_Call) Run(run func(_a0 context.Context, _a1 api.InstanceID, _a2 *protos.HistoryEvent)) *Backend_AddNewWorkflowEvent_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(api.InstanceID), args[2].(*protos.HistoryEvent)) }) return _c } -func (_c *Backend_AddNewOrchestrationEvent_Call) Return(_a0 error) *Backend_AddNewOrchestrationEvent_Call { +func (_c *Backend_AddNewWorkflowEvent_Call) Return(_a0 error) *Backend_AddNewWorkflowEvent_Call { _c.Call.Return(_a0) return _c } -func (_c *Backend_AddNewOrchestrationEvent_Call) RunAndReturn(run func(context.Context, api.InstanceID, *protos.HistoryEvent) error) *Backend_AddNewOrchestrationEvent_Call { +func (_c *Backend_AddNewWorkflowEvent_Call) RunAndReturn(run func(context.Context, api.InstanceID, *protos.HistoryEvent) error) *Backend_AddNewWorkflowEvent_Call { _c.Call.Return(run) return _c } @@ -216,12 +216,12 @@ func (_c *Backend_CancelActivityTask_Call) RunAndReturn(run func(context.Context return _c } -// CancelOrchestratorTask provides a mock function with given fields: _a0, _a1 -func (_m *Backend) CancelOrchestratorTask(_a0 context.Context, _a1 api.InstanceID) error { +// CancelWorkflowTask provides a mock function with given fields: _a0, _a1 +func (_m *Backend) CancelWorkflowTask(_a0 context.Context, _a1 api.InstanceID) error { ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for CancelOrchestratorTask") + panic("no return value specified for CancelWorkflowTask") } var r0 error @@ -234,31 +234,31 @@ func (_m *Backend) CancelOrchestratorTask(_a0 context.Context, _a1 api.InstanceI return r0 } -// Backend_CancelOrchestratorTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelOrchestratorTask' -type Backend_CancelOrchestratorTask_Call struct { +// Backend_CancelWorkflowTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelWorkflowTask' +type Backend_CancelWorkflowTask_Call struct { *mock.Call } -// CancelOrchestratorTask is a helper method to define mock.On call +// CancelWorkflowTask is a helper method to define mock.On call // - _a0 context.Context // - _a1 api.InstanceID -func (_e *Backend_Expecter) CancelOrchestratorTask(_a0 interface{}, _a1 interface{}) *Backend_CancelOrchestratorTask_Call { - return &Backend_CancelOrchestratorTask_Call{Call: _e.mock.On("CancelOrchestratorTask", _a0, _a1)} +func (_e *Backend_Expecter) CancelWorkflowTask(_a0 interface{}, _a1 interface{}) *Backend_CancelWorkflowTask_Call { + return &Backend_CancelWorkflowTask_Call{Call: _e.mock.On("CancelWorkflowTask", _a0, _a1)} } -func (_c *Backend_CancelOrchestratorTask_Call) Run(run func(_a0 context.Context, _a1 api.InstanceID)) *Backend_CancelOrchestratorTask_Call { +func (_c *Backend_CancelWorkflowTask_Call) Run(run func(_a0 context.Context, _a1 api.InstanceID)) *Backend_CancelWorkflowTask_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(api.InstanceID)) }) return _c } -func (_c *Backend_CancelOrchestratorTask_Call) Return(_a0 error) *Backend_CancelOrchestratorTask_Call { +func (_c *Backend_CancelWorkflowTask_Call) Return(_a0 error) *Backend_CancelWorkflowTask_Call { _c.Call.Return(_a0) return _c } -func (_c *Backend_CancelOrchestratorTask_Call) RunAndReturn(run func(context.Context, api.InstanceID) error) *Backend_CancelOrchestratorTask_Call { +func (_c *Backend_CancelWorkflowTask_Call) RunAndReturn(run func(context.Context, api.InstanceID) error) *Backend_CancelWorkflowTask_Call { _c.Call.Return(run) return _c } @@ -357,16 +357,16 @@ func (_c *Backend_CompleteActivityWorkItem_Call) RunAndReturn(run func(context.C return _c } -// CompleteOrchestrationWorkItem provides a mock function with given fields: _a0, _a1 -func (_m *Backend) CompleteOrchestrationWorkItem(_a0 context.Context, _a1 *backend.OrchestrationWorkItem) error { +// CompleteWorkflowWorkItem provides a mock function with given fields: _a0, _a1 +func (_m *Backend) CompleteWorkflowWorkItem(_a0 context.Context, _a1 *backend.WorkflowWorkItem) error { ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for CompleteOrchestrationWorkItem") + panic("no return value specified for CompleteWorkflowWorkItem") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *backend.OrchestrationWorkItem) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, *backend.WorkflowWorkItem) error); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) @@ -375,45 +375,45 @@ func (_m *Backend) CompleteOrchestrationWorkItem(_a0 context.Context, _a1 *backe return r0 } -// Backend_CompleteOrchestrationWorkItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteOrchestrationWorkItem' -type Backend_CompleteOrchestrationWorkItem_Call struct { +// Backend_CompleteWorkflowWorkItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteWorkflowWorkItem' +type Backend_CompleteWorkflowWorkItem_Call struct { *mock.Call } -// CompleteOrchestrationWorkItem is a helper method to define mock.On call +// CompleteWorkflowWorkItem is a helper method to define mock.On call // - _a0 context.Context -// - _a1 *backend.OrchestrationWorkItem -func (_e *Backend_Expecter) CompleteOrchestrationWorkItem(_a0 interface{}, _a1 interface{}) *Backend_CompleteOrchestrationWorkItem_Call { - return &Backend_CompleteOrchestrationWorkItem_Call{Call: _e.mock.On("CompleteOrchestrationWorkItem", _a0, _a1)} +// - _a1 *backend.WorkflowWorkItem +func (_e *Backend_Expecter) CompleteWorkflowWorkItem(_a0 interface{}, _a1 interface{}) *Backend_CompleteWorkflowWorkItem_Call { + return &Backend_CompleteWorkflowWorkItem_Call{Call: _e.mock.On("CompleteWorkflowWorkItem", _a0, _a1)} } -func (_c *Backend_CompleteOrchestrationWorkItem_Call) Run(run func(_a0 context.Context, _a1 *backend.OrchestrationWorkItem)) *Backend_CompleteOrchestrationWorkItem_Call { +func (_c *Backend_CompleteWorkflowWorkItem_Call) Run(run func(_a0 context.Context, _a1 *backend.WorkflowWorkItem)) *Backend_CompleteWorkflowWorkItem_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*backend.OrchestrationWorkItem)) + run(args[0].(context.Context), args[1].(*backend.WorkflowWorkItem)) }) return _c } -func (_c *Backend_CompleteOrchestrationWorkItem_Call) Return(_a0 error) *Backend_CompleteOrchestrationWorkItem_Call { +func (_c *Backend_CompleteWorkflowWorkItem_Call) Return(_a0 error) *Backend_CompleteWorkflowWorkItem_Call { _c.Call.Return(_a0) return _c } -func (_c *Backend_CompleteOrchestrationWorkItem_Call) RunAndReturn(run func(context.Context, *backend.OrchestrationWorkItem) error) *Backend_CompleteOrchestrationWorkItem_Call { +func (_c *Backend_CompleteWorkflowWorkItem_Call) RunAndReturn(run func(context.Context, *backend.WorkflowWorkItem) error) *Backend_CompleteWorkflowWorkItem_Call { _c.Call.Return(run) return _c } -// CompleteOrchestratorTask provides a mock function with given fields: _a0, _a1 -func (_m *Backend) CompleteOrchestratorTask(_a0 context.Context, _a1 *protos.OrchestratorResponse) error { +// CompleteWorkflowTask provides a mock function with given fields: _a0, _a1 +func (_m *Backend) CompleteWorkflowTask(_a0 context.Context, _a1 *protos.WorkflowResponse) error { ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for CompleteOrchestratorTask") + panic("no return value specified for CompleteWorkflowTask") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *protos.OrchestratorResponse) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, *protos.WorkflowResponse) error); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) @@ -422,53 +422,46 @@ func (_m *Backend) CompleteOrchestratorTask(_a0 context.Context, _a1 *protos.Orc return r0 } -// Backend_CompleteOrchestratorTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteOrchestratorTask' -type Backend_CompleteOrchestratorTask_Call struct { +// Backend_CompleteWorkflowTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteWorkflowTask' +type Backend_CompleteWorkflowTask_Call struct { *mock.Call } -// CompleteOrchestratorTask is a helper method to define mock.On call +// CompleteWorkflowTask is a helper method to define mock.On call // - _a0 context.Context -// - _a1 *protos.OrchestratorResponse -func (_e *Backend_Expecter) CompleteOrchestratorTask(_a0 interface{}, _a1 interface{}) *Backend_CompleteOrchestratorTask_Call { - return &Backend_CompleteOrchestratorTask_Call{Call: _e.mock.On("CompleteOrchestratorTask", _a0, _a1)} +// - _a1 *protos.WorkflowResponse +func (_e *Backend_Expecter) CompleteWorkflowTask(_a0 interface{}, _a1 interface{}) *Backend_CompleteWorkflowTask_Call { + return &Backend_CompleteWorkflowTask_Call{Call: _e.mock.On("CompleteWorkflowTask", _a0, _a1)} } -func (_c *Backend_CompleteOrchestratorTask_Call) Run(run func(_a0 context.Context, _a1 *protos.OrchestratorResponse)) *Backend_CompleteOrchestratorTask_Call { +func (_c *Backend_CompleteWorkflowTask_Call) Run(run func(_a0 context.Context, _a1 *protos.WorkflowResponse)) *Backend_CompleteWorkflowTask_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*protos.OrchestratorResponse)) + run(args[0].(context.Context), args[1].(*protos.WorkflowResponse)) }) return _c } -func (_c *Backend_CompleteOrchestratorTask_Call) Return(_a0 error) *Backend_CompleteOrchestratorTask_Call { +func (_c *Backend_CompleteWorkflowTask_Call) Return(_a0 error) *Backend_CompleteWorkflowTask_Call { _c.Call.Return(_a0) return _c } -func (_c *Backend_CompleteOrchestratorTask_Call) RunAndReturn(run func(context.Context, *protos.OrchestratorResponse) error) *Backend_CompleteOrchestratorTask_Call { +func (_c *Backend_CompleteWorkflowTask_Call) RunAndReturn(run func(context.Context, *protos.WorkflowResponse) error) *Backend_CompleteWorkflowTask_Call { _c.Call.Return(run) return _c } -// CreateOrchestrationInstance provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Backend) CreateOrchestrationInstance(_a0 context.Context, _a1 *protos.HistoryEvent, _a2 ...backend.OrchestrationIdReusePolicyOptions) error { - _va := make([]interface{}, len(_a2)) - for _i := range _a2 { - _va[_i] = _a2[_i] - } - var _ca []interface{} - _ca = append(_ca, _a0, _a1) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) +// CreateWorkflowInstance provides a mock function with given fields: _a0, _a1 +func (_m *Backend) CreateWorkflowInstance(_a0 context.Context, _a1 *protos.HistoryEvent) error { + ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for CreateOrchestrationInstance") + panic("no return value specified for CreateWorkflowInstance") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *protos.HistoryEvent, ...backend.OrchestrationIdReusePolicyOptions) error); ok { - r0 = rf(_a0, _a1, _a2...) + if rf, ok := ret.Get(0).(func(context.Context, *protos.HistoryEvent) error); ok { + r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) } @@ -476,39 +469,31 @@ func (_m *Backend) CreateOrchestrationInstance(_a0 context.Context, _a1 *protos. return r0 } -// Backend_CreateOrchestrationInstance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOrchestrationInstance' -type Backend_CreateOrchestrationInstance_Call struct { +// Backend_CreateWorkflowInstance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateWorkflowInstance' +type Backend_CreateWorkflowInstance_Call struct { *mock.Call } -// CreateOrchestrationInstance is a helper method to define mock.On call +// CreateWorkflowInstance is a helper method to define mock.On call // - _a0 context.Context // - _a1 *protos.HistoryEvent -// - _a2 ...backend.OrchestrationIdReusePolicyOptions -func (_e *Backend_Expecter) CreateOrchestrationInstance(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *Backend_CreateOrchestrationInstance_Call { - return &Backend_CreateOrchestrationInstance_Call{Call: _e.mock.On("CreateOrchestrationInstance", - append([]interface{}{_a0, _a1}, _a2...)...)} +func (_e *Backend_Expecter) CreateWorkflowInstance(_a0 interface{}, _a1 interface{}) *Backend_CreateWorkflowInstance_Call { + return &Backend_CreateWorkflowInstance_Call{Call: _e.mock.On("CreateWorkflowInstance", _a0, _a1)} } -func (_c *Backend_CreateOrchestrationInstance_Call) Run(run func(_a0 context.Context, _a1 *protos.HistoryEvent, _a2 ...backend.OrchestrationIdReusePolicyOptions)) *Backend_CreateOrchestrationInstance_Call { +func (_c *Backend_CreateWorkflowInstance_Call) Run(run func(_a0 context.Context, _a1 *protos.HistoryEvent)) *Backend_CreateWorkflowInstance_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]backend.OrchestrationIdReusePolicyOptions, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(backend.OrchestrationIdReusePolicyOptions) - } - } - run(args[0].(context.Context), args[1].(*protos.HistoryEvent), variadicArgs...) + run(args[0].(context.Context), args[1].(*protos.HistoryEvent)) }) return _c } -func (_c *Backend_CreateOrchestrationInstance_Call) Return(_a0 error) *Backend_CreateOrchestrationInstance_Call { +func (_c *Backend_CreateWorkflowInstance_Call) Return(_a0 error) *Backend_CreateWorkflowInstance_Call { _c.Call.Return(_a0) return _c } -func (_c *Backend_CreateOrchestrationInstance_Call) RunAndReturn(run func(context.Context, *protos.HistoryEvent, ...backend.OrchestrationIdReusePolicyOptions) error) *Backend_CreateOrchestrationInstance_Call { +func (_c *Backend_CreateWorkflowInstance_Call) RunAndReturn(run func(context.Context, *protos.HistoryEvent) error) *Backend_CreateWorkflowInstance_Call { _c.Call.Return(run) return _c } @@ -664,24 +649,24 @@ func (_c *Backend_GetInstanceHistory_Call) RunAndReturn(run func(context.Context return _c } -// GetOrchestrationMetadata provides a mock function with given fields: _a0, _a1 -func (_m *Backend) GetOrchestrationMetadata(_a0 context.Context, _a1 api.InstanceID) (*protos.OrchestrationMetadata, error) { +// GetWorkflowMetadata provides a mock function with given fields: _a0, _a1 +func (_m *Backend) GetWorkflowMetadata(_a0 context.Context, _a1 api.InstanceID) (*protos.WorkflowMetadata, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for GetOrchestrationMetadata") + panic("no return value specified for GetWorkflowMetadata") } - var r0 *protos.OrchestrationMetadata + var r0 *protos.WorkflowMetadata var r1 error - if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID) (*protos.OrchestrationMetadata, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID) (*protos.WorkflowMetadata, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID) *protos.OrchestrationMetadata); ok { + if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID) *protos.WorkflowMetadata); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*protos.OrchestrationMetadata) + r0 = ret.Get(0).(*protos.WorkflowMetadata) } } @@ -694,57 +679,57 @@ func (_m *Backend) GetOrchestrationMetadata(_a0 context.Context, _a1 api.Instanc return r0, r1 } -// Backend_GetOrchestrationMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrchestrationMetadata' -type Backend_GetOrchestrationMetadata_Call struct { +// Backend_GetWorkflowMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorkflowMetadata' +type Backend_GetWorkflowMetadata_Call struct { *mock.Call } -// GetOrchestrationMetadata is a helper method to define mock.On call +// GetWorkflowMetadata is a helper method to define mock.On call // - _a0 context.Context // - _a1 api.InstanceID -func (_e *Backend_Expecter) GetOrchestrationMetadata(_a0 interface{}, _a1 interface{}) *Backend_GetOrchestrationMetadata_Call { - return &Backend_GetOrchestrationMetadata_Call{Call: _e.mock.On("GetOrchestrationMetadata", _a0, _a1)} +func (_e *Backend_Expecter) GetWorkflowMetadata(_a0 interface{}, _a1 interface{}) *Backend_GetWorkflowMetadata_Call { + return &Backend_GetWorkflowMetadata_Call{Call: _e.mock.On("GetWorkflowMetadata", _a0, _a1)} } -func (_c *Backend_GetOrchestrationMetadata_Call) Run(run func(_a0 context.Context, _a1 api.InstanceID)) *Backend_GetOrchestrationMetadata_Call { +func (_c *Backend_GetWorkflowMetadata_Call) Run(run func(_a0 context.Context, _a1 api.InstanceID)) *Backend_GetWorkflowMetadata_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(api.InstanceID)) }) return _c } -func (_c *Backend_GetOrchestrationMetadata_Call) Return(_a0 *protos.OrchestrationMetadata, _a1 error) *Backend_GetOrchestrationMetadata_Call { +func (_c *Backend_GetWorkflowMetadata_Call) Return(_a0 *protos.WorkflowMetadata, _a1 error) *Backend_GetWorkflowMetadata_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *Backend_GetOrchestrationMetadata_Call) RunAndReturn(run func(context.Context, api.InstanceID) (*protos.OrchestrationMetadata, error)) *Backend_GetOrchestrationMetadata_Call { +func (_c *Backend_GetWorkflowMetadata_Call) RunAndReturn(run func(context.Context, api.InstanceID) (*protos.WorkflowMetadata, error)) *Backend_GetWorkflowMetadata_Call { _c.Call.Return(run) return _c } -// GetOrchestrationRuntimeState provides a mock function with given fields: _a0, _a1 -func (_m *Backend) GetOrchestrationRuntimeState(_a0 context.Context, _a1 *backend.OrchestrationWorkItem) (*protos.OrchestrationRuntimeState, error) { +// GetWorkflowRuntimeState provides a mock function with given fields: _a0, _a1 +func (_m *Backend) GetWorkflowRuntimeState(_a0 context.Context, _a1 *backend.WorkflowWorkItem) (*protos.WorkflowRuntimeState, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for GetOrchestrationRuntimeState") + panic("no return value specified for GetWorkflowRuntimeState") } - var r0 *protos.OrchestrationRuntimeState + var r0 *protos.WorkflowRuntimeState var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *backend.OrchestrationWorkItem) (*protos.OrchestrationRuntimeState, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *backend.WorkflowWorkItem) (*protos.WorkflowRuntimeState, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, *backend.OrchestrationWorkItem) *protos.OrchestrationRuntimeState); ok { + if rf, ok := ret.Get(0).(func(context.Context, *backend.WorkflowWorkItem) *protos.WorkflowRuntimeState); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*protos.OrchestrationRuntimeState) + r0 = ret.Get(0).(*protos.WorkflowRuntimeState) } } - if rf, ok := ret.Get(1).(func(context.Context, *backend.OrchestrationWorkItem) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *backend.WorkflowWorkItem) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -753,31 +738,31 @@ func (_m *Backend) GetOrchestrationRuntimeState(_a0 context.Context, _a1 *backen return r0, r1 } -// Backend_GetOrchestrationRuntimeState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrchestrationRuntimeState' -type Backend_GetOrchestrationRuntimeState_Call struct { +// Backend_GetWorkflowRuntimeState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorkflowRuntimeState' +type Backend_GetWorkflowRuntimeState_Call struct { *mock.Call } -// GetOrchestrationRuntimeState is a helper method to define mock.On call +// GetWorkflowRuntimeState is a helper method to define mock.On call // - _a0 context.Context -// - _a1 *backend.OrchestrationWorkItem -func (_e *Backend_Expecter) GetOrchestrationRuntimeState(_a0 interface{}, _a1 interface{}) *Backend_GetOrchestrationRuntimeState_Call { - return &Backend_GetOrchestrationRuntimeState_Call{Call: _e.mock.On("GetOrchestrationRuntimeState", _a0, _a1)} +// - _a1 *backend.WorkflowWorkItem +func (_e *Backend_Expecter) GetWorkflowRuntimeState(_a0 interface{}, _a1 interface{}) *Backend_GetWorkflowRuntimeState_Call { + return &Backend_GetWorkflowRuntimeState_Call{Call: _e.mock.On("GetWorkflowRuntimeState", _a0, _a1)} } -func (_c *Backend_GetOrchestrationRuntimeState_Call) Run(run func(_a0 context.Context, _a1 *backend.OrchestrationWorkItem)) *Backend_GetOrchestrationRuntimeState_Call { +func (_c *Backend_GetWorkflowRuntimeState_Call) Run(run func(_a0 context.Context, _a1 *backend.WorkflowWorkItem)) *Backend_GetWorkflowRuntimeState_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*backend.OrchestrationWorkItem)) + run(args[0].(context.Context), args[1].(*backend.WorkflowWorkItem)) }) return _c } -func (_c *Backend_GetOrchestrationRuntimeState_Call) Return(_a0 *protos.OrchestrationRuntimeState, _a1 error) *Backend_GetOrchestrationRuntimeState_Call { +func (_c *Backend_GetWorkflowRuntimeState_Call) Return(_a0 *protos.WorkflowRuntimeState, _a1 error) *Backend_GetWorkflowRuntimeState_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *Backend_GetOrchestrationRuntimeState_Call) RunAndReturn(run func(context.Context, *backend.OrchestrationWorkItem) (*protos.OrchestrationRuntimeState, error)) *Backend_GetOrchestrationRuntimeState_Call { +func (_c *Backend_GetWorkflowRuntimeState_Call) RunAndReturn(run func(context.Context, *backend.WorkflowWorkItem) (*protos.WorkflowRuntimeState, error)) *Backend_GetWorkflowRuntimeState_Call { _c.Call.Return(run) return _c } @@ -899,24 +884,24 @@ func (_c *Backend_NextActivityWorkItem_Call) RunAndReturn(run func(context.Conte return _c } -// NextOrchestrationWorkItem provides a mock function with given fields: _a0 -func (_m *Backend) NextOrchestrationWorkItem(_a0 context.Context) (*backend.OrchestrationWorkItem, error) { +// NextWorkflowWorkItem provides a mock function with given fields: _a0 +func (_m *Backend) NextWorkflowWorkItem(_a0 context.Context) (*backend.WorkflowWorkItem, error) { ret := _m.Called(_a0) if len(ret) == 0 { - panic("no return value specified for NextOrchestrationWorkItem") + panic("no return value specified for NextWorkflowWorkItem") } - var r0 *backend.OrchestrationWorkItem + var r0 *backend.WorkflowWorkItem var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*backend.OrchestrationWorkItem, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context) (*backend.WorkflowWorkItem, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(context.Context) *backend.OrchestrationWorkItem); ok { + if rf, ok := ret.Get(0).(func(context.Context) *backend.WorkflowWorkItem); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*backend.OrchestrationWorkItem) + r0 = ret.Get(0).(*backend.WorkflowWorkItem) } } @@ -929,40 +914,40 @@ func (_m *Backend) NextOrchestrationWorkItem(_a0 context.Context) (*backend.Orch return r0, r1 } -// Backend_NextOrchestrationWorkItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NextOrchestrationWorkItem' -type Backend_NextOrchestrationWorkItem_Call struct { +// Backend_NextWorkflowWorkItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NextWorkflowWorkItem' +type Backend_NextWorkflowWorkItem_Call struct { *mock.Call } -// NextOrchestrationWorkItem is a helper method to define mock.On call +// NextWorkflowWorkItem is a helper method to define mock.On call // - _a0 context.Context -func (_e *Backend_Expecter) NextOrchestrationWorkItem(_a0 interface{}) *Backend_NextOrchestrationWorkItem_Call { - return &Backend_NextOrchestrationWorkItem_Call{Call: _e.mock.On("NextOrchestrationWorkItem", _a0)} +func (_e *Backend_Expecter) NextWorkflowWorkItem(_a0 interface{}) *Backend_NextWorkflowWorkItem_Call { + return &Backend_NextWorkflowWorkItem_Call{Call: _e.mock.On("NextWorkflowWorkItem", _a0)} } -func (_c *Backend_NextOrchestrationWorkItem_Call) Run(run func(_a0 context.Context)) *Backend_NextOrchestrationWorkItem_Call { +func (_c *Backend_NextWorkflowWorkItem_Call) Run(run func(_a0 context.Context)) *Backend_NextWorkflowWorkItem_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } -func (_c *Backend_NextOrchestrationWorkItem_Call) Return(_a0 *backend.OrchestrationWorkItem, _a1 error) *Backend_NextOrchestrationWorkItem_Call { +func (_c *Backend_NextWorkflowWorkItem_Call) Return(_a0 *backend.WorkflowWorkItem, _a1 error) *Backend_NextWorkflowWorkItem_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *Backend_NextOrchestrationWorkItem_Call) RunAndReturn(run func(context.Context) (*backend.OrchestrationWorkItem, error)) *Backend_NextOrchestrationWorkItem_Call { +func (_c *Backend_NextWorkflowWorkItem_Call) RunAndReturn(run func(context.Context) (*backend.WorkflowWorkItem, error)) *Backend_NextWorkflowWorkItem_Call { _c.Call.Return(run) return _c } -// PurgeOrchestrationState provides a mock function with given fields: ctx, id, force -func (_m *Backend) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, force bool) error { +// PurgeWorkflowState provides a mock function with given fields: ctx, id, force +func (_m *Backend) PurgeWorkflowState(ctx context.Context, id api.InstanceID, force bool) error { ret := _m.Called(ctx, id, force) if len(ret) == 0 { - panic("no return value specified for PurgeOrchestrationState") + panic("no return value specified for PurgeWorkflowState") } var r0 error @@ -975,32 +960,32 @@ func (_m *Backend) PurgeOrchestrationState(ctx context.Context, id api.InstanceI return r0 } -// Backend_PurgeOrchestrationState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeOrchestrationState' -type Backend_PurgeOrchestrationState_Call struct { +// Backend_PurgeWorkflowState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeWorkflowState' +type Backend_PurgeWorkflowState_Call struct { *mock.Call } -// PurgeOrchestrationState is a helper method to define mock.On call +// PurgeWorkflowState is a helper method to define mock.On call // - ctx context.Context // - id api.InstanceID // - force bool -func (_e *Backend_Expecter) PurgeOrchestrationState(ctx interface{}, id interface{}, force interface{}) *Backend_PurgeOrchestrationState_Call { - return &Backend_PurgeOrchestrationState_Call{Call: _e.mock.On("PurgeOrchestrationState", ctx, id, force)} +func (_e *Backend_Expecter) PurgeWorkflowState(ctx interface{}, id interface{}, force interface{}) *Backend_PurgeWorkflowState_Call { + return &Backend_PurgeWorkflowState_Call{Call: _e.mock.On("PurgeWorkflowState", ctx, id, force)} } -func (_c *Backend_PurgeOrchestrationState_Call) Run(run func(ctx context.Context, id api.InstanceID, force bool)) *Backend_PurgeOrchestrationState_Call { +func (_c *Backend_PurgeWorkflowState_Call) Run(run func(ctx context.Context, id api.InstanceID, force bool)) *Backend_PurgeWorkflowState_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(api.InstanceID), args[2].(bool)) }) return _c } -func (_c *Backend_PurgeOrchestrationState_Call) Return(_a0 error) *Backend_PurgeOrchestrationState_Call { +func (_c *Backend_PurgeWorkflowState_Call) Return(_a0 error) *Backend_PurgeWorkflowState_Call { _c.Call.Return(_a0) return _c } -func (_c *Backend_PurgeOrchestrationState_Call) RunAndReturn(run func(context.Context, api.InstanceID, bool) error) *Backend_PurgeOrchestrationState_Call { +func (_c *Backend_PurgeWorkflowState_Call) RunAndReturn(run func(context.Context, api.InstanceID, bool) error) *Backend_PurgeWorkflowState_Call { _c.Call.Return(run) return _c } @@ -1202,64 +1187,64 @@ func (_c *Backend_WaitForActivityCompletion_Call) RunAndReturn(run func(*protos. return _c } -// WaitForOrchestratorCompletion provides a mock function with given fields: _a0 -func (_m *Backend) WaitForOrchestratorCompletion(_a0 *protos.OrchestratorRequest) func(context.Context) (*protos.OrchestratorResponse, error) { +// WaitForWorkflowTaskCompletion provides a mock function with given fields: _a0 +func (_m *Backend) WaitForWorkflowTaskCompletion(_a0 *protos.WorkflowRequest) func(context.Context) (*protos.WorkflowResponse, error) { ret := _m.Called(_a0) if len(ret) == 0 { - panic("no return value specified for WaitForOrchestratorCompletion") + panic("no return value specified for WaitForWorkflowTaskCompletion") } - var r0 func(context.Context) (*protos.OrchestratorResponse, error) - if rf, ok := ret.Get(0).(func(*protos.OrchestratorRequest) func(context.Context) (*protos.OrchestratorResponse, error)); ok { + var r0 func(context.Context) (*protos.WorkflowResponse, error) + if rf, ok := ret.Get(0).(func(*protos.WorkflowRequest) func(context.Context) (*protos.WorkflowResponse, error)); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(func(context.Context) (*protos.OrchestratorResponse, error)) + r0 = ret.Get(0).(func(context.Context) (*protos.WorkflowResponse, error)) } } return r0 } -// Backend_WaitForOrchestratorCompletion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForOrchestratorCompletion' -type Backend_WaitForOrchestratorCompletion_Call struct { +// Backend_WaitForWorkflowTaskCompletion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForWorkflowTaskCompletion' +type Backend_WaitForWorkflowTaskCompletion_Call struct { *mock.Call } -// WaitForOrchestratorCompletion is a helper method to define mock.On call -// - _a0 *protos.OrchestratorRequest -func (_e *Backend_Expecter) WaitForOrchestratorCompletion(_a0 interface{}) *Backend_WaitForOrchestratorCompletion_Call { - return &Backend_WaitForOrchestratorCompletion_Call{Call: _e.mock.On("WaitForOrchestratorCompletion", _a0)} +// WaitForWorkflowTaskCompletion is a helper method to define mock.On call +// - _a0 *protos.WorkflowRequest +func (_e *Backend_Expecter) WaitForWorkflowTaskCompletion(_a0 interface{}) *Backend_WaitForWorkflowTaskCompletion_Call { + return &Backend_WaitForWorkflowTaskCompletion_Call{Call: _e.mock.On("WaitForWorkflowTaskCompletion", _a0)} } -func (_c *Backend_WaitForOrchestratorCompletion_Call) Run(run func(_a0 *protos.OrchestratorRequest)) *Backend_WaitForOrchestratorCompletion_Call { +func (_c *Backend_WaitForWorkflowTaskCompletion_Call) Run(run func(_a0 *protos.WorkflowRequest)) *Backend_WaitForWorkflowTaskCompletion_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*protos.OrchestratorRequest)) + run(args[0].(*protos.WorkflowRequest)) }) return _c } -func (_c *Backend_WaitForOrchestratorCompletion_Call) Return(_a0 func(context.Context) (*protos.OrchestratorResponse, error)) *Backend_WaitForOrchestratorCompletion_Call { +func (_c *Backend_WaitForWorkflowTaskCompletion_Call) Return(_a0 func(context.Context) (*protos.WorkflowResponse, error)) *Backend_WaitForWorkflowTaskCompletion_Call { _c.Call.Return(_a0) return _c } -func (_c *Backend_WaitForOrchestratorCompletion_Call) RunAndReturn(run func(*protos.OrchestratorRequest) func(context.Context) (*protos.OrchestratorResponse, error)) *Backend_WaitForOrchestratorCompletion_Call { +func (_c *Backend_WaitForWorkflowTaskCompletion_Call) RunAndReturn(run func(*protos.WorkflowRequest) func(context.Context) (*protos.WorkflowResponse, error)) *Backend_WaitForWorkflowTaskCompletion_Call { _c.Call.Return(run) return _c } -// WatchOrchestrationRuntimeStatus provides a mock function with given fields: ctx, id, condition -func (_m *Backend) WatchOrchestrationRuntimeStatus(ctx context.Context, id api.InstanceID, condition func(*protos.OrchestrationMetadata) bool) error { +// WatchWorkflowRuntimeStatus provides a mock function with given fields: ctx, id, condition +func (_m *Backend) WatchWorkflowRuntimeStatus(ctx context.Context, id api.InstanceID, condition func(*protos.WorkflowMetadata) bool) error { ret := _m.Called(ctx, id, condition) if len(ret) == 0 { - panic("no return value specified for WatchOrchestrationRuntimeStatus") + panic("no return value specified for WatchWorkflowRuntimeStatus") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID, func(*protos.OrchestrationMetadata) bool) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID, func(*protos.WorkflowMetadata) bool) error); ok { r0 = rf(ctx, id, condition) } else { r0 = ret.Error(0) @@ -1268,32 +1253,32 @@ func (_m *Backend) WatchOrchestrationRuntimeStatus(ctx context.Context, id api.I return r0 } -// Backend_WatchOrchestrationRuntimeStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOrchestrationRuntimeStatus' -type Backend_WatchOrchestrationRuntimeStatus_Call struct { +// Backend_WatchWorkflowRuntimeStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchWorkflowRuntimeStatus' +type Backend_WatchWorkflowRuntimeStatus_Call struct { *mock.Call } -// WatchOrchestrationRuntimeStatus is a helper method to define mock.On call +// WatchWorkflowRuntimeStatus is a helper method to define mock.On call // - ctx context.Context // - id api.InstanceID -// - condition func(*protos.OrchestrationMetadata) bool -func (_e *Backend_Expecter) WatchOrchestrationRuntimeStatus(ctx interface{}, id interface{}, condition interface{}) *Backend_WatchOrchestrationRuntimeStatus_Call { - return &Backend_WatchOrchestrationRuntimeStatus_Call{Call: _e.mock.On("WatchOrchestrationRuntimeStatus", ctx, id, condition)} +// - condition func(*protos.WorkflowMetadata) bool +func (_e *Backend_Expecter) WatchWorkflowRuntimeStatus(ctx interface{}, id interface{}, condition interface{}) *Backend_WatchWorkflowRuntimeStatus_Call { + return &Backend_WatchWorkflowRuntimeStatus_Call{Call: _e.mock.On("WatchWorkflowRuntimeStatus", ctx, id, condition)} } -func (_c *Backend_WatchOrchestrationRuntimeStatus_Call) Run(run func(ctx context.Context, id api.InstanceID, condition func(*protos.OrchestrationMetadata) bool)) *Backend_WatchOrchestrationRuntimeStatus_Call { +func (_c *Backend_WatchWorkflowRuntimeStatus_Call) Run(run func(ctx context.Context, id api.InstanceID, condition func(*protos.WorkflowMetadata) bool)) *Backend_WatchWorkflowRuntimeStatus_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(api.InstanceID), args[2].(func(*protos.OrchestrationMetadata) bool)) + run(args[0].(context.Context), args[1].(api.InstanceID), args[2].(func(*protos.WorkflowMetadata) bool)) }) return _c } -func (_c *Backend_WatchOrchestrationRuntimeStatus_Call) Return(_a0 error) *Backend_WatchOrchestrationRuntimeStatus_Call { +func (_c *Backend_WatchWorkflowRuntimeStatus_Call) Return(_a0 error) *Backend_WatchWorkflowRuntimeStatus_Call { _c.Call.Return(_a0) return _c } -func (_c *Backend_WatchOrchestrationRuntimeStatus_Call) RunAndReturn(run func(context.Context, api.InstanceID, func(*protos.OrchestrationMetadata) bool) error) *Backend_WatchOrchestrationRuntimeStatus_Call { +func (_c *Backend_WatchWorkflowRuntimeStatus_Call) RunAndReturn(run func(context.Context, api.InstanceID, func(*protos.WorkflowMetadata) bool) error) *Backend_WatchWorkflowRuntimeStatus_Call { _c.Call.Return(run) return _c } diff --git a/tests/mocks/Executor.go b/tests/mocks/Executor.go index 8da3a2d1..8c32c0e1 100644 --- a/tests/mocks/Executor.go +++ b/tests/mocks/Executor.go @@ -85,24 +85,24 @@ func (_c *Executor_ExecuteActivity_Call) RunAndReturn(run func(context.Context, return _c } -// ExecuteOrchestrator provides a mock function with given fields: ctx, iid, oldEvents, newEvents -func (_m *Executor) ExecuteOrchestrator(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.OrchestratorResponse, error) { +// ExecuteWorkflow provides a mock function with given fields: ctx, iid, oldEvents, newEvents +func (_m *Executor) ExecuteWorkflow(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.WorkflowResponse, error) { ret := _m.Called(ctx, iid, oldEvents, newEvents) if len(ret) == 0 { - panic("no return value specified for ExecuteOrchestrator") + panic("no return value specified for ExecuteWorkflow") } - var r0 *protos.OrchestratorResponse + var r0 *protos.WorkflowResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID, []*protos.HistoryEvent, []*protos.HistoryEvent) (*protos.OrchestratorResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID, []*protos.HistoryEvent, []*protos.HistoryEvent) (*protos.WorkflowResponse, error)); ok { return rf(ctx, iid, oldEvents, newEvents) } - if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID, []*protos.HistoryEvent, []*protos.HistoryEvent) *protos.OrchestratorResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, api.InstanceID, []*protos.HistoryEvent, []*protos.HistoryEvent) *protos.WorkflowResponse); ok { r0 = rf(ctx, iid, oldEvents, newEvents) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*protos.OrchestratorResponse) + r0 = ret.Get(0).(*protos.WorkflowResponse) } } @@ -115,33 +115,33 @@ func (_m *Executor) ExecuteOrchestrator(ctx context.Context, iid api.InstanceID, return r0, r1 } -// Executor_ExecuteOrchestrator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteOrchestrator' -type Executor_ExecuteOrchestrator_Call struct { +// Executor_ExecuteWorkflow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteWorkflow' +type Executor_ExecuteWorkflow_Call struct { *mock.Call } -// ExecuteOrchestrator is a helper method to define mock.On call +// ExecuteWorkflow is a helper method to define mock.On call // - ctx context.Context // - iid api.InstanceID // - oldEvents []*protos.HistoryEvent // - newEvents []*protos.HistoryEvent -func (_e *Executor_Expecter) ExecuteOrchestrator(ctx interface{}, iid interface{}, oldEvents interface{}, newEvents interface{}) *Executor_ExecuteOrchestrator_Call { - return &Executor_ExecuteOrchestrator_Call{Call: _e.mock.On("ExecuteOrchestrator", ctx, iid, oldEvents, newEvents)} +func (_e *Executor_Expecter) ExecuteWorkflow(ctx interface{}, iid interface{}, oldEvents interface{}, newEvents interface{}) *Executor_ExecuteWorkflow_Call { + return &Executor_ExecuteWorkflow_Call{Call: _e.mock.On("ExecuteWorkflow", ctx, iid, oldEvents, newEvents)} } -func (_c *Executor_ExecuteOrchestrator_Call) Run(run func(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent)) *Executor_ExecuteOrchestrator_Call { +func (_c *Executor_ExecuteWorkflow_Call) Run(run func(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent)) *Executor_ExecuteWorkflow_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(api.InstanceID), args[2].([]*protos.HistoryEvent), args[3].([]*protos.HistoryEvent)) }) return _c } -func (_c *Executor_ExecuteOrchestrator_Call) Return(_a0 *protos.OrchestratorResponse, _a1 error) *Executor_ExecuteOrchestrator_Call { +func (_c *Executor_ExecuteWorkflow_Call) Return(_a0 *protos.WorkflowResponse, _a1 error) *Executor_ExecuteWorkflow_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *Executor_ExecuteOrchestrator_Call) RunAndReturn(run func(context.Context, api.InstanceID, []*protos.HistoryEvent, []*protos.HistoryEvent) (*protos.OrchestratorResponse, error)) *Executor_ExecuteOrchestrator_Call { +func (_c *Executor_ExecuteWorkflow_Call) RunAndReturn(run func(context.Context, api.InstanceID, []*protos.HistoryEvent, []*protos.HistoryEvent) (*protos.WorkflowResponse, error)) *Executor_ExecuteWorkflow_Call { _c.Call.Return(run) return _c } diff --git a/tests/orchestrations_test.go b/tests/orchestrations_test.go index e3aa4cc8..5e38eb9a 100644 --- a/tests/orchestrations_test.go +++ b/tests/orchestrations_test.go @@ -25,12 +25,12 @@ import ( "github.com/dapr/durabletask-go/tests/utils" ) -var tracer = otel.Tracer("orchestration-test") +var tracer = otel.Tracer("workflow-test") -func Test_EmptyOrchestration(t *testing.T) { +func Test_EmptyWorkflow(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("EmptyOrchestrator", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("EmptyWorkflow", func(ctx *task.WorkflowContext) (any, error) { return nil, nil }) @@ -40,25 +40,25 @@ func Test_EmptyOrchestration(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "EmptyOrchestrator") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "EmptyWorkflow") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("EmptyOrchestrator", id), - utils.AssertOrchestratorExecuted("EmptyOrchestrator", id, "COMPLETED"), + utils.AssertWorkflowCreated("EmptyWorkflow", id), + utils.AssertWorkflowExecuted("EmptyWorkflow", id, "COMPLETED"), ) } func Test_SingleTimer(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleTimer", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SingleTimer", func(ctx *task.WorkflowContext) (any, error) { err := ctx.CreateTimer(time.Duration(0)).Await(nil) return nil, err }) @@ -69,10 +69,10 @@ func Test_SingleTimer(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "SingleTimer") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "SingleTimer") if assert.NoError(t, err) { - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.GreaterOrEqual(t, metadata.LastUpdatedAt.AsTime(), metadata.CreatedAt.AsTime()) @@ -82,16 +82,16 @@ func Test_SingleTimer(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("SingleTimer", id), + utils.AssertWorkflowCreated("SingleTimer", id), utils.AssertTimer(id), - utils.AssertOrchestratorExecuted("SingleTimer", id, "COMPLETED"), + utils.AssertWorkflowExecuted("SingleTimer", id, "COMPLETED"), ) } func Test_ConcurrentTimers(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("TimerFanOut", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("TimerFanOut", func(ctx *task.WorkflowContext) (any, error) { tasks := []task.Task{} for i := 0; i < 3; i++ { tasks = append(tasks, ctx.CreateTimer(1*time.Second)) @@ -111,10 +111,10 @@ func Test_ConcurrentTimers(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "TimerFanOut") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "TimerFanOut") if assert.NoError(t, err) { - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.GreaterOrEqual(t, metadata.LastUpdatedAt.AsTime(), metadata.CreatedAt.AsTime()) @@ -124,18 +124,18 @@ func Test_ConcurrentTimers(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("TimerFanOut", id), + utils.AssertWorkflowCreated("TimerFanOut", id), utils.AssertTimer(id), utils.AssertTimer(id), utils.AssertTimer(id), - utils.AssertOrchestratorExecuted("TimerFanOut", id, "COMPLETED"), + utils.AssertWorkflowExecuted("TimerFanOut", id, "COMPLETED"), ) } func Test_IsReplaying(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("IsReplayingOrch", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("IsReplayingOrch", func(ctx *task.WorkflowContext) (any, error) { values := []bool{ctx.IsReplaying} ctx.CreateTimer(time.Duration(0)).Await(nil) values = append(values, ctx.IsReplaying) @@ -150,10 +150,10 @@ func Test_IsReplaying(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "IsReplayingOrch") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "IsReplayingOrch") if assert.NoError(t, err) { - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `[true,true,false]`, metadata.Output.Value) @@ -163,17 +163,17 @@ func Test_IsReplaying(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("IsReplayingOrch", id), + utils.AssertWorkflowCreated("IsReplayingOrch", id), utils.AssertTimer(id), utils.AssertTimer(id), - utils.AssertOrchestratorExecuted("IsReplayingOrch", id, "COMPLETED"), + utils.AssertWorkflowExecuted("IsReplayingOrch", id, "COMPLETED"), ) } func Test_SingleActivity(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SingleActivity", func(ctx *task.WorkflowContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { return nil, err @@ -196,10 +196,10 @@ func Test_SingleActivity(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("世界")) + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "SingleActivity", api.WithInput("世界")) if assert.NoError(t, err) { - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `"Hello, 世界!"`, metadata.Output.Value) @@ -209,16 +209,16 @@ func Test_SingleActivity(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("SingleActivity", id), + utils.AssertWorkflowCreated("SingleActivity", id), utils.AssertActivity("SayHello", id, 0), - utils.AssertOrchestratorExecuted("SingleActivity", id, "COMPLETED"), + utils.AssertWorkflowExecuted("SingleActivity", id, "COMPLETED"), ) } func Test_SingleActivity_TaskSpan(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SingleActivity", func(ctx *task.WorkflowContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { return nil, err @@ -245,10 +245,10 @@ func Test_SingleActivity_TaskSpan(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("世界")) + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "SingleActivity", api.WithInput("世界")) if assert.NoError(t, err) { - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `"Hello, 世界!"`, metadata.Output.Value) @@ -258,10 +258,10 @@ func Test_SingleActivity_TaskSpan(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("SingleActivity", id), + utils.AssertWorkflowCreated("SingleActivity", id), utils.AssertSpan("activityChild"), utils.AssertActivity("SayHello", id, 0), - utils.AssertOrchestratorExecuted("SingleActivity", id, "COMPLETED"), + utils.AssertWorkflowExecuted("SingleActivity", id, "COMPLETED"), ) // assert child-parent relationship assert.Equal(t, spans[1].Parent().SpanID(), spans[2].SpanContext().SpanID()) @@ -270,7 +270,7 @@ func Test_SingleActivity_TaskSpan(t *testing.T) { func Test_ActivityChain(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("ActivityChain", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ActivityChain", func(ctx *task.WorkflowContext) (any, error) { val := 0 for i := 0; i < 10; i++ { if err := ctx.CallActivity("PlusOne", task.WithActivityInput(val)).Await(&val); err != nil { @@ -293,10 +293,10 @@ func Test_ActivityChain(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ActivityChain") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "ActivityChain") if assert.NoError(t, err) { - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `10`, metadata.Output.Value) @@ -306,18 +306,18 @@ func Test_ActivityChain(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("ActivityChain", id), + utils.AssertWorkflowCreated("ActivityChain", id), utils.AssertActivity("PlusOne", id, 0), utils.AssertActivity("PlusOne", id, 1), utils.AssertActivity("PlusOne", id, 2), utils.AssertActivity("PlusOne", id, 3), utils.AssertActivity("PlusOne", id, 4), utils.AssertActivity("PlusOne", id, 5), utils.AssertActivity("PlusOne", id, 6), utils.AssertActivity("PlusOne", id, 7), utils.AssertActivity("PlusOne", id, 8), - utils.AssertActivity("PlusOne", id, 9), utils.AssertOrchestratorExecuted("ActivityChain", id, "COMPLETED"), + utils.AssertActivity("PlusOne", id, 9), utils.AssertWorkflowExecuted("ActivityChain", id, "COMPLETED"), ) } func Test_ActivityRetries(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("ActivityRetries", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ActivityRetries", func(ctx *task.WorkflowContext) (any, error) { if err := ctx.CallActivity("FailActivity", task.WithActivityRetryPolicy(&task.RetryPolicy{ MaxAttempts: 3, InitialRetryInterval: 10 * time.Millisecond, @@ -336,10 +336,10 @@ func Test_ActivityRetries(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ActivityRetries") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "ActivityRetries") if assert.NoError(t, err) { - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, metadata.RuntimeStatus) // With 3 max attempts there will be two retries with 10 millis delay before each @@ -350,20 +350,20 @@ func Test_ActivityRetries(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("ActivityRetries", id), + utils.AssertWorkflowCreated("ActivityRetries", id), utils.AssertActivity("FailActivity", id, 0), utils.AssertTimer(id, utils.AssertTaskID(1)), utils.AssertActivity("FailActivity", id, 2), utils.AssertTimer(id, utils.AssertTaskID(3)), utils.AssertActivity("FailActivity", id, 4), - utils.AssertOrchestratorExecuted("ActivityRetries", id, "FAILED"), + utils.AssertWorkflowExecuted("ActivityRetries", id, "FAILED"), ) } func Test_ActivityFanOut(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("ActivityFanOut", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ActivityFanOut", func(ctx *task.WorkflowContext) (any, error) { tasks := []task.Task{} for i := 0; i < 10; i++ { tasks = append(tasks, ctx.CallActivity("ToString", task.WithActivityInput(i))) @@ -394,10 +394,10 @@ func Test_ActivityFanOut(t *testing.T) { client, worker := initTaskHubWorker(ctx, r, backend.WithMaxParallelism(10)) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ActivityFanOut") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "ActivityFanOut") if assert.NoError(t, err) { - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `["9","8","7","6","5","4","3","2","1","0"]`, metadata.Output.Value) @@ -410,26 +410,26 @@ func Test_ActivityFanOut(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("ActivityFanOut", id), + utils.AssertWorkflowCreated("ActivityFanOut", id), // TODO: Find a way to assert an unordered sequence of traces since the order of activity traces is non-deterministic. ) } -func Test_SingleSubOrchestrator_Completed(t *testing.T) { +func Test_SingleChildWorkflow_Completed(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("Parent", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Parent", func(ctx *task.WorkflowContext) (any, error) { var input any if err := ctx.GetInput(&input); err != nil { return nil, err } var output any - err := ctx.CallSubOrchestrator( + err := ctx.CallChildWorkflow( "Child", - task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_child"), - task.WithSubOrchestratorInput(input)).Await(&output) + task.WithChildWorkflowInstanceID(string(ctx.ID)+"_child"), + task.WithChildWorkflowInput(input)).Await(&output) return output, err }) - r.AddOrchestratorN("Child", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Child", func(ctx *task.WorkflowContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { return "", err @@ -442,30 +442,30 @@ func Test_SingleSubOrchestrator_Completed(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - id, err := client.ScheduleNewOrchestration(ctx, "Parent", api.WithInput("Hello, world!")) + id, err := client.ScheduleNewWorkflow(ctx, "Parent", api.WithInput("Hello, world!")) require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `"Hello, world!"`, metadata.Output.Value) spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("Parent", id), - utils.AssertOrchestratorExecuted("Child", id+"_child", "COMPLETED"), - utils.AssertOrchestratorExecuted("Parent", id, "COMPLETED"), + utils.AssertWorkflowCreated("Parent", id), + utils.AssertWorkflowExecuted("Child", id+"_child", "COMPLETED"), + utils.AssertWorkflowExecuted("Parent", id, "COMPLETED"), ) } -func Test_SingleSubOrchestrator_Failed(t *testing.T) { +func Test_SingleChildWorkflow_Failed(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("Parent", func(ctx *task.OrchestrationContext) (any, error) { - err := ctx.CallSubOrchestrator( + r.AddWorkflowN("Parent", func(ctx *task.WorkflowContext) (any, error) { + err := ctx.CallChildWorkflow( "Child", - task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_child")).Await(nil) + task.WithChildWorkflowInstanceID(string(ctx.ID)+"_child")).Await(nil) return nil, err }) - r.AddOrchestratorN("Child", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Child", func(ctx *task.WorkflowContext) (any, error) { return nil, errors.New("Child failed") }) @@ -474,9 +474,9 @@ func Test_SingleSubOrchestrator_Failed(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - id, err := client.ScheduleNewOrchestration(ctx, "Parent") + id, err := client.ScheduleNewWorkflow(ctx, "Parent") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, metadata.RuntimeStatus) if assert.NotNil(t, metadata.FailureDetails) { @@ -485,26 +485,26 @@ func Test_SingleSubOrchestrator_Failed(t *testing.T) { spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("Parent", id), - utils.AssertOrchestratorExecuted("Child", id+"_child", "FAILED"), - utils.AssertOrchestratorExecuted("Parent", id, "FAILED"), + utils.AssertWorkflowCreated("Parent", id), + utils.AssertWorkflowExecuted("Child", id+"_child", "FAILED"), + utils.AssertWorkflowExecuted("Parent", id, "FAILED"), ) } -func Test_SingleSubOrchestrator_Failed_Retries(t *testing.T) { +func Test_SingleChildWorkflow_Failed_Retries(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("Parent", func(ctx *task.OrchestrationContext) (any, error) { - err := ctx.CallSubOrchestrator( + r.AddWorkflowN("Parent", func(ctx *task.WorkflowContext) (any, error) { + err := ctx.CallChildWorkflow( "Child", - task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_child"), - task.WithSubOrchestrationRetryPolicy(&task.RetryPolicy{ + task.WithChildWorkflowInstanceID(string(ctx.ID)+"_child"), + task.WithChildWorkflowRetryPolicy(&task.RetryPolicy{ MaxAttempts: 3, InitialRetryInterval: 10 * time.Millisecond, BackoffCoefficient: 2, })).Await(nil) return nil, err }) - r.AddOrchestratorN("Child", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Child", func(ctx *task.WorkflowContext) (any, error) { return nil, errors.New("Child failed") }) @@ -513,9 +513,9 @@ func Test_SingleSubOrchestrator_Failed_Retries(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - id, err := client.ScheduleNewOrchestration(ctx, "Parent") + id, err := client.ScheduleNewWorkflow(ctx, "Parent") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, metadata.RuntimeStatus) if assert.NotNil(t, metadata.FailureDetails) { @@ -524,20 +524,20 @@ func Test_SingleSubOrchestrator_Failed_Retries(t *testing.T) { spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("Parent", id), - utils.AssertOrchestratorExecuted("Child", id+"_child", "FAILED"), + utils.AssertWorkflowCreated("Parent", id), + utils.AssertWorkflowExecuted("Child", id+"_child", "FAILED"), utils.AssertTimer(id, utils.AssertTaskID(1)), - utils.AssertOrchestratorExecuted("Child", id+"_child", "FAILED"), + utils.AssertWorkflowExecuted("Child", id+"_child", "FAILED"), utils.AssertTimer(id, utils.AssertTaskID(3)), - utils.AssertOrchestratorExecuted("Child", id+"_child", "FAILED"), - utils.AssertOrchestratorExecuted("Parent", id, "FAILED"), + utils.AssertWorkflowExecuted("Child", id+"_child", "FAILED"), + utils.AssertWorkflowExecuted("Parent", id, "FAILED"), ) } func Test_ContinueAsNew(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("ContinueAsNewTest", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ContinueAsNewTest", func(ctx *task.WorkflowContext) (any, error) { var input int32 if err := ctx.GetInput(&input); err != nil { return nil, err @@ -558,10 +558,10 @@ func Test_ContinueAsNew(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ContinueAsNewTest", api.WithInput(0)) + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "ContinueAsNewTest", api.WithInput(0)) if assert.NoError(t, err) { - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) if assert.NoError(t, err) { assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `10`, metadata.Output.Value) @@ -571,25 +571,25 @@ func Test_ContinueAsNew(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("ContinueAsNewTest", id), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertTimer(id), utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), - utils.AssertOrchestratorExecuted("ContinueAsNewTest", id, "COMPLETED"), + utils.AssertWorkflowCreated("ContinueAsNewTest", id), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertTimer(id), utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "CONTINUED_AS_NEW"), + utils.AssertWorkflowExecuted("ContinueAsNewTest", id, "COMPLETED"), ) } func Test_ContinueAsNew_Events(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("ContinueAsNewTest", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ContinueAsNewTest", func(ctx *task.WorkflowContext) (any, error) { var input int32 if err := ctx.GetInput(&input); err != nil { return nil, err @@ -610,14 +610,14 @@ func Test_ContinueAsNew_Events(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ContinueAsNewTest", api.WithInput(0)) + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "ContinueAsNewTest", api.WithInput(0)) require.NoError(t, err) for i := 0; i < 10; i++ { require.NoError(t, client.RaiseEvent(ctx, id, "MyEvent", api.WithEventPayload(false))) } require.NoError(t, client.RaiseEvent(ctx, id, "MyEvent", api.WithEventPayload(true))) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `10`, metadata.Output.Value) @@ -626,7 +626,7 @@ func Test_ContinueAsNew_Events(t *testing.T) { func Test_ExternalEventContention(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("ContinueAsNewTest", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ContinueAsNewTest", func(ctx *task.WorkflowContext) (any, error) { var data int32 if err := ctx.WaitForSingleEvent("MyEventData", 1*time.Second).Await(&data); err != nil && !errors.Is(err, task.ErrTaskCanceled) { return nil, err @@ -650,14 +650,14 @@ func Test_ExternalEventContention(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ContinueAsNewTest") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "ContinueAsNewTest") require.NoError(t, err) // Wait for the timer to elapse timeoutCtx, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() - _, err = client.WaitForOrchestrationCompletion(timeoutCtx, id) + _, err = client.WaitForWorkflowCompletion(timeoutCtx, id) require.ErrorIs(t, err, timeoutCtx.Err()) // Now raise the event, which should queue correctly for the next time @@ -666,18 +666,18 @@ func Test_ExternalEventContention(t *testing.T) { require.NoError(t, client.RaiseEvent(ctx, id, "MyEventSignal", api.WithEventPayload(false))) require.NoError(t, client.RaiseEvent(ctx, id, "MyEventSignal", api.WithEventPayload(true))) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `42`, metadata.Output.Value) } -func Test_ExternalEventOrchestration(t *testing.T) { +func Test_ExternalEventWorkflow(t *testing.T) { const eventCount = 10 // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("ExternalEventOrchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ExternalEventWorkflow", func(ctx *task.WorkflowContext) (any, error) { for i := 0; i < eventCount; i++ { var value int ctx.WaitForSingleEvent("MyEvent", 5*time.Second).Await(&value) @@ -694,8 +694,8 @@ func Test_ExternalEventOrchestration(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ExternalEventOrchestration", api.WithInput(0)) + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "ExternalEventWorkflow", api.WithInput(0)) if assert.NoError(t, err) { for i := 0; i < eventCount; i++ { opts := api.WithEventPayload(i) @@ -705,9 +705,9 @@ func Test_ExternalEventOrchestration(t *testing.T) { timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Second) defer cancel() - metadata, err := client.WaitForOrchestrationCompletion(timeoutCtx, id) + metadata, err := client.WaitForWorkflowCompletion(timeoutCtx, id) require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) } @@ -715,8 +715,8 @@ func Test_ExternalEventOrchestration(t *testing.T) { eventSizeInBytes := 1 spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("ExternalEventOrchestration", id), - utils.AssertOrchestratorExecuted("ExternalEventOrchestration", id, "COMPLETED", utils.AssertSpanEvents( + utils.AssertWorkflowCreated("ExternalEventWorkflow", id), + utils.AssertWorkflowExecuted("ExternalEventWorkflow", id, "COMPLETED", utils.AssertSpanEvents( utils.AssertExternalEvent("MyEvent", eventSizeInBytes), utils.AssertExternalEvent("MyEvent", eventSizeInBytes), utils.AssertExternalEvent("MyEvent", eventSizeInBytes), @@ -734,7 +734,7 @@ func Test_ExternalEventOrchestration(t *testing.T) { func Test_ExternalEventTimeout(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("ExternalEventOrchestrationWithTimeout", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ExternalEventWorkflowWithTimeout", func(ctx *task.WorkflowContext) (any, error) { if err := ctx.WaitForSingleEvent("MyEvent", 2*time.Second).Await(nil); err != nil { return nil, err } @@ -750,8 +750,8 @@ func Test_ExternalEventTimeout(t *testing.T) { // Run two variations, one where we raise the external event and one where we don't (timeout) for _, raiseEvent := range []bool{true, false} { t.Run(fmt.Sprintf("RaiseEvent:%v", raiseEvent), func(t *testing.T) { - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ExternalEventOrchestrationWithTimeout") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "ExternalEventWorkflowWithTimeout") require.NoError(t, err) if raiseEvent { require.NoError(t, client.RaiseEvent(ctx, id, "MyEvent")) @@ -760,23 +760,23 @@ func Test_ExternalEventTimeout(t *testing.T) { timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Second) defer cancel() - metadata, err := client.WaitForOrchestrationCompletion(timeoutCtx, id) + metadata, err := client.WaitForWorkflowCompletion(timeoutCtx, id) require.NoError(t, err) // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() if raiseEvent { - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("ExternalEventOrchestrationWithTimeout", id), - utils.AssertOrchestratorExecuted("ExternalEventOrchestrationWithTimeout", id, "COMPLETED", utils.AssertSpanEvents( + utils.AssertWorkflowCreated("ExternalEventWorkflowWithTimeout", id), + utils.AssertWorkflowExecuted("ExternalEventWorkflowWithTimeout", id, "COMPLETED", utils.AssertSpanEvents( utils.AssertExternalEvent("MyEvent", 0), )), ) } else { - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, metadata.RuntimeStatus) if assert.NotNil(t, metadata.FailureDetails) { // The exact message is not important - just make sure it's something clear @@ -786,10 +786,10 @@ func Test_ExternalEventTimeout(t *testing.T) { } utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("ExternalEventOrchestrationWithTimeout", id), + utils.AssertWorkflowCreated("ExternalEventWorkflowWithTimeout", id), // A timer is used to implement the event timeout utils.AssertTimer(id), - utils.AssertOrchestratorExecuted("ExternalEventOrchestrationWithTimeout", id, "FAILED", utils.AssertSpanEvents()), + utils.AssertWorkflowExecuted("ExternalEventWorkflowWithTimeout", id, "FAILED", utils.AssertSpanEvents()), ) } }) @@ -797,12 +797,12 @@ func Test_ExternalEventTimeout(t *testing.T) { } } -func Test_SuspendResumeOrchestration(t *testing.T) { +func Test_SuspendResumeWorkflow(t *testing.T) { const eventCount = 10 // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("SuspendResumeOrchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SuspendResumeWorkflow", func(ctx *task.WorkflowContext) (any, error) { for i := 0; i < eventCount; i++ { var value int ctx.WaitForSingleEvent("MyEvent", 5*time.Second).Await(&value) @@ -819,49 +819,49 @@ func Test_SuspendResumeOrchestration(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration, which will block waiting for external events - id, err := client.ScheduleNewOrchestration(ctx, "SuspendResumeOrchestration", api.WithInput(0)) + // Run the workflow, which will block waiting for external events + id, err := client.ScheduleNewWorkflow(ctx, "SuspendResumeWorkflow", api.WithInput(0)) require.NoError(t, err) - // Wait for the orchestration to finish starting - _, err = client.WaitForOrchestrationStart(ctx, id) + // Wait for the workflow to finish starting + _, err = client.WaitForWorkflowStart(ctx, id) require.NoError(t, err) - // Suspend the orchestration - require.NoError(t, client.SuspendOrchestration(ctx, id, "")) + // Suspend the workflow + require.NoError(t, client.SuspendWorkflow(ctx, id, "")) - // Raise a bunch of events to the orchestration (they should get buffered but not consumed) + // Raise a bunch of events to the workflow (they should get buffered but not consumed) for i := 0; i < eventCount; i++ { opts := api.WithEventPayload(i) require.NoError(t, client.RaiseEvent(ctx, id, "MyEvent", opts)) } - // Make sure the orchestration *doesn't* complete + // Make sure the workflow *doesn't* complete timeoutCtx, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() - _, err = client.WaitForOrchestrationCompletion(timeoutCtx, id) + _, err = client.WaitForWorkflowCompletion(timeoutCtx, id) require.ErrorIs(t, err, timeoutCtx.Err()) - var metadata *backend.OrchestrationMetadata - metadata, err = client.FetchOrchestrationMetadata(ctx, id) + var metadata *backend.WorkflowMetadata + metadata, err = client.FetchWorkflowMetadata(ctx, id) if assert.NoError(t, err) { - assert.True(t, api.OrchestrationMetadataIsRunning(metadata)) + assert.True(t, api.WorkflowMetadataIsRunning(metadata)) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_SUSPENDED, metadata.RuntimeStatus) } - // Resume the orchestration and wait for it to complete - require.NoError(t, client.ResumeOrchestration(ctx, id, "")) + // Resume the workflow and wait for it to complete + require.NoError(t, client.ResumeWorkflow(ctx, id, "")) timeoutCtx, cancel = context.WithTimeout(ctx, 3*time.Second) defer cancel() - _, err = client.WaitForOrchestrationCompletion(timeoutCtx, id) + _, err = client.WaitForWorkflowCompletion(timeoutCtx, id) require.NoError(t, err) // Validate the exported OTel traces eventSizeInBytes := 1 spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("SuspendResumeOrchestration", id), - utils.AssertOrchestratorExecuted("SuspendResumeOrchestration", id, "COMPLETED", utils.AssertSpanEvents( + utils.AssertWorkflowCreated("SuspendResumeWorkflow", id), + utils.AssertWorkflowExecuted("SuspendResumeWorkflow", id, "COMPLETED", utils.AssertSpanEvents( utils.AssertSuspendedEvent(), utils.AssertExternalEvent("MyEvent", eventSizeInBytes), utils.AssertExternalEvent("MyEvent", eventSizeInBytes), @@ -878,10 +878,10 @@ func Test_SuspendResumeOrchestration(t *testing.T) { ) } -func Test_TerminateOrchestration(t *testing.T) { +func Test_TerminateWorkflow(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("MyOrchestrator", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("MyWorkflow", func(ctx *task.WorkflowContext) (any, error) { ctx.CreateTimer(3 * time.Second).Await(nil) return nil, nil }) @@ -892,36 +892,36 @@ func Test_TerminateOrchestration(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration, which will block waiting for external events - id, err := client.ScheduleNewOrchestration(ctx, "MyOrchestrator") + // Run the workflow, which will block waiting for external events + id, err := client.ScheduleNewWorkflow(ctx, "MyWorkflow") require.NoError(t, err) - // Terminate the orchestration before the timer expires - require.NoError(t, client.TerminateOrchestration(ctx, id, api.WithOutput("You got terminated!"))) + // Terminate the workflow before the timer expires + require.NoError(t, client.TerminateWorkflow(ctx, id, api.WithOutput("You got terminated!"))) - // Wait for the orchestration to complete - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + // Wait for the workflow to complete + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) + assert.True(t, api.WorkflowMetadataIsComplete(metadata)) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED, metadata.RuntimeStatus) require.Equal(t, `"You got terminated!"`, metadata.Output.Value) // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("MyOrchestrator", id), - utils.AssertOrchestratorExecuted("MyOrchestrator", id, "TERMINATED"), + utils.AssertWorkflowCreated("MyWorkflow", id), + utils.AssertWorkflowExecuted("MyWorkflow", id, "TERMINATED"), ) } -func Test_TerminateOrchestration_Recursive(t *testing.T) { +func Test_TerminateWorkflow_Recursive(t *testing.T) { delayTime := 4 * time.Second executedActivity := false r := task.NewTaskRegistry() - r.AddOrchestratorN("Root", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Root", func(ctx *task.WorkflowContext) (any, error) { tasks := []task.Task{} for i := 0; i < 5; i++ { - task := ctx.CallSubOrchestrator("L1", task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_L1_"+strconv.Itoa(i))) + task := ctx.CallChildWorkflow("L1", task.WithChildWorkflowInstanceID(string(ctx.ID)+"_L1_"+strconv.Itoa(i))) tasks = append(tasks, task) } for _, task := range tasks { @@ -929,11 +929,11 @@ func Test_TerminateOrchestration_Recursive(t *testing.T) { } return nil, nil }) - r.AddOrchestratorN("L1", func(ctx *task.OrchestrationContext) (any, error) { - ctx.CallSubOrchestrator("L2", task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_L2")).Await(nil) + r.AddWorkflowN("L1", func(ctx *task.WorkflowContext) (any, error) { + ctx.CallChildWorkflow("L2", task.WithChildWorkflowInstanceID(string(ctx.ID)+"_L2")).Await(nil) return nil, nil }) - r.AddOrchestratorN("L2", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("L2", func(ctx *task.WorkflowContext) (any, error) { ctx.CreateTimer(delayTime).Await(nil) ctx.CallActivity("Fail").Await(nil) return nil, nil @@ -951,21 +951,21 @@ func Test_TerminateOrchestration_Recursive(t *testing.T) { // Test terminating with and without recursion for _, recurse := range []bool{true, false} { t.Run(fmt.Sprintf("Recurse = %v", recurse), func(t *testing.T) { - // Run the orchestration, which will block waiting for external events - id, err := client.ScheduleNewOrchestration(ctx, "Root") + // Run the workflow, which will block waiting for external events + id, err := client.ScheduleNewWorkflow(ctx, "Root") require.NoError(t, err) - // Wait long enough to ensure all orchestrations have started (but not longer than the timer delay) + // Wait long enough to ensure all workflows have started (but not longer than the timer delay) assert.Eventually(t, func() bool { - // List of all orchestrations created - orchestrationIDs := []string{string(id)} + // List of all workflows created + workflowIDs := []string{string(id)} for i := 0; i < 5; i++ { - orchestrationIDs = append(orchestrationIDs, string(id)+"_L1_"+strconv.Itoa(i), string(id)+"_L1_"+strconv.Itoa(i)+"_L2") + workflowIDs = append(workflowIDs, string(id)+"_L1_"+strconv.Itoa(i), string(id)+"_L1_"+strconv.Itoa(i)+"_L2") } - for _, orchID := range orchestrationIDs { - metadata, err := client.FetchOrchestrationMetadata(ctx, api.InstanceID(orchID)) + for _, orchID := range workflowIDs { + metadata, err := client.FetchWorkflowMetadata(ctx, api.InstanceID(orchID)) require.NoError(t, err) - // All orchestrations should be running + // All workflows should be running if metadata.RuntimeStatus != protos.OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING { return false } @@ -973,47 +973,47 @@ func Test_TerminateOrchestration_Recursive(t *testing.T) { return true }, 2*time.Second, 100*time.Millisecond) - // Terminate the root orchestration and mark whether a recursive termination + // Terminate the root workflow and mark whether a recursive termination output := fmt.Sprintf("Recursive termination = %v", recurse) opts := []api.TerminateOptions{api.WithOutput(output), api.WithRecursiveTerminate(recurse)} - require.NoError(t, client.TerminateOrchestration(ctx, id, opts...)) + require.NoError(t, client.TerminateWorkflow(ctx, id, opts...)) - // Wait for the root orchestration to complete and verify its terminated status - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + // Wait for the root workflow to complete and verify its terminated status + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED, metadata.RuntimeStatus) require.Equal(t, fmt.Sprintf("\"%s\"", output), metadata.Output.Value) - // Wait for all L2 suborchestrations to complete + // Wait for all L2 child workflows to complete orchIDs := []string{} for i := 0; i < 5; i++ { orchIDs = append(orchIDs, string(id)+"_L1_"+strconv.Itoa(i)+"_L2") } for _, orchID := range orchIDs { - _, err := client.WaitForOrchestrationCompletion(ctx, api.InstanceID(orchID)) + _, err := client.WaitForWorkflowCompletion(ctx, api.InstanceID(orchID)) require.NoError(t, err) } - // Verify tht none of the L2 suborchestrations executed the activity in case of recursive termination + // Verify tht none of the L2 child workflows executed the activity in case of recursive termination assert.NotEqual(t, recurse, executedActivity) }) } } -func Test_TerminateOrchestration_Recursive_TerminateCompletedSubOrchestration(t *testing.T) { +func Test_TerminateWorkflow_Recursive_TerminateCompletedChildWorkflow(t *testing.T) { delayTime := 4 * time.Second r := task.NewTaskRegistry() - r.AddOrchestratorN("Root", func(ctx *task.OrchestrationContext) (any, error) { - // Create L1 sub-orchestration and wait for it to complete - ctx.CallSubOrchestrator("L1", task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_L1")).Await(nil) + r.AddWorkflowN("Root", func(ctx *task.WorkflowContext) (any, error) { + // Create L1 child workflow and wait for it to complete + ctx.CallChildWorkflow("L1", task.WithChildWorkflowInstanceID(string(ctx.ID)+"_L1")).Await(nil) ctx.CreateTimer(delayTime).Await(nil) return nil, nil }) - r.AddOrchestratorN("L1", func(ctx *task.OrchestrationContext) (any, error) { - // Create L2 sub-orchestration but don't wait for it to complete - ctx.CallSubOrchestrator("L2", task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_L2")) + r.AddWorkflowN("L1", func(ctx *task.WorkflowContext) (any, error) { + // Create L2 child workflow but don't wait for it to complete + ctx.CallChildWorkflow("L2", task.WithChildWorkflowInstanceID(string(ctx.ID)+"_L2")) return nil, nil }) - r.AddOrchestratorN("L2", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("L2", func(ctx *task.WorkflowContext) (any, error) { // Wait for `delayTime` ctx.CreateTimer(delayTime).Await(nil) return nil, nil @@ -1027,25 +1027,25 @@ func Test_TerminateOrchestration_Recursive_TerminateCompletedSubOrchestration(t // Test terminating with and without recursion for _, recurse := range []bool{true, false} { t.Run(fmt.Sprintf("Recurse = %v", recurse), func(t *testing.T) { - // Run the orchestration, which will block waiting for external events - id, err := client.ScheduleNewOrchestration(ctx, "Root") + // Run the workflow, which will block waiting for external events + id, err := client.ScheduleNewWorkflow(ctx, "Root") require.NoError(t, err) - // Wait long enough to ensure that all L1 orchestrations have completed but Root and L2 are still running + // Wait long enough to ensure that all L1 workflows have completed but Root and L2 are still running assert.Eventually(t, func() bool { - // List of all orchestrations created - orchestrationIDs := []string{string(id), string(id) + "_L1", string(id) + "_L1_L2"} - for _, orchID := range orchestrationIDs { - // Fetch orchestration metadata - metadata, err := client.FetchOrchestrationMetadata(ctx, api.InstanceID(orchID)) + // List of all workflows created + workflowIDs := []string{string(id), string(id) + "_L1", string(id) + "_L1_L2"} + for _, orchID := range workflowIDs { + // Fetch workflow metadata + metadata, err := client.FetchWorkflowMetadata(ctx, api.InstanceID(orchID)) require.NoError(t, err) if orchID == string(id)+"_L1" { - // L1 orchestration should have completed + // L1 workflow should have completed if metadata.RuntimeStatus != protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED { return false } } else { - // Root and L2 orchestrations should still be running + // Root and L2 workflows should still be running if metadata.RuntimeStatus != protos.OrchestrationStatus_ORCHESTRATION_STATUS_RUNNING { return false } @@ -1054,45 +1054,45 @@ func Test_TerminateOrchestration_Recursive_TerminateCompletedSubOrchestration(t return true }, 2*time.Second, 100*time.Millisecond) - // Terminate the root orchestration and mark whether a recursive termination + // Terminate the root workflow and mark whether a recursive termination output := fmt.Sprintf("Recursive termination = %v", recurse) opts := []api.TerminateOptions{api.WithOutput(output), api.WithRecursiveTerminate(recurse)} - require.NoError(t, client.TerminateOrchestration(ctx, id, opts...)) + require.NoError(t, client.TerminateWorkflow(ctx, id, opts...)) - // Wait for the root orchestration to complete and verify its terminated status - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + // Wait for the root workflow to complete and verify its terminated status + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED, metadata.RuntimeStatus) require.Equal(t, fmt.Sprintf("\"%s\"", output), metadata.Output.Value) - // Verify that the L1 and L2 orchestrations have completed with the appropriate status - L1_OrchestrationStatus := protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED - L2_OrchestrationStatus := protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED + // Verify that the L1 and L2 workflows have completed with the appropriate status + L1_WorkflowStatus := protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED + L2_WorkflowStatus := protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED L2_Output := "" L1_Output := "" if recurse { - L2_OrchestrationStatus = protos.OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED + L2_WorkflowStatus = protos.OrchestrationStatus_ORCHESTRATION_STATUS_TERMINATED L2_Output = fmt.Sprintf("\"%s\"", output) } - // In recursive case, L1 orchestration is not terminated because it was already completed when the root orchestration was terminated - metadata, err = client.WaitForOrchestrationCompletion(ctx, id+"_L1") + // In recursive case, L1 workflow is not terminated because it was already completed when the root workflow was terminated + metadata, err = client.WaitForWorkflowCompletion(ctx, id+"_L1") require.NoError(t, err) - require.Equal(t, L1_OrchestrationStatus, metadata.RuntimeStatus) + require.Equal(t, L1_WorkflowStatus, metadata.RuntimeStatus) require.Equal(t, L1_Output, metadata.Output.Value) - // In recursive case, L2 is terminated because it was still running when the root orchestration was terminated - metadata, err = client.WaitForOrchestrationCompletion(ctx, id+"_L1_L2") + // In recursive case, L2 is terminated because it was still running when the root workflow was terminated + metadata, err = client.WaitForWorkflowCompletion(ctx, id+"_L1_L2") require.NoError(t, err) - require.Equal(t, L2_OrchestrationStatus, metadata.RuntimeStatus) + require.Equal(t, L2_WorkflowStatus, metadata.RuntimeStatus) require.Equal(t, L2_Output, metadata.Output.Value) }) } } -func Test_PurgeCompletedOrchestration(t *testing.T) { +func Test_PurgeCompletedWorkflow(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("ExternalEventOrchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("ExternalEventWorkflow", func(ctx *task.WorkflowContext) (any, error) { if err := ctx.WaitForSingleEvent("MyEvent", 30*time.Second).Await(nil); err != nil { return nil, err } @@ -1104,56 +1104,56 @@ func Test_PurgeCompletedOrchestration(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "ExternalEventOrchestration") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "ExternalEventWorkflow") if !assert.NoError(t, err) { return } - if _, err = client.WaitForOrchestrationStart(ctx, id); !assert.NoError(t, err) { + if _, err = client.WaitForWorkflowStart(ctx, id); !assert.NoError(t, err) { return } - // Try to purge the orchestration state before it completes and verify that it fails with ErrNotCompleted - if err = client.PurgeOrchestrationState(ctx, id); !assert.ErrorIs(t, err, api.ErrNotCompleted) { + // Try to purge the workflow state before it completes and verify that it fails with ErrNotCompleted + if err = client.PurgeWorkflowState(ctx, id); !assert.ErrorIs(t, err, api.ErrNotCompleted) { return } - // Raise an event to the orchestration so that it can complete + // Raise an event to the workflow so that it can complete if err = client.RaiseEvent(ctx, id, "MyEvent"); !assert.NoError(t, err) { return } - if _, err = client.WaitForOrchestrationCompletion(ctx, id); !assert.NoError(t, err) { + if _, err = client.WaitForWorkflowCompletion(ctx, id); !assert.NoError(t, err) { return } - // Try to purge the orchestration state again and verify that it succeeds - if err = client.PurgeOrchestrationState(ctx, id); !assert.NoError(t, err) { + // Try to purge the workflow state again and verify that it succeeds + if err = client.PurgeWorkflowState(ctx, id); !assert.NoError(t, err) { return } - // Try to fetch the orchestration metadata and verify that it fails with ErrInstanceNotFound - if _, err = client.FetchOrchestrationMetadata(ctx, id); !assert.ErrorIs(t, err, api.ErrInstanceNotFound) { + // Try to fetch the workflow metadata and verify that it fails with ErrInstanceNotFound + if _, err = client.FetchWorkflowMetadata(ctx, id); !assert.ErrorIs(t, err, api.ErrInstanceNotFound) { return } // Try to purge again and verify that it also fails with ErrInstanceNotFound - if err = client.PurgeOrchestrationState(ctx, id); !assert.ErrorIs(t, err, api.ErrInstanceNotFound) { + if err = client.PurgeWorkflowState(ctx, id); !assert.ErrorIs(t, err, api.ErrInstanceNotFound) { return } } -func Test_PurgeOrchestration_Recursive(t *testing.T) { +func Test_PurgeWorkflow_Recursive(t *testing.T) { delayTime := 4 * time.Second r := task.NewTaskRegistry() - r.AddOrchestratorN("Root", func(ctx *task.OrchestrationContext) (any, error) { - ctx.CallSubOrchestrator("L1", task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_L1")).Await(nil) + r.AddWorkflowN("Root", func(ctx *task.WorkflowContext) (any, error) { + ctx.CallChildWorkflow("L1", task.WithChildWorkflowInstanceID(string(ctx.ID)+"_L1")).Await(nil) return nil, nil }) - r.AddOrchestratorN("L1", func(ctx *task.OrchestrationContext) (any, error) { - ctx.CallSubOrchestrator("L2", task.WithSubOrchestrationInstanceID(string(ctx.ID)+"_L2")).Await(nil) + r.AddWorkflowN("L1", func(ctx *task.WorkflowContext) (any, error) { + ctx.CallChildWorkflow("L2", task.WithChildWorkflowInstanceID(string(ctx.ID)+"_L2")).Await(nil) return nil, nil }) - r.AddOrchestratorN("L2", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("L2", func(ctx *task.WorkflowContext) (any, error) { ctx.CreateTimer(delayTime).Await(nil) return nil, nil }) @@ -1166,37 +1166,37 @@ func Test_PurgeOrchestration_Recursive(t *testing.T) { // Test terminating with and without recursion for _, recurse := range []bool{true, false} { t.Run(fmt.Sprintf("Recurse = %v", recurse), func(t *testing.T) { - // Run the orchestration, which will block waiting for external events - id, err := client.ScheduleNewOrchestration(ctx, "Root") + // Run the workflow, which will block waiting for external events + id, err := client.ScheduleNewWorkflow(ctx, "Root") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) - // Purge the root orchestration + // Purge the root workflow opts := []api.PurgeOptions{api.WithRecursivePurge(recurse)} - err = client.PurgeOrchestrationState(ctx, id, opts...) + err = client.PurgeWorkflowState(ctx, id, opts...) assert.NoError(t, err) - // Verify that root Orchestration has been purged - _, err = client.FetchOrchestrationMetadata(ctx, id) + // Verify that root Workflow has been purged + _, err = client.FetchWorkflowMetadata(ctx, id) assert.ErrorIs(t, err, api.ErrInstanceNotFound) if recurse { - // Verify that L1 and L2 orchestrations have been purged - _, err = client.FetchOrchestrationMetadata(ctx, id+"_L1") + // Verify that L1 and L2 workflows have been purged + _, err = client.FetchWorkflowMetadata(ctx, id+"_L1") assert.ErrorIs(t, err, api.ErrInstanceNotFound) - _, err = client.FetchOrchestrationMetadata(ctx, id+"_L1_L2") + _, err = client.FetchWorkflowMetadata(ctx, id+"_L1_L2") assert.ErrorIs(t, err, api.ErrInstanceNotFound) } else { - // Verify that L1 and L2 orchestrations are not purged - metadata, err = client.FetchOrchestrationMetadata(ctx, id+"_L1") + // Verify that L1 and L2 workflows are not purged + metadata, err = client.FetchWorkflowMetadata(ctx, id+"_L1") assert.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) - _, err = client.FetchOrchestrationMetadata(ctx, id+"_L1_L2") + _, err = client.FetchWorkflowMetadata(ctx, id+"_L1_L2") assert.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) } @@ -1204,12 +1204,12 @@ func Test_PurgeOrchestration_Recursive(t *testing.T) { } } -func Test_RecreateCompletedOrchestration(t *testing.T) { +func Test_RecreateCompletedWorkflow(t *testing.T) { t.Skip("Not yet supported. Needs https://github.com/dapr/durabletask-go/issues/42") // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("HelloOrchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("HelloWorkflow", func(ctx *task.WorkflowContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { return nil, err @@ -1232,20 +1232,20 @@ func Test_RecreateCompletedOrchestration(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the first orchestration - id, err := client.ScheduleNewOrchestration(ctx, "HelloOrchestration", api.WithInput("世界")) + // Run the first workflow + id, err := client.ScheduleNewWorkflow(ctx, "HelloWorkflow", api.WithInput("世界")) require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `"Hello, 世界!"`, metadata.Output.Value) - // Run the second orchestration with the same ID as the first + // Run the second workflow with the same ID as the first var newID api.InstanceID - newID, err = client.ScheduleNewOrchestration(ctx, "HelloOrchestration", api.WithInstanceID(id), api.WithInput("World")) + newID, err = client.ScheduleNewWorkflow(ctx, "HelloWorkflow", api.WithInstanceID(id), api.WithInput("World")) require.NoError(t, err) require.Equal(t, id, newID) - metadata, err = client.WaitForOrchestrationCompletion(ctx, id) + metadata, err = client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, `"Hello, World!"`, metadata.Output.Value) @@ -1253,121 +1253,19 @@ func Test_RecreateCompletedOrchestration(t *testing.T) { // Validate the exported OTel traces spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("SingleActivity", id), + utils.AssertWorkflowCreated("SingleActivity", id), utils.AssertActivity("SayHello", id, 0), - utils.AssertOrchestratorExecuted("SingleActivity", id, "COMPLETED"), - utils.AssertOrchestratorCreated("SingleActivity", id), + utils.AssertWorkflowExecuted("SingleActivity", id, "COMPLETED"), + utils.AssertWorkflowCreated("SingleActivity", id), utils.AssertActivity("SayHello", id, 0), - utils.AssertOrchestratorExecuted("SingleActivity", id, "COMPLETED"), + utils.AssertWorkflowExecuted("SingleActivity", id, "COMPLETED"), ) } -func Test_SingleActivity_ReuseInstanceIDIgnore(t *testing.T) { - // Registration - r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity", func(ctx *task.OrchestrationContext) (any, error) { - var input string - if err := ctx.GetInput(&input); err != nil { - return nil, err - } - var output string - err := ctx.CallActivity("SayHello", task.WithActivityInput(input)).Await(&output) - return output, err - }) - r.AddActivityN("SayHello", func(ctx task.ActivityContext) (any, error) { - var name string - if err := ctx.GetInput(&name); err != nil { - return nil, err - } - return fmt.Sprintf("Hello, %s!", name), nil - }) - - // Initialization - ctx := context.Background() - client, worker := initTaskHubWorker(ctx, r) - defer worker.Shutdown(ctx) - - instanceID := api.InstanceID("IGNORE_IF_RUNNING_OR_COMPLETED") - reuseIdPolicy := &api.OrchestrationIdReusePolicy{ - Action: api.REUSE_ID_ACTION_IGNORE, - OperationStatus: []api.OrchestrationStatus{api.RUNTIME_STATUS_RUNNING, api.RUNTIME_STATUS_COMPLETED, api.RUNTIME_STATUS_PENDING}, - } - - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("世界"), api.WithInstanceID(instanceID)) - require.NoError(t, err) - // wait orchestration to start - client.WaitForOrchestrationStart(ctx, id) - pivotTime := time.Now() - // schedule again, it should ignore creating the new orchestration - id, err = client.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id), api.WithOrchestrationIdReusePolicy(reuseIdPolicy)) - require.NoError(t, err) - timeoutCtx, cancelTimeout := context.WithTimeout(ctx, 30*time.Second) - defer cancelTimeout() - metadata, err := client.WaitForOrchestrationCompletion(timeoutCtx, id) - require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) - // the first orchestration should complete as the second one is ignored - assert.Equal(t, `"Hello, 世界!"`, metadata.Output.Value) - // assert the orchestration created timestamp - assert.True(t, pivotTime.After(metadata.CreatedAt.AsTime())) -} - -func Test_SingleActivity_ReuseInstanceIDTerminate(t *testing.T) { - // Registration - r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity", func(ctx *task.OrchestrationContext) (any, error) { - var input string - if err := ctx.GetInput(&input); err != nil { - return nil, err - } - var output string - err := ctx.CallActivity("SayHello", task.WithActivityInput(input)).Await(&output) - return output, err - }) - r.AddActivityN("SayHello", func(ctx task.ActivityContext) (any, error) { - var name string - if err := ctx.GetInput(&name); err != nil { - return nil, err - } - return fmt.Sprintf("Hello, %s!", name), nil - }) - - // Initialization - ctx := context.Background() - client, worker := initTaskHubWorker(ctx, r) - defer worker.Shutdown(ctx) - - instanceID := api.InstanceID("TERMINATE_IF_RUNNING_OR_COMPLETED") - reuseIdPolicy := &api.OrchestrationIdReusePolicy{ - Action: api.REUSE_ID_ACTION_TERMINATE, - OperationStatus: []api.OrchestrationStatus{api.RUNTIME_STATUS_RUNNING, api.RUNTIME_STATUS_COMPLETED, api.RUNTIME_STATUS_PENDING}, - } - - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("世界"), api.WithInstanceID(instanceID)) - require.NoError(t, err) - // wait orchestration to start - client.WaitForOrchestrationStart(ctx, id) - pivotTime := time.Now() - // schedule again, it should terminate the first orchestration and start a new one - id, err = client.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id), api.WithOrchestrationIdReusePolicy(reuseIdPolicy)) - require.NoError(t, err) - timeoutCtx, cancelTimeout := context.WithTimeout(ctx, 30*time.Second) - defer cancelTimeout() - metadata, err := client.WaitForOrchestrationCompletion(timeoutCtx, id) - require.NoError(t, err) - assert.True(t, api.OrchestrationMetadataIsComplete(metadata)) - // the second orchestration should complete. - assert.Equal(t, `"Hello, World!"`, metadata.Output.Value) - // assert the orchestration created timestamp - assert.True(t, pivotTime.Before(metadata.CreatedAt.AsTime())) -} - func Test_SingleActivity_ReuseInstanceIDError(t *testing.T) { // Registration r := task.NewTaskRegistry() - r.AddOrchestratorN("SingleActivity", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SingleActivity", func(ctx *task.WorkflowContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { return nil, err @@ -1391,12 +1289,12 @@ func Test_SingleActivity_ReuseInstanceIDError(t *testing.T) { instanceID := api.InstanceID("ERROR_IF_RUNNING_OR_COMPLETED") - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("世界"), api.WithInstanceID(instanceID)) + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "SingleActivity", api.WithInput("世界"), api.WithInstanceID(instanceID)) require.NoError(t, err) - id, err = client.ScheduleNewOrchestration(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id)) + id, err = client.ScheduleNewWorkflow(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id)) if assert.Error(t, err) { - assert.Contains(t, err.Error(), "orchestration instance already exists") + assert.Contains(t, err.Error(), "workflow instance already exists") } } @@ -1404,7 +1302,7 @@ func Test_TaskExecutionId(t *testing.T) { t.Run("SingleActivityWithRetry", func(t *testing.T) { // Registration r := task.NewTaskRegistry() - require.NoError(t, r.AddOrchestratorN("TaskExecutionID", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("TaskExecutionID", func(ctx *task.WorkflowContext) (any, error) { if err := ctx.CallActivity("FailActivity", task.WithActivityRetryPolicy(&task.RetryPolicy{ MaxAttempts: 3, InitialRetryInterval: 10 * time.Millisecond, @@ -1431,11 +1329,11 @@ func Test_TaskExecutionId(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "TaskExecutionID") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "TaskExecutionID") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) @@ -1449,7 +1347,7 @@ func Test_TaskExecutionId(t *testing.T) { t.Run("ParallelActivityWithRetry", func(t *testing.T) { // Registration r := task.NewTaskRegistry() - require.NoError(t, r.AddOrchestratorN("TaskExecutionID", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("TaskExecutionID", func(ctx *task.WorkflowContext) (any, error) { t1 := ctx.CallActivity("FailActivity", task.WithActivityRetryPolicy(&task.RetryPolicy{ MaxAttempts: 3, InitialRetryInterval: 10 * time.Millisecond, @@ -1492,11 +1390,11 @@ func Test_TaskExecutionId(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "TaskExecutionID") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "TaskExecutionID") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) @@ -1514,7 +1412,7 @@ func Test_TaskExecutionId(t *testing.T) { t.Run("SingleActivityWithNoRetry", func(t *testing.T) { // Registration r := task.NewTaskRegistry() - require.NoError(t, r.AddOrchestratorN("TaskExecutionID", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("TaskExecutionID", func(ctx *task.WorkflowContext) (any, error) { if err := ctx.CallActivity("Activity").Await(nil); err != nil { return nil, err } @@ -1533,11 +1431,11 @@ func Test_TaskExecutionId(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "TaskExecutionID") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "TaskExecutionID") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) @@ -1550,7 +1448,7 @@ func Test_ActivityTraceContext(t *testing.T) { t.Run("TraceContext is propagated in the activity context", func(t *testing.T) { // Registration r := task.NewTaskRegistry() - require.NoError(t, r.AddOrchestratorN("TraceContextOrchestration", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("TraceContextWorkflow", func(ctx *task.WorkflowContext) (any, error) { if err := ctx.CallActivity("ActivityWithContext", task.WithActivityRetryPolicy(&task.RetryPolicy{ MaxAttempts: 3, InitialRetryInterval: 10 * time.Millisecond, @@ -1590,11 +1488,11 @@ func Test_ActivityTraceContext(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "TraceContextOrchestration") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "TraceContextWorkflow") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) assert.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) @@ -1604,19 +1502,19 @@ func Test_ActivityTraceContext(t *testing.T) { // Validate the exported OTel traces include patch spans spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("TraceContextOrchestration", id), + utils.AssertWorkflowCreated("TraceContextWorkflow", id), utils.AssertSpan("ActivityWith1Context"), utils.AssertActivity("ActivityWithContext", id, 0), - utils.AssertOrchestratorExecuted("TraceContextOrchestration", id, "COMPLETED"), + utils.AssertWorkflowExecuted("TraceContextWorkflow", id, "COMPLETED"), ) }) } -func Test_OrchestrationPatching_DefaultToPatched(t *testing.T) { +func Test_WorkflowPatching_DefaultToPatched(t *testing.T) { // Registration r := task.NewTaskRegistry() patchesFound := []bool{} - require.NoError(t, r.AddOrchestratorN("Orchestrator", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("Workflow", func(ctx *task.WorkflowContext) (any, error) { patchesFound = append(patchesFound, ctx.IsPatched("patch1")) return nil, nil })) @@ -1626,21 +1524,21 @@ func Test_OrchestrationPatching_DefaultToPatched(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "Orchestrator") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "Workflow") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, []bool{true}, patchesFound) } -func Test_OrchestrationPatching_RunUnpatchedVersion(t *testing.T) { +func Test_WorkflowPatching_RunUnpatchedVersion(t *testing.T) { // Registration r := task.NewTaskRegistry() runNumber := atomic.Uint32{} patchesFound := []bool{} - require.NoError(t, r.AddOrchestratorN("Orchestrator", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("Workflow", func(ctx *task.WorkflowContext) (any, error) { currentRun := runNumber.Add(1) // Simulate a version upgrade across runs, first run supports version 1 and 2, following runs support version 1, 2 and 3 // It's expected to respect first run, and receive version 2 in the second run. @@ -1661,23 +1559,23 @@ func Test_OrchestrationPatching_RunUnpatchedVersion(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "Orchestrator") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "Workflow") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, uint32(2), runNumber.Load()) assert.Equal(t, []bool{false}, patchesFound) } -func Test_OrchestrationPatching_MultiplePatches(t *testing.T) { +func Test_WorkflowPatching_MultiplePatches(t *testing.T) { // Registration r := task.NewTaskRegistry() runNumber := atomic.Uint32{} patches1Found := []bool{} patches2Found := []bool{} - require.NoError(t, r.AddOrchestratorN("Orchestrator", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("Workflow", func(ctx *task.WorkflowContext) (any, error) { currentRun := runNumber.Add(1) if currentRun > 1 { patches1Found = append(patches1Found, ctx.IsPatched("patch1")) @@ -1698,10 +1596,10 @@ func Test_OrchestrationPatching_MultiplePatches(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "Orchestrator") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "Workflow") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, uint32(3), runNumber.Load()) @@ -1709,13 +1607,13 @@ func Test_OrchestrationPatching_MultiplePatches(t *testing.T) { assert.Equal(t, []bool{true, true}, patches2Found) } -func Test_OrchestrationPatching_ContinueAsNewDoNotCarryOverChoices(t *testing.T) { +func Test_WorkflowPatching_ContinueAsNewDoNotCarryOverChoices(t *testing.T) { // Registration r := task.NewTaskRegistry() patchesFound := []bool{} ranContinueAsNew := false runNumber := atomic.Uint32{} - require.NoError(t, r.AddOrchestratorN("Orchestrator", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("Workflow", func(ctx *task.WorkflowContext) (any, error) { currentRun := runNumber.Add(1) // The patch is checked from the 2nd rerun, so it should be false for the in-flight run, but true for the continue-as-new run. if currentRun > 1 { @@ -1738,23 +1636,23 @@ func Test_OrchestrationPatching_ContinueAsNewDoNotCarryOverChoices(t *testing.T) client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - // Run the orchestration - id, err := client.ScheduleNewOrchestration(ctx, "Orchestrator") + // Run the workflow + id, err := client.ScheduleNewWorkflow(ctx, "Workflow") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) assert.Equal(t, []bool{false, true, true}, patchesFound) } -func Test_OrchestrationPatching_PatchPersistsAcrossReplays(t *testing.T) { +func Test_WorkflowPatching_PatchPersistsAcrossReplays(t *testing.T) { // This test verifies that once a patch is enabled, it remains enabled // across multiple activity completions (replays). r := task.NewTaskRegistry() runNumber := atomic.Uint32{} patchResults := []bool{} - require.NoError(t, r.AddOrchestratorN("Orchestrator", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("Workflow", func(ctx *task.WorkflowContext) (any, error) { runNumber.Add(1) // First activity - patch should be enabled (at end of history) @@ -1780,13 +1678,13 @@ func Test_OrchestrationPatching_PatchPersistsAcrossReplays(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - id, err := client.ScheduleNewOrchestration(ctx, "Orchestrator") + id, err := client.ScheduleNewWorkflow(ctx, "Workflow") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) - // Orchestrator runs 4 times: initial + 3 activity completions + // Workflow runs 4 times: initial + 3 activity completions assert.Equal(t, uint32(4), runNumber.Load()) // All patch checks should return true (first time enabled, subsequent times from history) // Run 1: [true] - first check at end of history @@ -1800,12 +1698,12 @@ func Test_OrchestrationPatching_PatchPersistsAcrossReplays(t *testing.T) { } } -func Test_OrchestrationPatching_PatchRemembersToStayFalse(t *testing.T) { +func Test_WorkflowPatching_PatchRemembersToStayFalse(t *testing.T) { r := task.NewTaskRegistry() runNumber := atomic.Uint32{} patchResults := []bool{} - require.NoError(t, r.AddOrchestratorN("Orchestrator", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("Workflow", func(ctx *task.WorkflowContext) (any, error) { currentRun := runNumber.Add(1) // Simulate code upgrade: patch check is only present from run 2 onwards @@ -1833,9 +1731,9 @@ func Test_OrchestrationPatching_PatchRemembersToStayFalse(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - id, err := client.ScheduleNewOrchestration(ctx, "Orchestrator") + id, err := client.ScheduleNewWorkflow(ctx, "Workflow") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) @@ -1846,10 +1744,10 @@ func Test_OrchestrationPatching_PatchRemembersToStayFalse(t *testing.T) { assert.False(t, patchResults[1]) } -func Test_OrchestrationPatching_TracingSpans(t *testing.T) { +func Test_WorkflowPatching_TracingSpans(t *testing.T) { // This test verifies that patch checks generate distributed tracing spans. r := task.NewTaskRegistry() - require.NoError(t, r.AddOrchestratorN("PatchTracingOrchestrator", func(ctx *task.OrchestrationContext) (any, error) { + require.NoError(t, r.AddWorkflowN("PatchTracingWorkflow", func(ctx *task.WorkflowContext) (any, error) { ctx.IsPatched("patch1") if err := ctx.CallActivity("SayHello").Await(nil); err != nil { return nil, err @@ -1871,19 +1769,19 @@ func Test_OrchestrationPatching_TracingSpans(t *testing.T) { client, worker := initTaskHubWorker(ctx, r) defer worker.Shutdown(ctx) - id, err := client.ScheduleNewOrchestration(ctx, "PatchTracingOrchestrator") + id, err := client.ScheduleNewWorkflow(ctx, "PatchTracingWorkflow") require.NoError(t, err) - metadata, err := client.WaitForOrchestrationCompletion(ctx, id) + metadata, err := client.WaitForWorkflowCompletion(ctx, id) require.NoError(t, err) require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, metadata.RuntimeStatus) // Validate the exported OTel traces include patch spans spans := exporter.GetSpans().Snapshots() utils.AssertSpanSequence(t, spans, - utils.AssertOrchestratorCreated("PatchTracingOrchestrator", id), + utils.AssertWorkflowCreated("PatchTracingWorkflow", id), utils.AssertActivity("SayHello", id, 0), utils.AssertActivity("SayHello", id, 1), - utils.AssertOrchestratorExecuted("PatchTracingOrchestrator", id, "COMPLETED", + utils.AssertWorkflowExecuted("PatchTracingWorkflow", id, "COMPLETED", utils.AssertSpanStringSliceAttribute("applied_patches", []string{"patch1", "patch2", "patch3"}), ), ) @@ -1894,14 +1792,14 @@ func initTaskHubWorker(ctx context.Context, r *task.TaskRegistry, opts ...backen logger := backend.DefaultLogger() be := sqlite.NewSqliteBackend(sqlite.NewSqliteOptions(""), logger) executor := task.NewTaskExecutor(r) - orchestrationWorker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + workflowWorker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: executor, Logger: logger, AppID: "testapp", }, opts...) activityWorker := backend.NewActivityTaskWorker(be, executor, logger, opts...) - taskHubWorker := backend.NewTaskHubWorker(be, orchestrationWorker, activityWorker, logger) + taskHubWorker := backend.NewTaskHubWorker(be, workflowWorker, activityWorker, logger) if err := taskHubWorker.Start(ctx); err != nil { panic(err) } diff --git a/tests/runtimestate_test.go b/tests/runtimestate_test.go index 17851089..0968865c 100644 --- a/tests/runtimestate_test.go +++ b/tests/runtimestate_test.go @@ -14,9 +14,9 @@ import ( ) // Verifies runtime state created from an ExecutionStarted event -func Test_NewOrchestration(t *testing.T) { +func Test_NewWorkflow(t *testing.T) { const iid = "abc" - const expectedName = "myorchestration" + const expectedName = "myworkflow" createdAt := time.Now().UTC() e := &protos.HistoryEvent{ @@ -58,9 +58,9 @@ func Test_NewOrchestration(t *testing.T) { assert.Equal(t, 0, len(s.NewEvents)) } -func Test_CompletedOrchestration(t *testing.T) { +func Test_CompletedWorkflow(t *testing.T) { const iid = "abc" - const expectedName = "myorchestration" + const expectedName = "myworkflow" createdAt := time.Now().UTC() completedAt := createdAt.Add(10 * time.Second) @@ -107,7 +107,7 @@ func Test_CompletedOrchestration(t *testing.T) { assert.Equal(t, 0, len(s.NewEvents)) } -func Test_CompletedSubOrchestration(t *testing.T) { +func Test_CompletedChildWorkflow(t *testing.T) { expectedOutput := "\"done!\"" expectedTaskID := int32(3) @@ -174,7 +174,7 @@ func Test_CompletedSubOrchestration(t *testing.T) { func Test_RuntimeState_ContinueAsNew(t *testing.T) { iid := "abc" - expectedName := "MyOrchestration" + expectedName := "MyWorkflow" continueAsNewInput := "\"done!\"" expectedTaskID := int32(3) eventName := "MyRaisedEvent" @@ -259,7 +259,7 @@ func Test_CreateTimer(t *testing.T) { Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "MyOrchestration", + Name: "MyWorkflow", WorkflowInstance: &protos.WorkflowInstance{ InstanceId: iid, ExecutionId: wrapperspb.String(uuid.New().String()), @@ -321,7 +321,7 @@ func Test_ScheduleTask(t *testing.T) { Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "MyOrchestration", + Name: "MyWorkflow", WorkflowInstance: &protos.WorkflowInstance{ InstanceId: iid, ExecutionId: wrapperspb.String(uuid.New().String()), @@ -372,11 +372,11 @@ func Test_ScheduleTask(t *testing.T) { } } -func Test_CreateSubOrchestration(t *testing.T) { +func Test_CreateChildWorkflow(t *testing.T) { iid := "abc" expectedTaskID := int32(4) expectedInstanceID := "xyz" - expectedName := "MySubOrchestration" + expectedName := "MyChildWorkflow" expectedInput := wrapperspb.String("{\"Foo\":5}") expectedTraceParent := "trace" expectedTraceState := "trace_state" @@ -465,7 +465,7 @@ func Test_SendEvent(t *testing.T) { Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "MyOrchestration", + Name: "MyWorkflow", WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "abc", ExecutionId: wrapperspb.String(uuid.New().String()), @@ -520,7 +520,7 @@ func Test_StateIsValid(t *testing.T) { Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "MyOrchestration", + Name: "MyWorkflow", WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "abc", ExecutionId: wrapperspb.String(uuid.New().String()), @@ -551,7 +551,7 @@ func Test_DuplicateEvents(t *testing.T) { Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "MyOrchestration", + Name: "MyWorkflow", WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "abc", ExecutionId: wrapperspb.String(uuid.New().String()), @@ -565,7 +565,7 @@ func Test_DuplicateEvents(t *testing.T) { Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "MyOrchestration", + Name: "MyWorkflow", WorkflowInstance: &protos.WorkflowInstance{ InstanceId: "abc", ExecutionId: wrapperspb.String(uuid.New().String()), @@ -578,7 +578,7 @@ func Test_DuplicateEvents(t *testing.T) { return } - // TODO: Add other types of duplicate events (task completion, external events, sub-orchestration, etc.) + // TODO: Add other types of duplicate events (task completion, external events, child workflow, etc.) err = runtimestate.AddEvent(s, &protos.HistoryEvent{ EventId: -1, Timestamp: timestamppb.Now(), diff --git a/tests/task_executor_test.go b/tests/task_executor_test.go index d2be25d4..8cf77484 100644 --- a/tests/task_executor_test.go +++ b/tests/task_executor_test.go @@ -1,4 +1,4 @@ -// This file contains tests for the task executor, which is used only for orchestrations authored in Go. +// This file contains tests for the task executor, which is used only for workflows authored in Go. package tests import ( @@ -18,7 +18,7 @@ import ( func Test_Executor_WaitForEventSchedulesTimer(t *testing.T) { timerDuration := 5 * time.Second r := task.NewTaskRegistry() - r.AddOrchestratorN("Orchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Workflow", func(ctx *task.WorkflowContext) (any, error) { var value int ctx.WaitForSingleEvent("MyEvent", timerDuration).Await(&value) return value, nil @@ -40,7 +40,7 @@ func Test_Executor_WaitForEventSchedulesTimer(t *testing.T) { Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "Orchestration", + Name: "Workflow", WorkflowInstance: &protos.WorkflowInstance{ InstanceId: string(iid), ExecutionId: wrapperspb.String(uuid.New().String()), @@ -50,9 +50,9 @@ func Test_Executor_WaitForEventSchedulesTimer(t *testing.T) { }, } - // Execute the orchestrator function and expect to get back a single timer action + // Execute the workflow function and expect to get back a single timer action executor := task.NewTaskExecutor(r) - results, err := executor.ExecuteOrchestrator(ctx, iid, oldEvents, newEvents) + results, err := executor.ExecuteWorkflow(ctx, iid, oldEvents, newEvents) require.NoError(t, err) require.Equal(t, 1, len(results.Actions), "Expected a single action to be scheduled") createTimerAction := results.Actions[0].GetCreateTimer() @@ -61,13 +61,13 @@ func Test_Executor_WaitForEventSchedulesTimer(t *testing.T) { require.Equal(t, "MyEvent", createTimerAction.GetName()) } -// This is a regression test for an issue where suspended orchestrations would continue to return +// This is a regression test for an issue where suspended workflows would continue to return // actions prior to being resumed. In this case, the `WaitForSingleEvent` action would continue -// return a timer action even after the orchestration was suspended, which is not correct. -// The correct behavior is that a suspended orchestration should not return any actions. +// return a timer action even after the workflow was suspended, which is not correct. +// The correct behavior is that a suspended workflow should not return any actions. func Test_Executor_SuspendStopsAllActions(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("SuspendResumeOrchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("SuspendResumeWorkflow", func(ctx *task.WorkflowContext) (any, error) { var value int ctx.WaitForSingleEvent("MyEvent", 5*time.Second).Await(&value) return value, nil @@ -89,7 +89,7 @@ func Test_Executor_SuspendStopsAllActions(t *testing.T) { Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "SuspendResumeOrchestration", + Name: "SuspendResumeWorkflow", WorkflowInstance: &protos.WorkflowInstance{ InstanceId: string(iid), ExecutionId: wrapperspb.String(uuid.New().String()), @@ -106,8 +106,8 @@ func Test_Executor_SuspendStopsAllActions(t *testing.T) { }, } - // Execute the orchestrator function and expect to get back no actions - results, err := executor.ExecuteOrchestrator(ctx, iid, oldEvents, newEvents) + // Execute the workflow function and expect to get back no actions + results, err := executor.ExecuteWorkflow(ctx, iid, oldEvents, newEvents) require.NoError(t, err) - require.Empty(t, results.Actions, "Suspended orchestrations should not have any actions") + require.Empty(t, results.Actions, "Suspended workflows should not have any actions") } diff --git a/tests/taskhub_test.go b/tests/taskhub_test.go index 538004e6..7848a215 100644 --- a/tests/taskhub_test.go +++ b/tests/taskhub_test.go @@ -13,7 +13,7 @@ func Test_TaskHubWorkerStartsDependencies(t *testing.T) { ctx := context.Background() be := mocks.NewBackend(t) - orchWorker := mocks.NewTaskWorker[*backend.OrchestrationWorkItem](t) + orchWorker := mocks.NewTaskWorker[*backend.WorkflowWorkItem](t) actWorker := mocks.NewTaskWorker[*backend.ActivityWorkItem](t) be.EXPECT().CreateTaskHub(ctx).Return(nil).Once() @@ -30,7 +30,7 @@ func Test_TaskHubWorkerStopsDependencies(t *testing.T) { ctx := context.Background() be := mocks.NewBackend(t) - orchWorker := mocks.NewTaskWorker[*backend.OrchestrationWorkItem](t) + orchWorker := mocks.NewTaskWorker[*backend.WorkflowWorkItem](t) actWorker := mocks.NewTaskWorker[*backend.ActivityWorkItem](t) be.EXPECT().Stop(ctx).Return(nil).Once() diff --git a/tests/utils/tracing.go b/tests/utils/tracing.go index a55ec453..d1ef7d35 100644 --- a/tests/utils/tracing.go +++ b/tests/utils/tracing.go @@ -31,8 +31,8 @@ func AssertSpanSequence(t assert.TestingT, spans []trace.ReadOnlySpan, spanAsser } } -// assertOrchestratorCreated validates a create_orchestration span -func AssertOrchestratorCreated(name string, id api.InstanceID, optionalAsserts ...spanAttributeValidator) spanValidator { +// AssertWorkflowCreated validates a create_orchestration span +func AssertWorkflowCreated(name string, id api.InstanceID, optionalAsserts ...spanAttributeValidator) spanValidator { spanName := fmt.Sprintf("create_orchestration||%s", name) opts := []spanAttributeValidator{ assertTaskType("orchestration"), @@ -43,8 +43,8 @@ func AssertOrchestratorCreated(name string, id api.InstanceID, optionalAsserts . return AssertSpan(spanName, opts...) } -// assertOrchestratorCreated validates an orchestration span -func AssertOrchestratorExecuted(name string, id api.InstanceID, status string, optionalAsserts ...spanAttributeValidator) spanValidator { +// AssertWorkflowExecuted validates an orchestration span +func AssertWorkflowExecuted(name string, id api.InstanceID, status string, optionalAsserts ...spanAttributeValidator) spanValidator { spanName := fmt.Sprintf("orchestration||%s", name) opts := []spanAttributeValidator{ assertTaskType("orchestration"), @@ -256,7 +256,7 @@ func assertPatch(patchName string) spanAttributeValidator { // initTracing configures in-memory OTel tracing and returns an exporter which can be used // to examine the exported traces. We only want to look at exported traces because we do -// tricks to mark certain spans as non-exported (i.e. orchestration replays), and want +// tricks to mark certain spans as non-exported (i.e. workflow replays), and want // to ensure that those spans are never actually exported. func InitTracing() *tracetest.InMemoryExporter { // The global tracer provider can only be initialized once. diff --git a/tests/worker_test.go b/tests/worker_test.go index 959bd0b3..9055675f 100644 --- a/tests/worker_test.go +++ b/tests/worker_test.go @@ -25,9 +25,9 @@ var ( anyContext = mock.Anything ) -func Test_TryProcessSingleOrchestrationWorkItem_BasicFlow(t *testing.T) { +func Test_TryProcessSingleWorkflowWorkItem_BasicFlow(t *testing.T) { ctx := context.Background() - wi := &backend.OrchestrationWorkItem{ + wi := &backend.WorkflowWorkItem{ InstanceID: "test123", NewEvents: []*protos.HistoryEvent{ { @@ -51,20 +51,20 @@ func Test_TryProcessSingleOrchestrationWorkItem_BasicFlow(t *testing.T) { ctx, cancel := context.WithCancel(ctx) completed := atomic.Bool{} be := mocks.NewBackend(t) - be.EXPECT().NextOrchestrationWorkItem(anyContext).Return(wi, nil).Once() - be.EXPECT().NextOrchestrationWorkItem(anyContext).Return(nil, errors.New("")).Once().Run(func(mock.Arguments) { + be.EXPECT().NextWorkflowWorkItem(anyContext).Return(wi, nil).Once() + be.EXPECT().NextWorkflowWorkItem(anyContext).Return(nil, errors.New("")).Once().Run(func(mock.Arguments) { cancel() }) be.EXPECT().GetWorkflowRuntimeState(anyContext, wi).Return(state, nil).Once() - be.EXPECT().CompleteOrchestrationWorkItem(anyContext, wi).RunAndReturn(func(ctx context.Context, owi *backend.OrchestrationWorkItem) error { + be.EXPECT().CompleteWorkflowWorkItem(anyContext, wi).RunAndReturn(func(ctx context.Context, owi *backend.WorkflowWorkItem) error { completed.Store(true) return nil }).Once() ex := mocks.NewExecutor(t) - ex.EXPECT().ExecuteOrchestrator(anyContext, wi.InstanceID, state.OldEvents, mock.Anything).Return(result, nil).Once() + ex.EXPECT().ExecuteWorkflow(anyContext, wi.InstanceID, state.OldEvents, mock.Anything).Return(result, nil).Once() - worker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + worker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: ex, Logger: logger, @@ -74,7 +74,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_BasicFlow(t *testing.T) { require.EventuallyWithT(t, func(collect *assert.CollectT) { if !completed.Load() { - collect.Errorf("process next not called CompleteOrchestrationWorkItem yet") + collect.Errorf("process next not called CompleteWorkflowWorkItem yet") } }, 1*time.Second, 100*time.Millisecond) @@ -86,9 +86,9 @@ func Test_TryProcessSingleOrchestrationWorkItem_BasicFlow(t *testing.T) { require.NotNil(t, wi.State.NewEvents[1].GetExecutionStarted()) } -func Test_TryProcessSingleOrchestrationWorkItem_Idempotency(t *testing.T) { +func Test_TryProcessSingleWorkflowWorkItem_Idempotency(t *testing.T) { workflowID := "test123" - wi := &backend.OrchestrationWorkItem{ + wi := &backend.WorkflowWorkItem{ InstanceID: api.InstanceID(workflowID), NewEvents: []*protos.HistoryEvent{ { @@ -116,29 +116,29 @@ func Test_TryProcessSingleOrchestrationWorkItem_Idempotency(t *testing.T) { ex := mocks.NewExecutor(t) callNumber := 0 - ex.EXPECT().ExecuteOrchestrator(anyContext, wi.InstanceID, wi.State.OldEvents, mock.Anything).RunAndReturn(func(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.WorkflowResponse, error) { + ex.EXPECT().ExecuteWorkflow(anyContext, wi.InstanceID, wi.State.OldEvents, mock.Anything).RunAndReturn(func(ctx context.Context, iid api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.WorkflowResponse, error) { callNumber++ - logger.Debugf("execute orchestrator called %d times", callNumber) + logger.Debugf("execute workflow called %d times", callNumber) if callNumber == 1 { return nil, errors.New("dummy error") } return &protos.WorkflowResponse{}, nil }).Times(2) - be.EXPECT().NextOrchestrationWorkItem(anyContext).Return(wi, nil).Once() - be.EXPECT().AbandonOrchestrationWorkItem(anyContext, wi).Return(nil).Once() + be.EXPECT().NextWorkflowWorkItem(anyContext).Return(wi, nil).Once() + be.EXPECT().AbandonWorkflowWorkItem(anyContext, wi).Return(nil).Once() - be.EXPECT().NextOrchestrationWorkItem(anyContext).Return(wi, nil).Once() - be.EXPECT().CompleteOrchestrationWorkItem(anyContext, wi).RunAndReturn(func(ctx context.Context, owi *backend.OrchestrationWorkItem) error { + be.EXPECT().NextWorkflowWorkItem(anyContext).Return(wi, nil).Once() + be.EXPECT().CompleteWorkflowWorkItem(anyContext, wi).RunAndReturn(func(ctx context.Context, owi *backend.WorkflowWorkItem) error { completed.Store(true) return nil }).Once() - be.EXPECT().NextOrchestrationWorkItem(anyContext).Return(nil, errors.New("")).Once().Run(func(mock.Arguments) { + be.EXPECT().NextWorkflowWorkItem(anyContext).Return(nil, errors.New("")).Once().Run(func(mock.Arguments) { cancel() }) - worker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + worker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: ex, Logger: logger, @@ -157,12 +157,12 @@ func Test_TryProcessSingleOrchestrationWorkItem_Idempotency(t *testing.T) { require.NotNil(t, wi.State.NewEvents[2].GetWorkflowStarted()) } -func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t *testing.T) { +func Test_TryProcessSingleWorkflowWorkItem_ExecutionStartedAndCompleted(t *testing.T) { ctx := context.Background() iid := api.InstanceID("test123") - // Simulate getting an ExecutionStarted message from the orchestration queue - wi := &backend.OrchestrationWorkItem{ + // Simulate getting an ExecutionStarted message from the workflow queue + wi := &backend.WorkflowWorkItem{ InstanceID: iid, NewEvents: []*protos.HistoryEvent{ { @@ -170,7 +170,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t * Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: "MyOrchestration", + Name: "MyWorkflow", WorkflowInstance: &protos.WorkflowInstance{ InstanceId: string(iid), ExecutionId: wrapperspb.String(uuid.New().String()), @@ -181,13 +181,13 @@ func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t * }, } - // Empty orchestration runtime state since we're starting a new execution from scratch + // Empty workflow runtime state since we're starting a new execution from scratch state := runtimestate.NewWorkflowRuntimeState(string(iid), nil, []*protos.HistoryEvent{}) ctx, cancel := context.WithCancel(ctx) be := mocks.NewBackend(t) - be.EXPECT().NextOrchestrationWorkItem(anyContext).Return(wi, nil).Once() - be.EXPECT().NextOrchestrationWorkItem(anyContext).Return(nil, errors.New("")).Once().Run(func(mock.Arguments) { + be.EXPECT().NextWorkflowWorkItem(anyContext).Return(wi, nil).Once() + be.EXPECT().NextWorkflowWorkItem(anyContext).Return(nil, errors.New("")).Once().Run(func(mock.Arguments) { cancel() }) @@ -195,7 +195,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t * ex := mocks.NewExecutor(t) - // Return an execution completed action to simulate the completion of the orchestration (a no-op) + // Return an execution completed action to simulate the completion of the workflow (a no-op) resultValue := "done" result := &protos.WorkflowResponse{ Actions: []*protos.WorkflowAction{ @@ -213,17 +213,17 @@ func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t * // Execute should be called with an empty oldEvents list. NewEvents should contain two items, // but there doesn't seem to be a good way to assert this. - ex.EXPECT().ExecuteOrchestrator(anyContext, iid, []*protos.HistoryEvent{}, mock.Anything).Return(result, nil).Once() + ex.EXPECT().ExecuteWorkflow(anyContext, iid, []*protos.HistoryEvent{}, mock.Anything).Return(result, nil).Once() // After execution, the Complete action should be called completed := atomic.Bool{} - be.EXPECT().CompleteOrchestrationWorkItem(anyContext, wi).RunAndReturn(func(ctx context.Context, owi *backend.OrchestrationWorkItem) error { + be.EXPECT().CompleteWorkflowWorkItem(anyContext, wi).RunAndReturn(func(ctx context.Context, owi *backend.WorkflowWorkItem) error { completed.Store(true) return nil }).Once() // Set up and run the test - worker := backend.NewOrchestrationWorker(backend.OrchestratorOptions{ + worker := backend.NewWorkflowWorker(backend.WorkflowWorkerOptions{ Backend: be, Executor: ex, Logger: logger, @@ -237,7 +237,7 @@ func Test_TryProcessSingleOrchestrationWorkItem_ExecutionStartedAndCompleted(t * require.EventuallyWithT(t, func(collect *assert.CollectT) { if !completed.Load() { - collect.Errorf("process next not called CompleteOrchestrationWorkItem yet") + collect.Errorf("process next not called CompleteWorkflowWorkItem yet") } }, 1*time.Second, 100*time.Millisecond) diff --git a/workflow/api.go b/workflow/api.go index dbb7878a..f302caf6 100644 --- a/workflow/api.go +++ b/workflow/api.go @@ -9,7 +9,7 @@ import ( "google.golang.org/protobuf/types/known/wrapperspb" ) -type NewWorkflowOptions api.NewOrchestrationOptions +type NewWorkflowOptions api.NewWorkflowOptions type FetchWorkflowMetadataOptions api.FetchWorkflowMetadataOptions type RaiseEventOptions api.RaiseEventOptions type TerminateOptions api.TerminateOptions diff --git a/workflow/client.go b/workflow/client.go index 3cf8aee9..88cc7e29 100644 --- a/workflow/client.go +++ b/workflow/client.go @@ -32,13 +32,13 @@ func (c *Client) StartWorker(ctx context.Context, r *Registry) error { // ScheduleWorkflow schedules a new workflow instance with a specified set of // options for execution. -func (c *Client) ScheduleWorkflow(ctx context.Context, orchestrator string, opts ...NewWorkflowOptions) (string, error) { - oopts := make([]api.NewOrchestrationOptions, len(opts)) +func (c *Client) ScheduleWorkflow(ctx context.Context, workflow string, opts ...NewWorkflowOptions) (string, error) { + oopts := make([]api.NewWorkflowOptions, len(opts)) for i, o := range opts { - oopts[i] = api.NewOrchestrationOptions(o) + oopts[i] = api.NewWorkflowOptions(o) } - id, err := c.thgc.ScheduleNewOrchestration(ctx, orchestrator, oopts...) + id, err := c.thgc.ScheduleNewWorkflow(ctx, workflow, oopts...) return string(id), err } @@ -67,7 +67,7 @@ func (c *Client) WaitForWorkflowStart(ctx context.Context, id string, opts ...Fe for i, o := range opts { oops[i] = api.FetchWorkflowMetadataOptions(o) } - meta, err := c.thgc.WaitForOrchestrationStart(ctx, api.InstanceID(id), oops...) + meta, err := c.thgc.WaitForWorkflowStart(ctx, api.InstanceID(id), oops...) return (*WorkflowMetadata)(meta), err } @@ -82,7 +82,7 @@ func (c *Client) WaitForWorkflowCompletion(ctx context.Context, id string, opts for i, o := range opts { oops[i] = api.FetchWorkflowMetadataOptions(o) } - meta, err := c.thgc.WaitForOrchestrationCompletion(ctx, api.InstanceID(id), oops...) + meta, err := c.thgc.WaitForWorkflowCompletion(ctx, api.InstanceID(id), oops...) return (*WorkflowMetadata)(meta), err } @@ -93,7 +93,7 @@ func (c *Client) TerminateWorkflow(ctx context.Context, id string, opts ...Termi for i, o := range opts { toops[i] = api.TerminateOptions(o) } - return c.thgc.TerminateOrchestration(ctx, api.InstanceID(id), toops...) + return c.thgc.TerminateWorkflow(ctx, api.InstanceID(id), toops...) } // RaiseEvent sends an asynchronous event notification to a waiting workflow. @@ -111,13 +111,13 @@ func (c *Client) RaiseEvent(ctx context.Context, id, eventName string, opts ...R // Note that suspended workflows are still considered to be "running" even // though they will not process events. func (c *Client) SuspendWorkflow(ctx context.Context, id, reason string) error { - return c.thgc.SuspendOrchestration(ctx, api.InstanceID(id), reason) + return c.thgc.SuspendWorkflow(ctx, api.InstanceID(id), reason) } -// ResumeWorkflow resumes an orchestration instance that was previously +// ResumeWorkflow resumes a workflow instance that was previously // suspended. func (c *Client) ResumeWorkflow(ctx context.Context, id, reason string) error { - return c.thgc.ResumeOrchestration(ctx, api.InstanceID(id), reason) + return c.thgc.ResumeWorkflow(ctx, api.InstanceID(id), reason) } // PurgeWorkflowState deletes the state of the specified workflow instance. diff --git a/workflow/registry.go b/workflow/registry.go index 7109036b..fdf339d4 100644 --- a/workflow/registry.go +++ b/workflow/registry.go @@ -5,7 +5,7 @@ import ( "github.com/dapr/durabletask-go/task" ) -// Registry contains maps of names to corresponding orchestrator and activity +// Registry contains maps of names to corresponding workflow and activity // functions. type Registry struct { registry *task.TaskRegistry @@ -18,16 +18,16 @@ func NewRegistry() *Registry { } } -// AddWorkflow adds an orchestrator function to the registry. The name of the orchestrator +// AddWorkflow adds an workflow function to the registry. The name of the workflow // function is determined using reflection. func (r *Registry) AddWorkflow(w Workflow) error { return r.AddWorkflowN(helpers.GetTaskFunctionName(w), w) } -// AddWorkflowN adds an orchestrator function to the registry with a +// AddWorkflowN adds an workflow function to the registry with a // specified name. func (r *Registry) AddWorkflowN(name string, w Workflow) error { - return r.registry.AddOrchestratorN(name, func(ctx *task.OrchestrationContext) (any, error) { + return r.registry.AddWorkflowN(name, func(ctx *task.WorkflowContext) (any, error) { return w(&WorkflowContext{ctx}) }) } @@ -48,14 +48,14 @@ func (r *Registry) AddActivityN(name string, a Activity) error { // AddVersionedWorkflow adds a versioned workflow function to the registry with a specified name. func (r *Registry) AddVersionedWorkflow(canonicalName string, isLatest bool, w Workflow) error { - return r.registry.AddVersionedOrchestrator(canonicalName, isLatest, func(ctx *task.OrchestrationContext) (any, error) { + return r.registry.AddVersionedWorkflow(canonicalName, isLatest, func(ctx *task.WorkflowContext) (any, error) { return w(&WorkflowContext{ctx}) }) } // AddVersionedWorkflowN adds a versioned workflow function to the registry with a specified name. func (r *Registry) AddVersionedWorkflowN(canonicalName string, name string, isLatest bool, w Workflow) error { - return r.registry.AddVersionedOrchestratorN(canonicalName, name, isLatest, func(ctx *task.OrchestrationContext) (any, error) { + return r.registry.AddVersionedWorkflowN(canonicalName, name, isLatest, func(ctx *task.WorkflowContext) (any, error) { return w(&WorkflowContext{ctx}) }) } diff --git a/workflow/workflow.go b/workflow/workflow.go index a972849b..d565e101 100644 --- a/workflow/workflow.go +++ b/workflow/workflow.go @@ -12,11 +12,11 @@ type Workflow func(ctx *WorkflowContext) (any, error) // ChildWorkflowOption is a functional option type for the CallChildWorkflow // workflow method. -type ChildWorkflowOption task.SubOrchestratorOption +type ChildWorkflowOption task.ChildWorkflowOption // WorkflowContext is the parameter type for workflow functions. type WorkflowContext struct { - oc *task.OrchestrationContext + oc *task.WorkflowContext } func (w *WorkflowContext) SetCustomStatus(cs string) { @@ -57,11 +57,11 @@ func (w *WorkflowContext) CallActivity(activity any, opts ...CallActivityOption) } func (w *WorkflowContext) CallChildWorkflow(workflow any, opts ...ChildWorkflowOption) Task { - oopts := make([]task.SubOrchestratorOption, len(opts)) + oopts := make([]task.ChildWorkflowOption, len(opts)) for i, o := range opts { - oopts[i] = task.SubOrchestratorOption(o) + oopts[i] = task.ChildWorkflowOption(o) } - return w.oc.CallSubOrchestrator(workflow, oopts...) + return w.oc.CallChildWorkflow(workflow, oopts...) } // CreateTimer schedules a durable timer that expires after the specified @@ -110,7 +110,7 @@ func (w *WorkflowContext) IsPatched(patchName string) bool { // WithChildWorkflowAppID is a functional option type for the CallChildWorkflow // workflow method that specifies the app ID of the target activity. func WithChildWorkflowAppID(appID string) ChildWorkflowOption { - return ChildWorkflowOption(task.WithSubOrchestratorAppID(appID)) + return ChildWorkflowOption(task.WithChildWorkflowAppID(appID)) } // ContinueAsNewOption is a functional option type for the ContinueAsNew @@ -127,24 +127,24 @@ func WithKeepUnprocessedEvents() ContinueAsNewOption { // WithChildWorkflowInput is a functional option type for the CallChildWorkflow // workflow method that takes an input value and marshals it to JSON. func WithChildWorkflowInput(input any) ChildWorkflowOption { - return ChildWorkflowOption(task.WithSubOrchestratorInput(input)) + return ChildWorkflowOption(task.WithChildWorkflowInput(input)) } // WithRawChildWorkflowInput is a functional option type for the // CallChildWorkflow workflow method that takes a raw input value. func WithRawChildWorkflowInput(input *wrapperspb.StringValue) ChildWorkflowOption { - return ChildWorkflowOption(task.WithRawSubOrchestratorInput(input)) + return ChildWorkflowOption(task.WithRawChildWorkflowInput(input)) } // WithChildWorkflowInstanceID is a functional option type for the // CallChildWorkflow workflow method that specifies the instance ID of the // child-workflow. func WithChildWorkflowInstanceID(instanceID string) ChildWorkflowOption { - return ChildWorkflowOption(task.WithSubWorkflowInstanceID(instanceID)) + return ChildWorkflowOption(task.WithChildWorkflowInstanceID(instanceID)) } func WithChildWorkflowRetryPolicy(policy *RetryPolicy) ChildWorkflowOption { - return ChildWorkflowOption(task.WithSubOrchestrationRetryPolicy(&task.RetryPolicy{ + return ChildWorkflowOption(task.WithChildWorkflowRetryPolicy(&task.RetryPolicy{ MaxAttempts: policy.MaxAttempts, InitialRetryInterval: policy.InitialRetryInterval, BackoffCoefficient: policy.BackoffCoefficient, From fa3d31c3ca012fd3bdb88181afba48cf01a0fa53 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 31 Mar 2026 15:29:58 -0500 Subject: [PATCH 03/12] revert err msg change and fix test Signed-off-by: Cassandra Coyle --- tests/grpc/grpc_test.go | 2 +- tests/orchestrations_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/grpc/grpc_test.go b/tests/grpc/grpc_test.go index c355eb7e..d074ff0d 100644 --- a/tests/grpc/grpc_test.go +++ b/tests/grpc/grpc_test.go @@ -337,7 +337,7 @@ func Test_Grpc_ReuseInstanceIDError(t *testing.T) { require.NoError(t, err) id, err = grpcClient.ScheduleNewWorkflow(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id)) if assert.Error(t, err) { - assert.Contains(t, err.Error(), "workflow instance already exists") + assert.Contains(t, err.Error(), "orchestration instance already exists") } } diff --git a/tests/orchestrations_test.go b/tests/orchestrations_test.go index 5e38eb9a..a0e62aab 100644 --- a/tests/orchestrations_test.go +++ b/tests/orchestrations_test.go @@ -1294,7 +1294,7 @@ func Test_SingleActivity_ReuseInstanceIDError(t *testing.T) { require.NoError(t, err) id, err = client.ScheduleNewWorkflow(ctx, "SingleActivity", api.WithInput("World"), api.WithInstanceID(id)) if assert.Error(t, err) { - assert.Contains(t, err.Error(), "workflow instance already exists") + assert.Contains(t, err.Error(), "orchestration instance already exists") } } From 91931d9609d9ccfa4ef8105d464d4e7f47f991bd Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 31 Mar 2026 15:55:23 -0500 Subject: [PATCH 04/12] restore old backend behavior since OrchestrationIdReusePolicy was removed. manually cleanup now Signed-off-by: Cassandra Coyle --- backend/postgres/postgres.go | 16 ++++++++++++---- backend/sqlite/sqlite.go | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/backend/postgres/postgres.go b/backend/postgres/postgres.go index c016299a..ed45b492 100644 --- a/backend/postgres/postgres.go +++ b/backend/postgres/postgres.go @@ -475,10 +475,18 @@ func (be *postgresBackend) CompleteWorkflowWorkItem(ctx context.Context, wi *bac // Need to insert a new row into the DB if _, err := be.createWorkflowInstanceInternal(ctx, msg.HistoryEvent, tx); err != nil { if errors.Is(err, runtimestate.ErrDuplicateEvent) || errors.Is(err, api.ErrDuplicateInstance) { - be.logger.Warnf( - "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", - wi.InstanceID, - es.WorkflowInstance.InstanceId) + // Clean up existing instance and retry + if cleanupErr := be.cleanupWorkflowStateInternal(ctx, tx, api.InstanceID(es.WorkflowInstance.InstanceId), false); cleanupErr != nil { + be.logger.Warnf( + "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", + wi.InstanceID, + es.WorkflowInstance.InstanceId) + } else if _, retryErr := be.createWorkflowInstanceInternal(ctx, msg.HistoryEvent, tx); retryErr != nil { + be.logger.Warnf( + "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", + wi.InstanceID, + es.WorkflowInstance.InstanceId) + } } else { return err } diff --git a/backend/sqlite/sqlite.go b/backend/sqlite/sqlite.go index 196e1657..55211757 100644 --- a/backend/sqlite/sqlite.go +++ b/backend/sqlite/sqlite.go @@ -349,10 +349,18 @@ func (be *sqliteBackend) CompleteWorkflowWorkItem(ctx context.Context, wi *backe // Need to insert a new row into the DB if _, err := be.createWorkflowInstanceInternal(ctx, msg.HistoryEvent, tx); err != nil { if err == runtimestate.ErrDuplicateEvent || errors.Is(err, api.ErrDuplicateInstance) { - be.logger.Warnf( - "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", - wi.InstanceID, - es.WorkflowInstance.InstanceId) + // Clean up existing instance and retry + if cleanupErr := be.cleanupWorkflowStateInternal(ctx, tx, api.InstanceID(es.WorkflowInstance.InstanceId), false); cleanupErr != nil { + be.logger.Warnf( + "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", + wi.InstanceID, + es.WorkflowInstance.InstanceId) + } else if _, retryErr := be.createWorkflowInstanceInternal(ctx, msg.HistoryEvent, tx); retryErr != nil { + be.logger.Warnf( + "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", + wi.InstanceID, + es.WorkflowInstance.InstanceId) + } } else { return err } From f63c16da7fd8e6291d68aef47cff11e56f2b559a Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 1 Apr 2026 08:39:56 -0500 Subject: [PATCH 05/12] PR feedback Signed-off-by: Cassandra Coyle --- backend/executor.go | 6 ++++++ backend/postgres/postgres.go | 2 +- backend/sqlite/sqlite.go | 2 +- client/worker_grpc.go | 2 +- task/executor.go | 2 +- task/task.go | 2 +- workflow/api.go | 2 +- workflow/registry.go | 4 ++-- 8 files changed, 14 insertions(+), 8 deletions(-) diff --git a/backend/executor.go b/backend/executor.go index 9fbbf0a8..d22f1d30 100644 --- a/backend/executor.go +++ b/backend/executor.go @@ -426,6 +426,12 @@ func (g *grpcExecutor) CompleteWorkflowTask(ctx context.Context, res *protos.Wor return emptyCompleteTaskResponse, g.backend.CompleteWorkflowTask(ctx, res) } +// CompleteOrchestratorTask implements the deprecated protos.TaskHubSidecarServiceServer method. +// Deprecated: Use CompleteWorkflowTask instead. +func (g *grpcExecutor) CompleteOrchestratorTask(ctx context.Context, res *protos.WorkflowResponse) (*protos.CompleteTaskResponse, error) { + return g.CompleteWorkflowTask(ctx, res) +} + // CompleteActivityTask implements protos.TaskHubSidecarServiceServer func (g *grpcExecutor) CompleteActivityTask(ctx context.Context, res *protos.ActivityResponse) (*protos.CompleteTaskResponse, error) { return emptyCompleteTaskResponse, g.backend.CompleteActivityTask(ctx, res) diff --git a/backend/postgres/postgres.go b/backend/postgres/postgres.go index ed45b492..c4a0ab31 100644 --- a/backend/postgres/postgres.go +++ b/backend/postgres/postgres.go @@ -476,7 +476,7 @@ func (be *postgresBackend) CompleteWorkflowWorkItem(ctx context.Context, wi *bac if _, err := be.createWorkflowInstanceInternal(ctx, msg.HistoryEvent, tx); err != nil { if errors.Is(err, runtimestate.ErrDuplicateEvent) || errors.Is(err, api.ErrDuplicateInstance) { // Clean up existing instance and retry - if cleanupErr := be.cleanupWorkflowStateInternal(ctx, tx, api.InstanceID(es.WorkflowInstance.InstanceId), false); cleanupErr != nil { + if cleanupErr := be.cleanupWorkflowStateInternal(ctx, tx, api.InstanceID(es.WorkflowInstance.InstanceId), true); cleanupErr != nil { be.logger.Warnf( "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", wi.InstanceID, diff --git a/backend/sqlite/sqlite.go b/backend/sqlite/sqlite.go index 55211757..8f93c292 100644 --- a/backend/sqlite/sqlite.go +++ b/backend/sqlite/sqlite.go @@ -350,7 +350,7 @@ func (be *sqliteBackend) CompleteWorkflowWorkItem(ctx context.Context, wi *backe if _, err := be.createWorkflowInstanceInternal(ctx, msg.HistoryEvent, tx); err != nil { if err == runtimestate.ErrDuplicateEvent || errors.Is(err, api.ErrDuplicateInstance) { // Clean up existing instance and retry - if cleanupErr := be.cleanupWorkflowStateInternal(ctx, tx, api.InstanceID(es.WorkflowInstance.InstanceId), false); cleanupErr != nil { + if cleanupErr := be.cleanupWorkflowStateInternal(ctx, tx, api.InstanceID(es.WorkflowInstance.InstanceId), true); cleanupErr != nil { be.logger.Warnf( "%v: dropping child workflow creation event because an instance with the target ID (%v) already exists.", wi.InstanceID, diff --git a/client/worker_grpc.go b/client/worker_grpc.go index 6ac295e3..cf68d8f3 100644 --- a/client/worker_grpc.go +++ b/client/worker_grpc.go @@ -176,7 +176,7 @@ func (c *TaskHubGrpcClient) processWorkflowWorkItem( WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ CompleteWorkflow: &protos.CompleteWorkflowAction{ WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, - Result: wrapperspb.String("An internal error occured while executing the workflow."), + Result: wrapperspb.String("An internal error occurred while executing the orchestration."), FailureDetails: &protos.TaskFailureDetails{ ErrorType: fmt.Sprintf("%T", err), ErrorMessage: err.Error(), diff --git a/task/executor.go b/task/executor.go index 5608b4ca..6d3a8867 100644 --- a/task/executor.go +++ b/task/executor.go @@ -127,7 +127,7 @@ func (te *taskExecutor) ExecuteActivity(ctx context.Context, id api.InstanceID, }, nil } -// ExecuteWorkflow implements backend.Executor and executes an workflow function in the current goroutine. +// ExecuteWorkflow implements backend.Executor and executes a workflow function in the current goroutine. func (te *taskExecutor) ExecuteWorkflow(ctx context.Context, id api.InstanceID, oldEvents []*protos.HistoryEvent, newEvents []*protos.HistoryEvent) (*protos.WorkflowResponse, error) { workflowCtx := NewWorkflowContext(te.Registry, id, oldEvents, newEvents) actions := workflowCtx.start() diff --git a/task/task.go b/task/task.go index 55e6e89f..b99de187 100644 --- a/task/task.go +++ b/task/task.go @@ -7,7 +7,7 @@ import ( "github.com/dapr/durabletask-go/api/protos" ) -// ErrTaskBlocked is not an error, but rather a control flow signal indicating that an workflow +// ErrTaskBlocked is not an error, but rather a control flow signal indicating that a workflow // function has executed as far as it can and that it now needs to unload, dispatch any scheduled tasks, // and commit its current execution progress to durable storage. var ErrTaskBlocked = errors.New("the current task is blocked") diff --git a/workflow/api.go b/workflow/api.go index f302caf6..1710e8d2 100644 --- a/workflow/api.go +++ b/workflow/api.go @@ -91,7 +91,7 @@ func WithForcePurge(force bool) PurgeOptions { } func WorkflowMetadataIsRunning(o *WorkflowMetadata) bool { - return api.WorkflowMetadataIsComplete(ptr.Of(protos.WorkflowMetadata(*o))) + return !WorkflowMetadataIsComplete(o) } func WorkflowMetadataIsComplete(o *WorkflowMetadata) bool { diff --git a/workflow/registry.go b/workflow/registry.go index fdf339d4..c3f78490 100644 --- a/workflow/registry.go +++ b/workflow/registry.go @@ -18,13 +18,13 @@ func NewRegistry() *Registry { } } -// AddWorkflow adds an workflow function to the registry. The name of the workflow +// AddWorkflow adds a workflow function to the registry. The name of the workflow // function is determined using reflection. func (r *Registry) AddWorkflow(w Workflow) error { return r.AddWorkflowN(helpers.GetTaskFunctionName(w), w) } -// AddWorkflowN adds an workflow function to the registry with a +// AddWorkflowN adds a workflow function to the registry with a // specified name. func (r *Registry) AddWorkflowN(name string, w Workflow) error { return r.registry.AddWorkflowN(name, func(ctx *task.WorkflowContext) (any, error) { From c7aea33c1e4343af3ac09224660b32a67e81bb2e Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 1 Apr 2026 09:30:41 -0500 Subject: [PATCH 06/12] PR feedback Signed-off-by: Cassandra Coyle --- samples/externalevents/externalevents.go | 2 +- samples/parallel/parallel.go | 2 +- samples/sequence/sequence.go | 4 ++-- task/registry.go | 4 ++-- task/task.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/externalevents/externalevents.go b/samples/externalevents/externalevents.go index a0c933e0..c0f32dba 100644 --- a/samples/externalevents/externalevents.go +++ b/samples/externalevents/externalevents.go @@ -87,7 +87,7 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac return taskHubClient, taskHubWorker, nil } -// ExternalEventWorkflow is an workflow function that blocks for 30 seconds or +// ExternalEventWorkflow is a workflow function that blocks for 30 seconds or // until a "Name" event is sent to it. func ExternalEventWorkflow(ctx *task.WorkflowContext) (any, error) { var nameInput string diff --git a/samples/parallel/parallel.go b/samples/parallel/parallel.go index 2a15a1ce..55c2d2fe 100644 --- a/samples/parallel/parallel.go +++ b/samples/parallel/parallel.go @@ -79,7 +79,7 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac return taskHubClient, taskHubWorker, nil } -// UpdateDevicesWorkflow is an workflow that runs activities in parallel +// UpdateDevicesWorkflow is a workflow that runs activities in parallel func UpdateDevicesWorkflow(ctx *task.WorkflowContext) (any, error) { // Get a dynamic list of devices to perform updates on var devices []string diff --git a/samples/sequence/sequence.go b/samples/sequence/sequence.go index 4d1877aa..de5f00b0 100644 --- a/samples/sequence/sequence.go +++ b/samples/sequence/sequence.go @@ -75,7 +75,7 @@ func Init(ctx context.Context, r *task.TaskRegistry) (backend.TaskHubClient, bac return taskHubClient, taskHubWorker, nil } -// ActivitySequenceWorkflow makes three activity calls in sequence and results the results +// ActivitySequenceWorkflow makes three activity calls in sequence and returns the results // as an array. func ActivitySequenceWorkflow(ctx *task.WorkflowContext) (any, error) { var helloTokyo string @@ -93,7 +93,7 @@ func ActivitySequenceWorkflow(ctx *task.WorkflowContext) (any, error) { return []string{helloTokyo, helloLondon, helloSeattle}, nil } -// SayHelloActivity can be called by an workflow function and will return a friendly greeting. +// SayHelloActivity can be called by a workflow function and will return a friendly greeting. func SayHelloActivity(ctx task.ActivityContext) (any, error) { var input string if err := ctx.GetInput(&input); err != nil { diff --git a/task/registry.go b/task/registry.go index ad73d7da..155c39ca 100644 --- a/task/registry.go +++ b/task/registry.go @@ -25,14 +25,14 @@ func NewTaskRegistry() *TaskRegistry { return r } -// AddWorkflow adds an workflow function to the registry. The name of the workflow +// AddWorkflow adds a workflow function to the registry. The name of the workflow // function is determined using reflection. func (r *TaskRegistry) AddWorkflow(o Workflow) error { name := helpers.GetTaskFunctionName(o) return r.AddWorkflowN(name, o) } -// AddWorkflowN adds an workflow function to the registry with a specified name. +// AddWorkflowN adds a workflow function to the registry with a specified name. func (r *TaskRegistry) AddWorkflowN(name string, o Workflow) error { if _, ok := r.workflows[name]; ok { return fmt.Errorf("workflow named '%s' is already registered", name) diff --git a/task/task.go b/task/task.go index b99de187..236632bb 100644 --- a/task/task.go +++ b/task/task.go @@ -46,7 +46,7 @@ func newTask(ctx *WorkflowContext) *completableTask { // Await may panic with ErrTaskBlocked as the panic value if called on a task that has not yet completed. // This is normal control flow behavior for workflow functions and doesn't actually indicate a failure // of any kind. However, workflow functions must never attempt to recover from such panics to ensure that -// the workflow execution can procede normally. +// the workflow execution can proceed normally. func (t *completableTask) Await(v any) error { for { if t.isCompleted { From 6fca4c79039e4cd16cf26b898431cd55c5220cb4 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 1 Apr 2026 11:10:23 -0500 Subject: [PATCH 07/12] fix ci Signed-off-by: Cassandra Coyle --- task/orchestrator.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/task/orchestrator.go b/task/orchestrator.go index 15ecc338..66cefff9 100644 --- a/task/orchestrator.go +++ b/task/orchestrator.go @@ -458,10 +458,10 @@ func (ctx *WorkflowContext) createTimerInternal(name *string, delay time.Duratio return task } -func (ctx *OrchestrationContext) createExternalEventTimerInternal(eventName string, fireAt time.Time) *completableTask { - timerAction := &protos.OrchestratorAction{ +func (ctx *WorkflowContext) createExternalEventTimerInternal(eventName string, fireAt time.Time) *completableTask { + timerAction := &protos.WorkflowAction{ Id: ctx.getNextSequenceNumber(), - OrchestratorActionType: &protos.OrchestratorAction_CreateTimer{ + WorkflowActionType: &protos.WorkflowAction_CreateTimer{ CreateTimer: &protos.CreateTimerAction{ FireAt: timestamppb.New(fireAt), Name: &eventName, From 755bbd82211e8aff6b3ca738172c0991254c1f8d Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 1 Apr 2026 11:20:51 -0500 Subject: [PATCH 08/12] more updates I missed Signed-off-by: Cassandra Coyle --- tests/runtimestate_test.go | 8 ++++---- tests/task_executor_test.go | 38 ++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/runtimestate_test.go b/tests/runtimestate_test.go index 394e5ba4..6f98a2c4 100644 --- a/tests/runtimestate_test.go +++ b/tests/runtimestate_test.go @@ -318,14 +318,14 @@ func Test_CreateTimer_ExternalEventOrigin(t *testing.T) { eventName := "myEvent" expectedFireAt := time.Now().UTC().Add(30 * time.Minute) - s := runtimestate.NewOrchestrationRuntimeState(iid, nil, []*protos.HistoryEvent{ + s := runtimestate.NewWorkflowRuntimeState(iid, nil, []*protos.HistoryEvent{ { EventId: -1, Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "MyOrchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: iid, ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -334,10 +334,10 @@ func Test_CreateTimer_ExternalEventOrigin(t *testing.T) { }, }) - actions := []*protos.OrchestratorAction{ + actions := []*protos.WorkflowAction{ { Id: 1, - OrchestratorActionType: &protos.OrchestratorAction_CreateTimer{ + WorkflowActionType: &protos.WorkflowAction_CreateTimer{ CreateTimer: &protos.CreateTimerAction{ FireAt: timestamppb.New(expectedFireAt), Name: &eventName, diff --git a/tests/task_executor_test.go b/tests/task_executor_test.go index 23e87737..813ec4a4 100644 --- a/tests/task_executor_test.go +++ b/tests/task_executor_test.go @@ -67,7 +67,7 @@ func Test_Executor_WaitForEventSchedulesTimer(t *testing.T) { // with a far-future fireAt and the ExternalEvent origin set. func Test_Executor_WaitForEventWithoutTimeout_CreatesInfiniteTimer(t *testing.T) { r := task.NewTaskRegistry() - r.AddOrchestratorN("Orchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Orchestration", func(ctx *task.WorkflowContext) (any, error) { var value int ctx.WaitForSingleEvent("MyEvent", -1).Await(&value) return value, nil @@ -78,8 +78,8 @@ func Test_Executor_WaitForEventWithoutTimeout_CreatesInfiniteTimer(t *testing.T) { EventId: -1, Timestamp: timestamppb.Now(), - EventType: &protos.HistoryEvent_OrchestratorStarted{ - OrchestratorStarted: &protos.OrchestratorStartedEvent{}, + EventType: &protos.HistoryEvent_WorkflowStarted{ + WorkflowStarted: &protos.WorkflowStartedEvent{}, }, }, { @@ -88,7 +88,7 @@ func Test_Executor_WaitForEventWithoutTimeout_CreatesInfiniteTimer(t *testing.T) EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "Orchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: string(iid), ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -98,7 +98,7 @@ func Test_Executor_WaitForEventWithoutTimeout_CreatesInfiniteTimer(t *testing.T) } executor := task.NewTaskExecutor(r) - results, err := executor.ExecuteOrchestrator(ctx, iid, []*protos.HistoryEvent{}, newEvents) + results, err := executor.ExecuteWorkflow(ctx, iid, []*protos.HistoryEvent{}, newEvents) require.NoError(t, err) require.Equal(t, 1, len(results.Actions), "Expected a timer to be created even for indefinite waits") createTimerAction := results.Actions[0].GetCreateTimer() @@ -113,7 +113,7 @@ func Test_Executor_WaitForEventWithoutTimeout_CreatesInfiniteTimer(t *testing.T) func Test_Executor_CreateTimer_SetsCreateTimerOrigin(t *testing.T) { timerDuration := 5 * time.Second r := task.NewTaskRegistry() - r.AddOrchestratorN("Orchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Orchestration", func(ctx *task.WorkflowContext) (any, error) { return nil, ctx.CreateTimer(timerDuration).Await(nil) }) @@ -122,8 +122,8 @@ func Test_Executor_CreateTimer_SetsCreateTimerOrigin(t *testing.T) { { EventId: -1, Timestamp: timestamppb.Now(), - EventType: &protos.HistoryEvent_OrchestratorStarted{ - OrchestratorStarted: &protos.OrchestratorStartedEvent{}, + EventType: &protos.HistoryEvent_WorkflowStarted{ + WorkflowStarted: &protos.WorkflowStartedEvent{}, }, }, { @@ -132,7 +132,7 @@ func Test_Executor_CreateTimer_SetsCreateTimerOrigin(t *testing.T) { EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "Orchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: string(iid), ExecutionId: wrapperspb.String(uuid.New().String()), }, @@ -142,7 +142,7 @@ func Test_Executor_CreateTimer_SetsCreateTimerOrigin(t *testing.T) { } executor := task.NewTaskExecutor(r) - results, err := executor.ExecuteOrchestrator(ctx, iid, []*protos.HistoryEvent{}, newEvents) + results, err := executor.ExecuteWorkflow(ctx, iid, []*protos.HistoryEvent{}, newEvents) require.NoError(t, err) require.Equal(t, 1, len(results.Actions), "Expected a single action to be scheduled") createTimerAction := results.Actions[0].GetCreateTimer() @@ -155,7 +155,7 @@ func Test_Executor_CreateTimer_SetsCreateTimerOrigin(t *testing.T) { func Test_Executor_WaitForEvent_TimerFiresCancelsTask(t *testing.T) { timerDuration := 5 * time.Second r := task.NewTaskRegistry() - r.AddOrchestratorN("Orchestration", func(ctx *task.OrchestrationContext) (any, error) { + r.AddWorkflowN("Orchestration", func(ctx *task.WorkflowContext) (any, error) { var value int if err := ctx.WaitForSingleEvent("MyEvent", timerDuration).Await(&value); err != nil { return nil, err @@ -172,8 +172,8 @@ func Test_Executor_WaitForEvent_TimerFiresCancelsTask(t *testing.T) { { EventId: -1, Timestamp: timestamppb.New(startTime), - EventType: &protos.HistoryEvent_OrchestratorStarted{ - OrchestratorStarted: &protos.OrchestratorStartedEvent{}, + EventType: &protos.HistoryEvent_WorkflowStarted{ + WorkflowStarted: &protos.WorkflowStartedEvent{}, }, }, { @@ -182,7 +182,7 @@ func Test_Executor_WaitForEvent_TimerFiresCancelsTask(t *testing.T) { EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ Name: "Orchestration", - OrchestrationInstance: &protos.OrchestrationInstance{ + WorkflowInstance: &protos.WorkflowInstance{ InstanceId: string(iid), ExecutionId: wrapperspb.String(executionID), }, @@ -205,8 +205,8 @@ func Test_Executor_WaitForEvent_TimerFiresCancelsTask(t *testing.T) { { EventId: -1, Timestamp: timestamppb.New(startTime.Add(timerDuration)), - EventType: &protos.HistoryEvent_OrchestratorStarted{ - OrchestratorStarted: &protos.OrchestratorStartedEvent{}, + EventType: &protos.HistoryEvent_WorkflowStarted{ + WorkflowStarted: &protos.WorkflowStartedEvent{}, }, }, { @@ -222,13 +222,13 @@ func Test_Executor_WaitForEvent_TimerFiresCancelsTask(t *testing.T) { } executor := task.NewTaskExecutor(r) - results, err := executor.ExecuteOrchestrator(ctx, iid, oldEvents, newEvents) + results, err := executor.ExecuteWorkflow(ctx, iid, oldEvents, newEvents) require.NoError(t, err) require.Equal(t, 1, len(results.Actions), "Expected a single completion action") - completeAction := results.Actions[0].GetCompleteOrchestration() + completeAction := results.Actions[0].GetCompleteWorkflow() require.NotNil(t, completeAction, "Expected a CompleteOrchestration action") - require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, completeAction.OrchestrationStatus) + require.Equal(t, protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, completeAction.WorkflowStatus) require.NotNil(t, completeAction.FailureDetails) require.Contains(t, completeAction.FailureDetails.ErrorMessage, "the task was canceled") } From 81fb07ef05b10f1d687f7fc4122b622106b3de55 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 1 Apr 2026 15:29:31 -0500 Subject: [PATCH 09/12] add deprecation files so its clear what to rm in a future release while being backwards compatible Signed-off-by: Cassandra Coyle --- api/deprecated.go | 31 +++++ api/protos/deprecated.go | 188 +++++++++++++++++++++++++++++ backend/deprecated.go | 25 ++++ backend/runtimestate/deprecated.go | 13 ++ client/deprecated.go | 51 ++++++++ task/deprecated.go | 60 +++++++++ 6 files changed, 368 insertions(+) create mode 100644 api/deprecated.go create mode 100644 api/protos/deprecated.go create mode 100644 backend/deprecated.go create mode 100644 backend/runtimestate/deprecated.go create mode 100644 client/deprecated.go create mode 100644 task/deprecated.go diff --git a/api/deprecated.go b/api/deprecated.go new file mode 100644 index 00000000..41b65e71 --- /dev/null +++ b/api/deprecated.go @@ -0,0 +1,31 @@ +package api + +import ( + "github.com/dapr/durabletask-go/api/protos" +) + +// This file contains deprecated aliases for backward compatibility. +// TODO: rm in a future release + +// Deprecated: Use NewWorkflowOptions instead. +type NewOrchestrationOptions = NewWorkflowOptions + +// Deprecated: Use FetchWorkflowMetadataOptions instead. +type FetchOrchestrationMetadataOptions = FetchWorkflowMetadataOptions + +// Deprecated: Use WorkflowMetadataIsComplete instead. +func OrchestrationMetadataIsComplete(o *protos.WorkflowMetadata) bool { + return WorkflowMetadataIsComplete(o) +} + +// Deprecated: Use WorkflowMetadataIsRunning instead. +func OrchestrationMetadataIsRunning(o *protos.WorkflowMetadata) bool { + return WorkflowMetadataIsRunning(o) +} + +// Deprecated: Use WithOrchestrationIdReusePolicy is no longer supported. +func WithOrchestrationIdReusePolicy(policy interface{}) NewWorkflowOptions { + return func(req *protos.CreateInstanceRequest) error { + return nil + } +} diff --git a/api/protos/deprecated.go b/api/protos/deprecated.go new file mode 100644 index 00000000..70ab78fd --- /dev/null +++ b/api/protos/deprecated.go @@ -0,0 +1,188 @@ +package protos + +import "google.golang.org/protobuf/types/known/wrapperspb" + +// This file contains deprecated aliases for backward compatibility with +// code that references the old Orchestration/SubOrchestration proto type +// and getter names. +// TODO: rm in a future release + +// --- Type aliases --- + +// Deprecated: Use WorkflowStartedEvent instead. +type OrchestratorStartedEvent = WorkflowStartedEvent + +// Deprecated: Use WorkflowCompletedEvent instead. +type OrchestratorCompletedEvent = WorkflowCompletedEvent + +// Deprecated: Use WorkflowInstance instead. +type OrchestrationInstance = WorkflowInstance + +// Deprecated: Use WorkflowState instead. +type OrchestrationState = WorkflowState + +// Deprecated: Use WorkflowRuntimeState instead. +type OrchestrationRuntimeState = WorkflowRuntimeState + +// Deprecated: Use WorkflowRuntimeStateMessage instead. +type OrchestrationRuntimeStateMessage = WorkflowRuntimeStateMessage + +// Deprecated: Use WorkflowMetadata instead. +type OrchestrationMetadata = WorkflowMetadata + +// Deprecated: Use WorkflowAction instead. +type OrchestratorAction = WorkflowAction + +// Deprecated: Use WorkflowRequest instead. +type OrchestratorRequest = WorkflowRequest + +// Deprecated: Use WorkflowResponse instead. +type OrchestratorResponse = WorkflowResponse + +// Deprecated: Use WorkflowMessage instead. +type OrchestratorMessage = WorkflowMessage + +// Deprecated: Use CreateChildWorkflowAction instead. +type CreateSubOrchestrationAction = CreateChildWorkflowAction + +// Deprecated: Use CompleteWorkflowAction instead. +type CompleteOrchestrationAction = CompleteWorkflowAction + +// Deprecated: Use TerminateWorkflowAction instead. +type TerminateOrchestrationAction = TerminateWorkflowAction + +// Deprecated: Use WorkflowVersionNotAvailableAction instead. +type OrchestratorVersionNotAvailableAction = WorkflowVersionNotAvailableAction + +// Deprecated: Use ChildWorkflowInstanceCreatedEvent instead. +type SubOrchestrationInstanceCreatedEvent = ChildWorkflowInstanceCreatedEvent + +// Deprecated: Use ChildWorkflowInstanceCompletedEvent instead. +type SubOrchestrationInstanceCompletedEvent = ChildWorkflowInstanceCompletedEvent + +// Deprecated: Use ChildWorkflowInstanceFailedEvent instead. +type SubOrchestrationInstanceFailedEvent = ChildWorkflowInstanceFailedEvent + +// Deprecated: Use CompleteWorkflowWorkItemRequest instead. +type CompleteOrchestrationWorkItemRequest = CompleteWorkflowWorkItemRequest + +// Deprecated: Use CompleteWorkflowWorkItemResponse instead. +type CompleteOrchestrationWorkItemResponse = CompleteWorkflowWorkItemResponse + +// --- Oneof wrapper type aliases --- + +// Deprecated: Use HistoryEvent_WorkflowStarted instead. +type HistoryEvent_OrchestratorStarted = HistoryEvent_WorkflowStarted + +// Deprecated: Use HistoryEvent_WorkflowCompleted instead. +type HistoryEvent_OrchestratorCompleted = HistoryEvent_WorkflowCompleted + +// Deprecated: Use HistoryEvent_ChildWorkflowInstanceCreated instead. +type HistoryEvent_SubOrchestrationInstanceCreated = HistoryEvent_ChildWorkflowInstanceCreated + +// Deprecated: Use HistoryEvent_ChildWorkflowInstanceCompleted instead. +type HistoryEvent_SubOrchestrationInstanceCompleted = HistoryEvent_ChildWorkflowInstanceCompleted + +// Deprecated: Use HistoryEvent_ChildWorkflowInstanceFailed instead. +type HistoryEvent_SubOrchestrationInstanceFailed = HistoryEvent_ChildWorkflowInstanceFailed + +// Deprecated: Use WorkflowAction_ScheduleTask instead. +type OrchestratorAction_ScheduleTask = WorkflowAction_ScheduleTask + +// Deprecated: Use WorkflowAction_CreateChildWorkflow instead. +type OrchestratorAction_CreateSubOrchestration = WorkflowAction_CreateChildWorkflow + +// Deprecated: Use WorkflowAction_CreateTimer instead. +type OrchestratorAction_CreateTimer = WorkflowAction_CreateTimer + +// Deprecated: Use WorkflowAction_SendEvent instead. +type OrchestratorAction_SendEvent = WorkflowAction_SendEvent + +// Deprecated: Use WorkflowAction_CompleteWorkflow instead. +type OrchestratorAction_CompleteOrchestration = WorkflowAction_CompleteWorkflow + +// Deprecated: Use WorkflowAction_TerminateWorkflow instead. +type OrchestratorAction_TerminateOrchestration = WorkflowAction_TerminateWorkflow + +// Deprecated: Use WorkflowAction_WorkflowVersionNotAvailable instead. +type OrchestratorAction_OrchestratorVersionNotAvailable = WorkflowAction_WorkflowVersionNotAvailable + +// Deprecated: Use WorkItem_WorkflowRequest instead. +type WorkItem_OrchestratorRequest = WorkItem_WorkflowRequest + +// --- Deprecated getter methods --- + +// Deprecated: Use GetWorkflowStarted instead. +func (x *HistoryEvent) GetOrchestratorStarted() *WorkflowStartedEvent { + return x.GetWorkflowStarted() +} + +// Deprecated: Use GetWorkflowCompleted instead. +func (x *HistoryEvent) GetOrchestratorCompleted() *WorkflowCompletedEvent { + return x.GetWorkflowCompleted() +} + +// Deprecated: Use GetWorkflowInstance instead. +func (x *ExecutionStartedEvent) GetOrchestrationInstance() *WorkflowInstance { + return x.GetWorkflowInstance() +} + +// Deprecated: Use GetWorkflowStatus on ExecutionCompletedEvent instead. +func (x *ExecutionCompletedEvent) GetOrchestrationStatus() OrchestrationStatus { + return x.GetWorkflowStatus() +} + +// Deprecated: Use GetWorkflowStatus on CompleteWorkflowAction instead. +func (x *CompleteWorkflowAction) GetOrchestrationStatus() OrchestrationStatus { + return x.GetWorkflowStatus() +} + +// Deprecated: Use GetChildWorkflowInstanceCreated instead. +func (x *HistoryEvent) GetSubOrchestrationInstanceCreated() *ChildWorkflowInstanceCreatedEvent { + return x.GetChildWorkflowInstanceCreated() +} + +// Deprecated: Use GetChildWorkflowInstanceCompleted instead. +func (x *HistoryEvent) GetSubOrchestrationInstanceCompleted() *ChildWorkflowInstanceCompletedEvent { + return x.GetChildWorkflowInstanceCompleted() +} + +// Deprecated: Use GetChildWorkflowInstanceFailed instead. +func (x *HistoryEvent) GetSubOrchestrationInstanceFailed() *ChildWorkflowInstanceFailedEvent { + return x.GetChildWorkflowInstanceFailed() +} + +// Deprecated: Use GetWorkflowInstance instead. +func (x *ParentInstanceInfo) GetOrchestrationInstance() *WorkflowInstance { + return x.GetWorkflowInstance() +} + +// Deprecated: Use GetWorkflowSpanID instead. +func (x *ExecutionStartedEvent) GetOrchestrationSpanID() *wrapperspb.StringValue { + return x.GetWorkflowSpanID() +} + +// Deprecated: Use GetWorkflowRequest instead. +func (x *WorkItem) GetOrchestratorRequest() *WorkflowRequest { + return x.GetWorkflowRequest() +} + +// Deprecated: Use GetCompleteWorkflow instead. +func (x *WorkflowAction) GetCompleteOrchestration() *CompleteWorkflowAction { + return x.GetCompleteWorkflow() +} + +// Deprecated: Use GetCreateChildWorkflow instead. +func (x *WorkflowAction) GetCreateSubOrchestration() *CreateChildWorkflowAction { + return x.GetCreateChildWorkflow() +} + +// Deprecated: Use GetTerminateWorkflow instead. +func (x *WorkflowAction) GetTerminateOrchestration() *TerminateWorkflowAction { + return x.GetTerminateWorkflow() +} + +// Deprecated: Use GetWorkflowVersionNotAvailable instead. +func (x *WorkflowAction) GetOrchestratorVersionNotAvailable() *WorkflowVersionNotAvailableAction { + return x.GetWorkflowVersionNotAvailable() +} diff --git a/backend/deprecated.go b/backend/deprecated.go new file mode 100644 index 00000000..64113f9b --- /dev/null +++ b/backend/deprecated.go @@ -0,0 +1,25 @@ +package backend + +import "github.com/dapr/durabletask-go/api/protos" + +// This file contains deprecated aliases for backward compatibility. +// TODO: rm in a future release + +// Deprecated: Use WorkflowWorkItem instead. +type OrchestrationWorkItem = WorkflowWorkItem + +// Deprecated: Use WorkflowRuntimeState instead. +type OrchestrationRuntimeState = WorkflowRuntimeState + +// Deprecated: Use WorkflowRuntimeStateMessage instead. +type OrchestrationRuntimeStateMessage = WorkflowRuntimeStateMessage + +// Deprecated: Use WorkflowMetadata instead. +type OrchestrationMetadata = WorkflowMetadata + +// Deprecated: Use BackendWorkflowStateMetadata instead. +type WorkflowStateMetadata = BackendWorkflowStateMetadata + +// Deprecated: Use protos.BackendWorkflowState instead. +// This was the old backend WorkflowState with Inbox/History/Generation fields. +type BackendWorkflowState = protos.BackendWorkflowState diff --git a/backend/runtimestate/deprecated.go b/backend/runtimestate/deprecated.go new file mode 100644 index 00000000..1c31d799 --- /dev/null +++ b/backend/runtimestate/deprecated.go @@ -0,0 +1,13 @@ +package runtimestate + +import ( + "github.com/dapr/durabletask-go/api/protos" + "google.golang.org/protobuf/types/known/wrapperspb" +) + +// TODO: rm in a future release + +// Deprecated: Use NewWorkflowRuntimeState instead. +func NewOrchestrationRuntimeState(instanceID string, customStatus *wrapperspb.StringValue, existingHistory []*protos.HistoryEvent) *protos.WorkflowRuntimeState { + return NewWorkflowRuntimeState(instanceID, customStatus, existingHistory) +} diff --git a/client/deprecated.go b/client/deprecated.go new file mode 100644 index 00000000..87c968e6 --- /dev/null +++ b/client/deprecated.go @@ -0,0 +1,51 @@ +package client + +import ( + "context" + + "github.com/dapr/durabletask-go/api" + "github.com/dapr/durabletask-go/backend" +) + +// This file contains deprecated aliases for backward compatibility. +// TODO: rm in a future release + +// Deprecated: Use ScheduleNewWorkflow instead. +func (c *TaskHubGrpcClient) ScheduleNewOrchestration(ctx context.Context, workflow string, opts ...api.NewWorkflowOptions) (api.InstanceID, error) { + return c.ScheduleNewWorkflow(ctx, workflow, opts...) +} + +// Deprecated: Use WaitForWorkflowCompletion instead. +func (c *TaskHubGrpcClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { + return c.WaitForWorkflowCompletion(ctx, id, opts...) +} + +// Deprecated: Use WaitForWorkflowStart instead. +func (c *TaskHubGrpcClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { + return c.WaitForWorkflowStart(ctx, id, opts...) +} + +// Deprecated: Use FetchWorkflowMetadata instead. +func (c *TaskHubGrpcClient) FetchOrchestrationMetadata(ctx context.Context, id api.InstanceID, opts ...api.FetchWorkflowMetadataOptions) (*backend.WorkflowMetadata, error) { + return c.FetchWorkflowMetadata(ctx, id, opts...) +} + +// Deprecated: Use TerminateWorkflow instead. +func (c *TaskHubGrpcClient) TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error { + return c.TerminateWorkflow(ctx, id, opts...) +} + +// Deprecated: Use SuspendWorkflow instead. +func (c *TaskHubGrpcClient) SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) error { + return c.SuspendWorkflow(ctx, id, reason) +} + +// Deprecated: Use ResumeWorkflow instead. +func (c *TaskHubGrpcClient) ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) error { + return c.ResumeWorkflow(ctx, id, reason) +} + +// Deprecated: Use PurgeWorkflowState instead. +func (c *TaskHubGrpcClient) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { + return c.PurgeWorkflowState(ctx, id, opts...) +} diff --git a/task/deprecated.go b/task/deprecated.go new file mode 100644 index 00000000..8d2fadc9 --- /dev/null +++ b/task/deprecated.go @@ -0,0 +1,60 @@ +package task + +import "google.golang.org/protobuf/types/known/wrapperspb" + +// This file contains deprecated aliases for backward compatibility. +// TODO: rm in a future release + +// Deprecated: Use WorkflowContext instead. +type OrchestrationContext = WorkflowContext + +// Deprecated: Use Workflow instead. +type Orchestrator = Workflow + +// Deprecated: Use ChildWorkflowOption instead. +type SubOrchestratorOption = ChildWorkflowOption + +// Deprecated: Use AddWorkflowN instead. +func (r *TaskRegistry) AddOrchestratorN(name string, o Workflow) error { + return r.AddWorkflowN(name, o) +} + +// Deprecated: Use CallChildWorkflow instead. +func (ctx *WorkflowContext) CallSubOrchestrator(workflow interface{}, opts ...ChildWorkflowOption) Task { + return ctx.CallChildWorkflow(workflow, opts...) +} + +// Deprecated: Use WithChildWorkflowInput instead. +func WithSubOrchestratorInput(input any) ChildWorkflowOption { + return WithChildWorkflowInput(input) +} + +// Deprecated: Use WithRawChildWorkflowInput instead. +func WithRawSubOrchestratorInput(input *wrapperspb.StringValue) ChildWorkflowOption { + return WithRawChildWorkflowInput(input) +} + +// Deprecated: Use WithChildWorkflowAppID instead. +func WithSubOrchestratorAppID(appID string) ChildWorkflowOption { + return WithChildWorkflowAppID(appID) +} + +// Deprecated: Use WithChildWorkflowInstanceID instead. +func WithSubOrchestrationInstanceID(instanceID string) ChildWorkflowOption { + return WithChildWorkflowInstanceID(instanceID) +} + +// Deprecated: Use WithChildWorkflowRetryPolicy instead. +func WithSubOrchestrationRetryPolicy(policy *RetryPolicy) ChildWorkflowOption { + return WithChildWorkflowRetryPolicy(policy) +} + +// Deprecated: Use AddVersionedWorkflowN instead. +func (r *TaskRegistry) AddVersionedOrchestratorN(canonicalName string, name string, isLatest bool, o Workflow) error { + return r.AddVersionedWorkflowN(canonicalName, name, isLatest, o) +} + +// Deprecated: Use AddVersionedWorkflow instead. +func (r *TaskRegistry) AddVersionedOrchestrator(canonicalName string, isLatest bool, o Workflow) error { + return r.AddVersionedWorkflow(canonicalName, isLatest, o) +} From b3e53b5962166ef3344dca615a6b82f533e1c1cc Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 2 Apr 2026 11:49:51 -0500 Subject: [PATCH 10/12] gofmt and add to interface Signed-off-by: Cassandra Coyle --- backend/backend.go | 32 ++++++++++----------- backend/client.go | 17 +++++++++++ backend/deprecated.go | 50 +++++++++++++++++++++++++++++++-- backend/executor.go | 29 +++++++++---------- backend/local/task.go | 8 +++--- backend/postgres/postgres.go | 8 +++--- backend/runtimestate/applier.go | 10 +++---- backend/sqlite/sqlite.go | 9 +++--- backend/taskhub.go | 12 ++++---- client/worker_grpc.go | 2 +- task/activity.go | 2 +- task/orchestrator.go | 4 +-- task/registry.go | 4 +-- task/task.go | 2 +- tests/backend_test.go | 6 ++-- tests/runtimestate_test.go | 20 ++++++------- tests/worker_test.go | 2 +- 17 files changed, 139 insertions(+), 78 deletions(-) diff --git a/backend/backend.go b/backend/backend.go index 68f7e0de..af09cf50 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -21,22 +21,22 @@ var ( ) type ( - HistoryEvent = protos.HistoryEvent - TaskFailureDetails = protos.TaskFailureDetails - WorkflowState = protos.WorkflowState - CreateWorkflowInstanceRequest = protos.CreateWorkflowInstanceRequest - ActivityRequest = protos.ActivityRequest - WorkflowMetadata = protos.WorkflowMetadata - OrchestrationStatus = protos.OrchestrationStatus - BackendWorkflowStateMetadata = protos.BackendWorkflowStateMetadata - DurableTimer = protos.DurableTimer - WorkflowRuntimeState = protos.WorkflowRuntimeState - WorkflowRuntimeStateMessage = protos.WorkflowRuntimeStateMessage - RerunWorkflowFromEventRequest = protos.RerunWorkflowFromEventRequest - ListInstanceIDsRequest = protos.ListInstanceIDsRequest - ListInstanceIDsResponse = protos.ListInstanceIDsResponse - GetInstanceHistoryRequest = protos.GetInstanceHistoryRequest - GetInstanceHistoryResponse = protos.GetInstanceHistoryResponse + HistoryEvent = protos.HistoryEvent + TaskFailureDetails = protos.TaskFailureDetails + WorkflowState = protos.WorkflowState + CreateWorkflowInstanceRequest = protos.CreateWorkflowInstanceRequest + ActivityRequest = protos.ActivityRequest + WorkflowMetadata = protos.WorkflowMetadata + OrchestrationStatus = protos.OrchestrationStatus + BackendWorkflowStateMetadata = protos.BackendWorkflowStateMetadata + DurableTimer = protos.DurableTimer + WorkflowRuntimeState = protos.WorkflowRuntimeState + WorkflowRuntimeStateMessage = protos.WorkflowRuntimeStateMessage + RerunWorkflowFromEventRequest = protos.RerunWorkflowFromEventRequest + ListInstanceIDsRequest = protos.ListInstanceIDsRequest + ListInstanceIDsResponse = protos.ListInstanceIDsResponse + GetInstanceHistoryRequest = protos.GetInstanceHistoryRequest + GetInstanceHistoryResponse = protos.GetInstanceHistoryResponse ) type Backend interface { diff --git a/backend/client.go b/backend/client.go index 3f29ef7d..f7c0e624 100644 --- a/backend/client.go +++ b/backend/client.go @@ -27,6 +27,23 @@ type TaskHubClient interface { ResumeWorkflow(ctx context.Context, id api.InstanceID, reason string) error PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error RerunWorkflowFromEvent(ctx context.Context, source api.InstanceID, eventID uint32, opts ...api.RerunOptions) (api.InstanceID, error) + + // Deprecated: Use ScheduleNewWorkflow instead. + ScheduleNewOrchestration(ctx context.Context, workflow interface{}, opts ...api.NewWorkflowOptions) (api.InstanceID, error) + // Deprecated: Use FetchWorkflowMetadata instead. + FetchOrchestrationMetadata(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) + // Deprecated: Use WaitForWorkflowStart instead. + WaitForOrchestrationStart(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) + // Deprecated: Use WaitForWorkflowCompletion instead. + WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) + // Deprecated: Use TerminateWorkflow instead. + TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error + // Deprecated: Use SuspendWorkflow instead. + SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) error + // Deprecated: Use ResumeWorkflow instead. + ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) error + // Deprecated: Use PurgeWorkflowState instead. + PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error } type backendClient struct { diff --git a/backend/deprecated.go b/backend/deprecated.go index 64113f9b..c0865395 100644 --- a/backend/deprecated.go +++ b/backend/deprecated.go @@ -1,6 +1,11 @@ package backend -import "github.com/dapr/durabletask-go/api/protos" +import ( + "context" + + "github.com/dapr/durabletask-go/api" + "github.com/dapr/durabletask-go/api/protos" +) // This file contains deprecated aliases for backward compatibility. // TODO: rm in a future release @@ -21,5 +26,46 @@ type OrchestrationMetadata = WorkflowMetadata type WorkflowStateMetadata = BackendWorkflowStateMetadata // Deprecated: Use protos.BackendWorkflowState instead. -// This was the old backend WorkflowState with Inbox/History/Generation fields. type BackendWorkflowState = protos.BackendWorkflowState + +// --- Deprecated methods on backendClient for TaskHubClient interface --- + +// Deprecated: Use ScheduleNewWorkflow instead. +func (c *backendClient) ScheduleNewOrchestration(ctx context.Context, workflow interface{}, opts ...api.NewWorkflowOptions) (api.InstanceID, error) { + return c.ScheduleNewWorkflow(ctx, workflow, opts...) +} + +// Deprecated: Use FetchWorkflowMetadata instead. +func (c *backendClient) FetchOrchestrationMetadata(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { + return c.FetchWorkflowMetadata(ctx, id) +} + +// Deprecated: Use WaitForWorkflowStart instead. +func (c *backendClient) WaitForOrchestrationStart(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { + return c.WaitForWorkflowStart(ctx, id) +} + +// Deprecated: Use WaitForWorkflowCompletion instead. +func (c *backendClient) WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) { + return c.WaitForWorkflowCompletion(ctx, id) +} + +// Deprecated: Use TerminateWorkflow instead. +func (c *backendClient) TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error { + return c.TerminateWorkflow(ctx, id, opts...) +} + +// Deprecated: Use SuspendWorkflow instead. +func (c *backendClient) SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) error { + return c.SuspendWorkflow(ctx, id, reason) +} + +// Deprecated: Use ResumeWorkflow instead. +func (c *backendClient) ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) error { + return c.ResumeWorkflow(ctx, id, reason) +} + +// Deprecated: Use PurgeWorkflowState instead. +func (c *backendClient) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { + return c.PurgeWorkflowState(ctx, id, opts...) +} diff --git a/backend/executor.go b/backend/executor.go index d22f1d30..aa07b1d6 100644 --- a/backend/executor.go +++ b/backend/executor.go @@ -48,7 +48,7 @@ type grpcExecutor struct { protos.UnimplementedTaskHubSidecarServiceServer workItemQueue chan *protos.WorkItem - pendingWorkflows *sync.Map // map[api.InstanceID]*pendingWorkflow + pendingWorkflows *sync.Map // map[api.InstanceID]*pendingWorkflow pendingActivities *sync.Map // map[string]*pendingActivity backend Backend logger Logger @@ -106,11 +106,11 @@ func WithSkipWaitForInstanceStart() grpcExecutorOptions { // NewGrpcExecutor returns the Executor object and a method to invoke to register the gRPC server in the executor. func NewGrpcExecutor(be Backend, logger Logger, opts ...grpcExecutorOptions) (executor Executor, registerServerFn func(grpcServer grpc.ServiceRegistrar)) { grpcExecutor := &grpcExecutor{ - workItemQueue: make(chan *protos.WorkItem), - backend: be, - logger: logger, - pendingWorkflows: &sync.Map{}, - pendingActivities: &sync.Map{}, + workItemQueue: make(chan *protos.WorkItem), + backend: be, + logger: logger, + pendingWorkflows: &sync.Map{}, + pendingActivities: &sync.Map{}, } for _, opt := range opts { @@ -173,13 +173,13 @@ func (executor *grpcExecutor) ExecuteActivity(ctx context.Context, iid api.Insta task := e.GetTaskScheduled() req := &protos.ActivityRequest{ - Name: task.Name, - Version: task.Version, - Input: task.Input, - WorkflowInstance: &protos.WorkflowInstance{InstanceId: string(iid)}, - TaskId: e.EventId, - TaskExecutionId: task.TaskExecutionId, - ParentTraceContext: task.ParentTraceContext, + Name: task.Name, + Version: task.Version, + Input: task.Input, + WorkflowInstance: &protos.WorkflowInstance{InstanceId: string(iid)}, + TaskId: e.EventId, + TaskExecutionId: task.TaskExecutionId, + ParentTraceContext: task.ParentTraceContext, } workItem := &protos.WorkItem{ Request: &protos.WorkItem_ActivityRequest{ @@ -672,7 +672,7 @@ func createGetInstanceResponse(req *protos.GetInstanceRequest, metadata *Workflo state := &protos.WorkflowState{ InstanceId: req.InstanceId, Name: metadata.Name, - WorkflowStatus: metadata.RuntimeStatus, + WorkflowStatus: metadata.RuntimeStatus, CreatedTimestamp: metadata.CreatedAt, LastUpdatedTimestamp: metadata.LastUpdatedAt, } @@ -686,4 +686,3 @@ func createGetInstanceResponse(req *protos.GetInstanceRequest, metadata *Workflo return &protos.GetInstanceResponse{Exists: true, WorkflowState: state} } - diff --git a/backend/local/task.go b/backend/local/task.go index 5f957792..b4029951 100644 --- a/backend/local/task.go +++ b/backend/local/task.go @@ -20,14 +20,14 @@ type pendingActivity struct { } type TasksBackend struct { - pendingWorkflows *sync.Map - pendingActivities *sync.Map + pendingWorkflows *sync.Map + pendingActivities *sync.Map } func NewTasksBackend() *TasksBackend { return &TasksBackend{ - pendingWorkflows: &sync.Map{}, - pendingActivities: &sync.Map{}, + pendingWorkflows: &sync.Map{}, + pendingActivities: &sync.Map{}, } } diff --git a/backend/postgres/postgres.go b/backend/postgres/postgres.go index c4a0ab31..61e7c77d 100644 --- a/backend/postgres/postgres.go +++ b/backend/postgres/postgres.go @@ -35,9 +35,9 @@ var emptyString string = "" var errNoWorkItems = errors.New("no work items were found") type PostgresOptions struct { - PgOptions *pgxpool.Config + PgOptions *pgxpool.Config WorkflowLockTimeout time.Duration - ActivityLockTimeout time.Duration + ActivityLockTimeout time.Duration } type postgresBackend struct { @@ -60,9 +60,9 @@ func NewPostgresOptions(host string, port uint16, database string, user string, conf.MaxConns = 1 return &PostgresOptions{ - PgOptions: conf, + PgOptions: conf, WorkflowLockTimeout: 2 * time.Minute, - ActivityLockTimeout: 2 * time.Minute, + ActivityLockTimeout: 2 * time.Minute, } } diff --git a/backend/runtimestate/applier.go b/backend/runtimestate/applier.go index 2c9af888..4005ff13 100644 --- a/backend/runtimestate/applier.go +++ b/backend/runtimestate/applier.go @@ -87,8 +87,8 @@ func (a *Applier) Actions(s *protos.WorkflowRuntimeState, customStatus *wrappers EventType: &protos.HistoryEvent_ExecutionCompleted{ ExecutionCompleted: &protos.ExecutionCompletedEvent{ WorkflowStatus: completedAction.WorkflowStatus, - Result: completedAction.Result, - FailureDetails: completedAction.FailureDetails, + Result: completedAction.Result, + FailureDetails: completedAction.FailureDetails, }, }, Router: action.Router, @@ -209,10 +209,10 @@ func (a *Applier) Actions(s *protos.WorkflowRuntimeState, customStatus *wrappers ExecutionStarted: &protos.ExecutionStartedEvent{ Name: createSO.Name, ParentInstance: &protos.ParentInstanceInfo{ - TaskScheduledId: action.Id, - Name: wrapperspb.String(s.StartEvent.Name), + TaskScheduledId: action.Id, + Name: wrapperspb.String(s.StartEvent.Name), WorkflowInstance: &protos.WorkflowInstance{InstanceId: string(s.InstanceId)}, - AppID: ptr.Of(action.Router.GetSourceAppID()), + AppID: ptr.Of(action.Router.GetSourceAppID()), }, Input: createSO.Input, WorkflowInstance: &protos.WorkflowInstance{ diff --git a/backend/sqlite/sqlite.go b/backend/sqlite/sqlite.go index 8f93c292..f886b706 100644 --- a/backend/sqlite/sqlite.go +++ b/backend/sqlite/sqlite.go @@ -36,8 +36,8 @@ var errNoWorkItems = errors.New("no work items were found") type SqliteOptions struct { WorkflowLockTimeout time.Duration - ActivityLockTimeout time.Duration - FilePath string + ActivityLockTimeout time.Duration + FilePath string } type sqliteBackend struct { @@ -55,9 +55,9 @@ type sqliteBackend struct { func NewSqliteOptions(filePath string) *SqliteOptions { // Default values are provided for required options return &SqliteOptions{ - FilePath: filePath, + FilePath: filePath, WorkflowLockTimeout: 2 * time.Minute, - ActivityLockTimeout: 2 * time.Minute, + ActivityLockTimeout: 2 * time.Minute, } } @@ -509,7 +509,6 @@ func insertOrIgnoreInstanceTableInternal(ctx context.Context, tx *sql.Tx, e *bac return rows, nil } - func isStatusMatch(statuses []protos.OrchestrationStatus, runtimeStatus protos.OrchestrationStatus) bool { for _, status := range statuses { if status == runtimeStatus { diff --git a/backend/taskhub.go b/backend/taskhub.go index df9b0ec6..193c5ef2 100644 --- a/backend/taskhub.go +++ b/backend/taskhub.go @@ -14,18 +14,18 @@ type TaskHubWorker interface { } type taskHubWorker struct { - backend Backend + backend Backend workflowWorker TaskWorker[*WorkflowWorkItem] - activityWorker TaskWorker[*ActivityWorkItem] - logger Logger + activityWorker TaskWorker[*ActivityWorkItem] + logger Logger } func NewTaskHubWorker(be Backend, workflowWorker TaskWorker[*WorkflowWorkItem], activityWorker TaskWorker[*ActivityWorkItem], logger Logger) TaskHubWorker { return &taskHubWorker{ - backend: be, + backend: be, workflowWorker: workflowWorker, - activityWorker: activityWorker, - logger: logger, + activityWorker: activityWorker, + logger: logger, } } diff --git a/client/worker_grpc.go b/client/worker_grpc.go index cf68d8f3..2fc6417c 100644 --- a/client/worker_grpc.go +++ b/client/worker_grpc.go @@ -176,7 +176,7 @@ func (c *TaskHubGrpcClient) processWorkflowWorkItem( WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ CompleteWorkflow: &protos.CompleteWorkflowAction{ WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_FAILED, - Result: wrapperspb.String("An internal error occurred while executing the orchestration."), + Result: wrapperspb.String("An internal error occurred while executing the orchestration."), FailureDetails: &protos.TaskFailureDetails{ ErrorType: fmt.Sprintf("%T", err), ErrorMessage: err.Error(), diff --git a/task/activity.go b/task/activity.go index 47eba9a6..a9970220 100644 --- a/task/activity.go +++ b/task/activity.go @@ -154,4 +154,4 @@ func (actx *activityContext) GetTaskExecutionID() string { func (actx *activityContext) GetTraceContext() *protos.TraceContext { return actx.TraceContext -} \ No newline at end of file +} diff --git a/task/orchestrator.go b/task/orchestrator.go index 66cefff9..553fff6a 100644 --- a/task/orchestrator.go +++ b/task/orchestrator.go @@ -865,8 +865,8 @@ func (ctx *WorkflowContext) setCompleteInternal( WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ CompleteWorkflow: &protos.CompleteWorkflowAction{ WorkflowStatus: status, - Result: rawResult, - FailureDetails: failureDetails, + Result: rawResult, + FailureDetails: failureDetails, }, }, } diff --git a/task/registry.go b/task/registry.go index 155c39ca..116d758e 100644 --- a/task/registry.go +++ b/task/registry.go @@ -11,14 +11,14 @@ type TaskRegistry struct { workflows map[string]Workflow versionedWorkflows map[string]map[string]Workflow latestVersionedWorkflows map[string]string - activities map[string]Activity + activities map[string]Activity } // NewTaskRegistry returns a new [TaskRegistry] struct. func NewTaskRegistry() *TaskRegistry { r := &TaskRegistry{ workflows: make(map[string]Workflow), - activities: make(map[string]Activity), + activities: make(map[string]Activity), versionedWorkflows: make(map[string]map[string]Workflow), latestVersionedWorkflows: make(map[string]string), } diff --git a/task/task.go b/task/task.go index 236632bb..86e2a78b 100644 --- a/task/task.go +++ b/task/task.go @@ -23,7 +23,7 @@ type Task interface { } type completableTask struct { - workflowCtx *WorkflowContext + workflowCtx *WorkflowContext isCompleted bool isCanceled bool rawResult []byte diff --git a/tests/backend_test.go b/tests/backend_test.go index d99d1fc9..b87cde1e 100644 --- a/tests/backend_test.go +++ b/tests/backend_test.go @@ -375,7 +375,7 @@ func Test_PurgeWorkflowState(t *testing.T) { WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ CompleteWorkflow: &protos.CompleteWorkflowAction{ WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, - Result: wrapperspb.String(expectedResult), + Result: wrapperspb.String(expectedResult), }, }, }} @@ -486,9 +486,9 @@ func createWorkflowInstance(t assert.TestingT, be backend.Backend, instanceID st Timestamp: timestamppb.New(time.Now()), EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ - Name: defaultName, + Name: defaultName, WorkflowInstance: &protos.WorkflowInstance{InstanceId: instanceID}, - Input: wrapperspb.String(defaultInput), + Input: wrapperspb.String(defaultInput), }, }, } diff --git a/tests/runtimestate_test.go b/tests/runtimestate_test.go index 6f98a2c4..e8d97343 100644 --- a/tests/runtimestate_test.go +++ b/tests/runtimestate_test.go @@ -25,7 +25,7 @@ func Test_NewWorkflow(t *testing.T) { EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ WorkflowInstance: &protos.WorkflowInstance{InstanceId: iid}, - Name: expectedName, + Name: expectedName, }, }, } @@ -70,7 +70,7 @@ func Test_CompletedWorkflow(t *testing.T) { EventType: &protos.HistoryEvent_ExecutionStarted{ ExecutionStarted: &protos.ExecutionStartedEvent{ WorkflowInstance: &protos.WorkflowInstance{InstanceId: iid}, - Name: expectedName, + Name: expectedName, }, }, }, { @@ -126,8 +126,8 @@ func Test_CompletedChildWorkflow(t *testing.T) { ExecutionId: wrapperspb.String(uuid.New().String()), }, ParentInstance: &protos.ParentInstanceInfo{ - TaskScheduledId: expectedTaskID, - Name: wrapperspb.String("Parent"), + TaskScheduledId: expectedTaskID, + Name: wrapperspb.String("Parent"), WorkflowInstance: &protos.WorkflowInstance{InstanceId: "parent_id"}, }, }, @@ -140,9 +140,9 @@ func Test_CompletedChildWorkflow(t *testing.T) { Id: expectedTaskID, WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ CompleteWorkflow: &protos.CompleteWorkflowAction{ - WorkflowStatus: status, - Result: wrapperspb.String(expectedOutput), - CarryoverEvents: []*protos.HistoryEvent{}, + WorkflowStatus: status, + Result: wrapperspb.String(expectedOutput), + CarryoverEvents: []*protos.HistoryEvent{}, }, }, }, @@ -210,9 +210,9 @@ func Test_RuntimeState_ContinueAsNew(t *testing.T) { Id: expectedTaskID, WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ CompleteWorkflow: &protos.CompleteWorkflowAction{ - WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW, - Result: wrapperspb.String(continueAsNewInput), - CarryoverEvents: carryoverEvents, + WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_CONTINUED_AS_NEW, + Result: wrapperspb.String(continueAsNewInput), + CarryoverEvents: carryoverEvents, }, }, }, diff --git a/tests/worker_test.go b/tests/worker_test.go index 9055675f..951bc4e4 100644 --- a/tests/worker_test.go +++ b/tests/worker_test.go @@ -204,7 +204,7 @@ func Test_TryProcessSingleWorkflowWorkItem_ExecutionStartedAndCompleted(t *testi WorkflowActionType: &protos.WorkflowAction_CompleteWorkflow{ CompleteWorkflow: &protos.CompleteWorkflowAction{ WorkflowStatus: protos.OrchestrationStatus_ORCHESTRATION_STATUS_COMPLETED, - Result: wrapperspb.String(resultValue), + Result: wrapperspb.String(resultValue), }, }, }, From 2d68e336b53a72d82f92b3d317fc7ace136cf621 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 2 Apr 2026 11:57:28 -0500 Subject: [PATCH 11/12] header Signed-off-by: Cassandra Coyle --- api/deprecated.go | 13 +++++++++++++ api/protos/deprecated.go | 13 +++++++++++++ backend/client.go | 17 ----------------- backend/deprecated.go | 13 +++++++++++++ backend/runtimestate/applier.go | 13 +++++++++++++ backend/runtimestate/deprecated.go | 13 +++++++++++++ client/deprecated.go | 13 +++++++++++++ task/deprecated.go | 13 +++++++++++++ 8 files changed, 91 insertions(+), 17 deletions(-) diff --git a/api/deprecated.go b/api/deprecated.go index 41b65e71..cced196e 100644 --- a/api/deprecated.go +++ b/api/deprecated.go @@ -1,3 +1,16 @@ +/* +Copyright 2026 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package api import ( diff --git a/api/protos/deprecated.go b/api/protos/deprecated.go index 70ab78fd..e6e502b8 100644 --- a/api/protos/deprecated.go +++ b/api/protos/deprecated.go @@ -1,3 +1,16 @@ +/* +Copyright 2026 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package protos import "google.golang.org/protobuf/types/known/wrapperspb" diff --git a/backend/client.go b/backend/client.go index f7c0e624..3f29ef7d 100644 --- a/backend/client.go +++ b/backend/client.go @@ -27,23 +27,6 @@ type TaskHubClient interface { ResumeWorkflow(ctx context.Context, id api.InstanceID, reason string) error PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error RerunWorkflowFromEvent(ctx context.Context, source api.InstanceID, eventID uint32, opts ...api.RerunOptions) (api.InstanceID, error) - - // Deprecated: Use ScheduleNewWorkflow instead. - ScheduleNewOrchestration(ctx context.Context, workflow interface{}, opts ...api.NewWorkflowOptions) (api.InstanceID, error) - // Deprecated: Use FetchWorkflowMetadata instead. - FetchOrchestrationMetadata(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) - // Deprecated: Use WaitForWorkflowStart instead. - WaitForOrchestrationStart(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) - // Deprecated: Use WaitForWorkflowCompletion instead. - WaitForOrchestrationCompletion(ctx context.Context, id api.InstanceID) (*WorkflowMetadata, error) - // Deprecated: Use TerminateWorkflow instead. - TerminateOrchestration(ctx context.Context, id api.InstanceID, opts ...api.TerminateOptions) error - // Deprecated: Use SuspendWorkflow instead. - SuspendOrchestration(ctx context.Context, id api.InstanceID, reason string) error - // Deprecated: Use ResumeWorkflow instead. - ResumeOrchestration(ctx context.Context, id api.InstanceID, reason string) error - // Deprecated: Use PurgeWorkflowState instead. - PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error } type backendClient struct { diff --git a/backend/deprecated.go b/backend/deprecated.go index c0865395..c70d35f1 100644 --- a/backend/deprecated.go +++ b/backend/deprecated.go @@ -1,3 +1,16 @@ +/* +Copyright 2026 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package backend import ( diff --git a/backend/runtimestate/applier.go b/backend/runtimestate/applier.go index 4005ff13..a125049f 100644 --- a/backend/runtimestate/applier.go +++ b/backend/runtimestate/applier.go @@ -1,3 +1,16 @@ +/* +Copyright 2026 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package runtimestate import ( diff --git a/backend/runtimestate/deprecated.go b/backend/runtimestate/deprecated.go index 1c31d799..1f260940 100644 --- a/backend/runtimestate/deprecated.go +++ b/backend/runtimestate/deprecated.go @@ -1,3 +1,16 @@ +/* +Copyright 2026 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package runtimestate import ( diff --git a/client/deprecated.go b/client/deprecated.go index 87c968e6..379020c6 100644 --- a/client/deprecated.go +++ b/client/deprecated.go @@ -1,3 +1,16 @@ +/* +Copyright 2026 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package client import ( diff --git a/task/deprecated.go b/task/deprecated.go index 8d2fadc9..c3779e2f 100644 --- a/task/deprecated.go +++ b/task/deprecated.go @@ -1,3 +1,16 @@ +/* +Copyright 2026 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package task import "google.golang.org/protobuf/types/known/wrapperspb" From f4c14868491dcaf45b06655993387767f4b0a1a2 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 6 Apr 2026 09:48:33 -0500 Subject: [PATCH 12/12] PR feedback Signed-off-by: Cassandra Coyle --- client/client_grpc.go | 2 +- samples/azurefunctions/main.go | 2 +- task/deprecated.go | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/client_grpc.go b/client/client_grpc.go index b1289681..3ab33df4 100644 --- a/client/client_grpc.go +++ b/client/client_grpc.go @@ -198,7 +198,7 @@ func (c *TaskHubGrpcClient) ResumeWorkflow(ctx context.Context, id api.InstanceI // PurgeWorkflowState deletes the state of the specified workflow instance. // -// [api.api.ErrInstanceNotFound] is returned if the specified workflow instance doesn't exist. +// [api.ErrInstanceNotFound] is returned if the specified workflow instance doesn't exist. func (c *TaskHubGrpcClient) PurgeWorkflowState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { req := &protos.PurgeInstancesRequest{ Request: &protos.PurgeInstancesRequest_InstanceId{InstanceId: string(id)}, diff --git a/samples/azurefunctions/main.go b/samples/azurefunctions/main.go index c41827f4..be2b134c 100644 --- a/samples/azurefunctions/main.go +++ b/samples/azurefunctions/main.go @@ -9,7 +9,7 @@ import ( "github.com/dapr/durabletask-go/task" ) -// HelloCities is an workflow function that generates a "hello" message for several cities. +// HelloCities is a workflow function that generates a "hello" message for several cities. func HelloCities(ctx *task.WorkflowContext) (any, error) { var helloTokyo string if err := ctx.CallActivity(SayHello, task.WithActivityInput("Tokyo")).Await(&helloTokyo); err != nil { diff --git a/task/deprecated.go b/task/deprecated.go index c3779e2f..5118bf42 100644 --- a/task/deprecated.go +++ b/task/deprecated.go @@ -27,6 +27,11 @@ type Orchestrator = Workflow // Deprecated: Use ChildWorkflowOption instead. type SubOrchestratorOption = ChildWorkflowOption +// Deprecated: Use AddWorkflow instead. +func (r *TaskRegistry) AddOrchestrator(o Workflow) error { + return r.AddWorkflow(o) +} + // Deprecated: Use AddWorkflowN instead. func (r *TaskRegistry) AddOrchestratorN(name string, o Workflow) error { return r.AddWorkflowN(name, o)