diff --git a/aggregator/rpc_server.go b/aggregator/rpc_server.go index e21c907..8d34b33 100644 --- a/aggregator/rpc_server.go +++ b/aggregator/rpc_server.go @@ -177,7 +177,7 @@ func (r *RpcServer) ListExecutions(ctx context.Context, payload *avsproto.ListEx return r.engine.ListExecutions(user, payload) } -func (r *RpcServer) GetExecution(ctx context.Context, payload *avsproto.GetExecutionReq) (*avsproto.GetExecutionResp, error) { +func (r *RpcServer) GetExecution(ctx context.Context, payload *avsproto.ExecutionReq) (*avsproto.Execution, error) { user, err := r.verifyAuth(ctx) if err != nil { return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.AuthenticationError, err.Error()) @@ -191,6 +191,20 @@ func (r *RpcServer) GetExecution(ctx context.Context, payload *avsproto.GetExecu return r.engine.GetExecution(user, payload) } +func (r *RpcServer) GetExecutionStatus(ctx context.Context, payload *avsproto.ExecutionReq) (*avsproto.ExecutionStatusResp, error) { + user, err := r.verifyAuth(ctx) + if err != nil { + return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.AuthenticationError, err.Error()) + } + + r.config.Logger.Info("process get execution", + "user", user.Address.String(), + "task_id", payload.TaskId, + "execution_id", payload.ExecutionId, + ) + return r.engine.GetExecutionStatus(user, payload) +} + func (r *RpcServer) GetTask(ctx context.Context, payload *avsproto.IdReq) (*avsproto.Task, error) { user, err := r.verifyAuth(ctx) if err != nil { diff --git a/core/taskengine/engine.go b/core/taskengine/engine.go index 667c88b..bcec9be 100644 --- a/core/taskengine/engine.go +++ b/core/taskengine/engine.go @@ -706,11 +706,11 @@ func (n *Engine) ListExecutions(user *model.User, payload *avsproto.ListExecutio } func (n *Engine) setExecutionStatusQueue(task *model.Task, executionID string) error { - status := strconv.Itoa(int(avsproto.GetExecutionResp_Queue)) + status := strconv.Itoa(int(avsproto.ExecutionStatus_Queued)) return n.db.Set(TaskTriggerKey(task, executionID), []byte(status)) } -func (n *Engine) getExecutonStatusFromQueue(task *model.Task, executionID string) (*avsproto.GetExecutionResp_ExecutionStatus, error) { +func (n *Engine) getExecutonStatusFromQueue(task *model.Task, executionID string) (*avsproto.ExecutionStatus, error) { status, err := n.db.GetKey(TaskTriggerKey(task, executionID)) if err != nil { return nil, err @@ -720,12 +720,12 @@ func (n *Engine) getExecutonStatusFromQueue(task *model.Task, executionID string if err != nil { return nil, err } - statusValue := avsproto.GetExecutionResp_ExecutionStatus(value) + statusValue := avsproto.ExecutionStatus(value) return &statusValue, nil } // Get xecution for a given task id and execution id -func (n *Engine) GetExecution(user *model.User, payload *avsproto.GetExecutionReq) (*avsproto.GetExecutionResp, error) { +func (n *Engine) GetExecution(user *model.User, payload *avsproto.ExecutionReq) (*avsproto.Execution, error) { // Validate all tasks own by the caller, if there are any tasks won't be owned by caller, we return permission error task, err := n.GetTaskByID(payload.TaskId) @@ -739,12 +739,6 @@ func (n *Engine) GetExecution(user *model.User, payload *avsproto.GetExecutionRe executionValue, err := n.db.GetKey(TaskExecutionKey(task, payload.ExecutionId)) if err != nil { - // When execution not found, it could be in pending status, we will check that storage - if status, err := n.getExecutonStatusFromQueue(task, payload.ExecutionId); err == nil { - return &avsproto.GetExecutionResp{ - Status: *status, - }, nil - } return nil, grpcstatus.Errorf(codes.NotFound, ExecutionNotFoundError) } exec := avsproto.Execution{} @@ -763,11 +757,36 @@ func (n *Engine) GetExecution(user *model.User, payload *avsproto.GetExecutionRe } } - result := &avsproto.GetExecutionResp{ - Status: avsproto.GetExecutionResp_Completed, - Data: &exec, + return &exec, nil +} + +func (n *Engine) GetExecutionStatus(user *model.User, payload *avsproto.ExecutionReq) (*avsproto.ExecutionStatusResp, error) { + task, err := n.GetTaskByID(payload.TaskId) + + if err != nil { + return nil, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) } - return result, nil + + if !task.OwnedBy(user.Address) { + return nil, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) + } + + // First look into execution first + if _, err = n.db.GetKey(TaskExecutionKey(task, payload.ExecutionId)); err != nil { + // When execution not found, it could be in pending status, we will check that storage + if status, err := n.getExecutonStatusFromQueue(task, payload.ExecutionId); err == nil { + return &avsproto.ExecutionStatusResp{ + Status: *status, + }, nil + } + return nil, fmt.Errorf("invalid ") + } + + // if the key existed, the execution has finished, no need to decode the whole storage, we just return the status in this call + return &avsproto.ExecutionStatusResp{ + Status: avsproto.ExecutionStatus_Finished, + }, nil + } func (n *Engine) DeleteTaskByUser(user *model.User, taskID string) (bool, error) { diff --git a/core/taskengine/engine_test.go b/core/taskengine/engine_test.go index 724c4c9..1921ae3 100644 --- a/core/taskengine/engine_test.go +++ b/core/taskengine/engine_test.go @@ -208,22 +208,22 @@ func TestGetExecution(t *testing.T) { IsBlocking: true, }) - // Now get back that exectuon id - execution, err := n.GetExecution(testutil.TestUser1(), &avsproto.GetExecutionReq{ + // Now get back that execution data using the log + execution, err := n.GetExecution(testutil.TestUser1(), &avsproto.ExecutionReq{ TaskId: result.Id, ExecutionId: resultTrigger.ExecutionId, }) - if execution.Data.Id != resultTrigger.ExecutionId { - t.Errorf("invalid execution id. expect %s got %s", resultTrigger.ExecutionId, execution.Data.Id) + if execution.Id != resultTrigger.ExecutionId { + t.Errorf("invalid execution id. expect %s got %s", resultTrigger.ExecutionId, execution.Id) } - if execution.Data.TriggerMetadata.BlockNumber != 101 { - t.Errorf("invalid triggered block. expect 101 got %d", execution.Data.TriggerMetadata.BlockNumber) + if execution.TriggerMetadata.BlockNumber != 101 { + t.Errorf("invalid triggered block. expect 101 got %d", execution.TriggerMetadata.BlockNumber) } // Another user cannot get this executin id - execution, err = n.GetExecution(testutil.TestUser2(), &avsproto.GetExecutionReq{ + execution, err = n.GetExecution(testutil.TestUser2(), &avsproto.ExecutionReq{ TaskId: result.Id, ExecutionId: resultTrigger.ExecutionId, }) @@ -318,21 +318,17 @@ func TestTriggerSync(t *testing.T) { } // Now get back that execution id - execution, err := n.GetExecution(testutil.TestUser1(), &avsproto.GetExecutionReq{ + execution, err := n.GetExecution(testutil.TestUser1(), &avsproto.ExecutionReq{ TaskId: result.Id, ExecutionId: resultTrigger.ExecutionId, }) - if execution.Status != avsproto.GetExecutionResp_Completed { - t.Errorf("invalid execution status, expected conpleted but got %s", avsproto.GetExecutionResp_ExecutionStatus_name[int32(execution.Status)]) + if execution.Id != resultTrigger.ExecutionId { + t.Errorf("invalid execution id. expect %s got %s", resultTrigger.ExecutionId, execution.Id) } - if execution.Data.Id != resultTrigger.ExecutionId { - t.Errorf("invalid execution id. expect %s got %s", resultTrigger.ExecutionId, execution.Data.Id) - } - - if execution.Data.TriggerMetadata.BlockNumber != 101 { - t.Errorf("invalid triggered block. expect 101 got %d", execution.Data.TriggerMetadata.BlockNumber) + if execution.TriggerMetadata.BlockNumber != 101 { + t.Errorf("invalid triggered block. expect 101 got %d", execution.TriggerMetadata.BlockNumber) } } @@ -374,43 +370,46 @@ func TestTriggerAsync(t *testing.T) { // Now get back that execution id, because the task is run async we won't have any data yet, // just the status for now - execution, err := n.GetExecution(testutil.TestUser1(), &avsproto.GetExecutionReq{ + executionStatus, err := n.GetExecutionStatus(testutil.TestUser1(), &avsproto.ExecutionReq{ TaskId: result.Id, ExecutionId: resultTrigger.ExecutionId, }) - if execution.Data != nil { - t.Errorf("malform execution result. expect no data but got %s", execution.Data) - } - - if execution.Status != avsproto.GetExecutionResp_Queue { - t.Errorf("invalid execution status, expected queue but got %s", avsproto.GetExecutionResp_ExecutionStatus_name[int32(execution.Status)]) + if executionStatus.Status != avsproto.ExecutionStatus_Queued { + t.Errorf("invalid execution status, expected queue but got %s", avsproto.TaskStatus_name[int32(executionStatus.Status)]) } // Now let the queue start and process job // In our end to end system the worker will process the job eventually worker.ProcessSignal(1) - execution, err = n.GetExecution(testutil.TestUser1(), &avsproto.GetExecutionReq{ + execution, err := n.GetExecution(testutil.TestUser1(), &avsproto.ExecutionReq{ TaskId: result.Id, ExecutionId: resultTrigger.ExecutionId, }) - if execution.Status != avsproto.GetExecutionResp_Completed { - t.Errorf("invalid execution status, expected completed but got %s", avsproto.GetExecutionResp_ExecutionStatus_name[int32(execution.Status)]) - } - if execution.Data.Id != resultTrigger.ExecutionId { - t.Errorf("wring execution id, expected %s got %s", resultTrigger.ExecutionId, execution.Data.Id) + if execution.Id != resultTrigger.ExecutionId { + t.Errorf("wring execution id, expected %s got %s", resultTrigger.ExecutionId, execution.Id) } - if !execution.Data.Success { + if !execution.Success { t.Errorf("wrong success result, expected true got false") } - if execution.Data.Steps[0].NodeId != "ping1" { + if execution.Steps[0].NodeId != "ping1" { t.Errorf("wrong node id in execution log") } - if !strings.Contains(execution.Data.Steps[0].OutputData, "httpbin.org") { + if !strings.Contains(execution.Steps[0].OutputData, "httpbin.org") { t.Error("Invalid output data") } + + // If we get the status back it also reflected + executionStatus, err = n.GetExecutionStatus(testutil.TestUser1(), &avsproto.ExecutionReq{ + TaskId: result.Id, + ExecutionId: resultTrigger.ExecutionId, + }) + + if executionStatus.Status != avsproto.ExecutionStatus_Finished { + t.Errorf("invalid execution status, expected completed but got %s", avsproto.TaskStatus_name[int32(executionStatus.Status)]) + } } diff --git a/core/taskengine/executor.go b/core/taskengine/executor.go index 4c57b59..1111b85 100644 --- a/core/taskengine/executor.go +++ b/core/taskengine/executor.go @@ -76,6 +76,11 @@ func (x *TaskExecutor) Perform(job *apqueue.Job) error { } func (x *TaskExecutor) RunTask(task *model.Task, queueData *QueueExecutionData) (*avsproto.Execution, error) { + defer func() { + // Delete the task trigger queue when we're done, the execution log is available in main task storage at this point + x.db.GetKey(TaskTriggerKey(task, queueData.ExecutionID)) + }() + if queueData == nil || queueData.ExecutionID == "" { return nil, fmt.Errorf("internal error: invalid execution id") } diff --git a/protobuf/avs.pb.go b/protobuf/avs.pb.go index 39aef13..b6de161 100644 --- a/protobuf/avs.pb.go +++ b/protobuf/avs.pb.go @@ -101,7 +101,8 @@ func (Error) EnumDescriptor() ([]byte, []int) { type TaskStatus int32 const ( - TaskStatus_Active TaskStatus = 0 + TaskStatus_Active TaskStatus = 0 + // Task is completd when it's reaching its max_execution or its expiration time TaskStatus_Completed TaskStatus = 1 TaskStatus_Failed TaskStatus = 2 TaskStatus_Canceled TaskStatus = 3 @@ -153,96 +154,94 @@ func (TaskStatus) EnumDescriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{1} } -type CustomCodeLang int32 +// Execution Status re-present a run of the task +type ExecutionStatus int32 const ( - CustomCodeLang_JavaScript CustomCodeLang = 0 + ExecutionStatus_Queued ExecutionStatus = 0 + ExecutionStatus_Finished ExecutionStatus = 2 ) -// Enum value maps for CustomCodeLang. +// Enum value maps for ExecutionStatus. var ( - CustomCodeLang_name = map[int32]string{ - 0: "JavaScript", + ExecutionStatus_name = map[int32]string{ + 0: "Queued", + 2: "Finished", } - CustomCodeLang_value = map[string]int32{ - "JavaScript": 0, + ExecutionStatus_value = map[string]int32{ + "Queued": 0, + "Finished": 2, } ) -func (x CustomCodeLang) Enum() *CustomCodeLang { - p := new(CustomCodeLang) +func (x ExecutionStatus) Enum() *ExecutionStatus { + p := new(ExecutionStatus) *p = x return p } -func (x CustomCodeLang) String() string { +func (x ExecutionStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (CustomCodeLang) Descriptor() protoreflect.EnumDescriptor { +func (ExecutionStatus) Descriptor() protoreflect.EnumDescriptor { return file_protobuf_avs_proto_enumTypes[2].Descriptor() } -func (CustomCodeLang) Type() protoreflect.EnumType { +func (ExecutionStatus) Type() protoreflect.EnumType { return &file_protobuf_avs_proto_enumTypes[2] } -func (x CustomCodeLang) Number() protoreflect.EnumNumber { +func (x ExecutionStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use CustomCodeLang.Descriptor instead. -func (CustomCodeLang) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use ExecutionStatus.Descriptor instead. +func (ExecutionStatus) EnumDescriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{2} } -type GetExecutionResp_ExecutionStatus int32 +type CustomCodeLang int32 const ( - GetExecutionResp_Queue GetExecutionResp_ExecutionStatus = 0 // execution is schedule to run in our system - GetExecutionResp_Running GetExecutionResp_ExecutionStatus = 1 // execution is actively running right now - GetExecutionResp_Completed GetExecutionResp_ExecutionStatus = 2 // execution is finished. The outcome (whether the execution finished without or with error can be access by looking into the data + CustomCodeLang_JavaScript CustomCodeLang = 0 ) -// Enum value maps for GetExecutionResp_ExecutionStatus. +// Enum value maps for CustomCodeLang. var ( - GetExecutionResp_ExecutionStatus_name = map[int32]string{ - 0: "Queue", - 1: "Running", - 2: "Completed", + CustomCodeLang_name = map[int32]string{ + 0: "JavaScript", } - GetExecutionResp_ExecutionStatus_value = map[string]int32{ - "Queue": 0, - "Running": 1, - "Completed": 2, + CustomCodeLang_value = map[string]int32{ + "JavaScript": 0, } ) -func (x GetExecutionResp_ExecutionStatus) Enum() *GetExecutionResp_ExecutionStatus { - p := new(GetExecutionResp_ExecutionStatus) +func (x CustomCodeLang) Enum() *CustomCodeLang { + p := new(CustomCodeLang) *p = x return p } -func (x GetExecutionResp_ExecutionStatus) String() string { +func (x CustomCodeLang) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (GetExecutionResp_ExecutionStatus) Descriptor() protoreflect.EnumDescriptor { +func (CustomCodeLang) Descriptor() protoreflect.EnumDescriptor { return file_protobuf_avs_proto_enumTypes[3].Descriptor() } -func (GetExecutionResp_ExecutionStatus) Type() protoreflect.EnumType { +func (CustomCodeLang) Type() protoreflect.EnumType { return &file_protobuf_avs_proto_enumTypes[3] } -func (x GetExecutionResp_ExecutionStatus) Number() protoreflect.EnumNumber { +func (x CustomCodeLang) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use GetExecutionResp_ExecutionStatus.Descriptor instead. -func (GetExecutionResp_ExecutionStatus) EnumDescriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{32, 0} +// Deprecated: Use CustomCodeLang.Descriptor instead. +func (CustomCodeLang) EnumDescriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{3} } // This value isn't needed because when we query an execution or trigger a task, we know the trigger type @@ -2596,7 +2595,7 @@ func (x *ListExecutionsResp) GetHasMore() bool { return false } -type GetExecutionReq struct { +type ExecutionReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2605,8 +2604,8 @@ type GetExecutionReq struct { ExecutionId string `protobuf:"bytes,2,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` } -func (x *GetExecutionReq) Reset() { - *x = GetExecutionReq{} +func (x *ExecutionReq) Reset() { + *x = ExecutionReq{} if protoimpl.UnsafeEnabled { mi := &file_protobuf_avs_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2614,13 +2613,13 @@ func (x *GetExecutionReq) Reset() { } } -func (x *GetExecutionReq) String() string { +func (x *ExecutionReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetExecutionReq) ProtoMessage() {} +func (*ExecutionReq) ProtoMessage() {} -func (x *GetExecutionReq) ProtoReflect() protoreflect.Message { +func (x *ExecutionReq) ProtoReflect() protoreflect.Message { mi := &file_protobuf_avs_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2632,38 +2631,35 @@ func (x *GetExecutionReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetExecutionReq.ProtoReflect.Descriptor instead. -func (*GetExecutionReq) Descriptor() ([]byte, []int) { +// Deprecated: Use ExecutionReq.ProtoReflect.Descriptor instead. +func (*ExecutionReq) Descriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{31} } -func (x *GetExecutionReq) GetTaskId() string { +func (x *ExecutionReq) GetTaskId() string { if x != nil { return x.TaskId } return "" } -func (x *GetExecutionReq) GetExecutionId() string { +func (x *ExecutionReq) GetExecutionId() string { if x != nil { return x.ExecutionId } return "" } -type GetExecutionResp struct { +type ExecutionStatusResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Status GetExecutionResp_ExecutionStatus `protobuf:"varint,1,opt,name=status,proto3,enum=aggregator.GetExecutionResp_ExecutionStatus" json:"status,omitempty"` - // when the execution is queue or running, we don't have all the data yet, so this field will be null. - // when the status changed to "completed", the payload will be returned - Data *Execution `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Status ExecutionStatus `protobuf:"varint,1,opt,name=status,proto3,enum=aggregator.ExecutionStatus" json:"status,omitempty"` } -func (x *GetExecutionResp) Reset() { - *x = GetExecutionResp{} +func (x *ExecutionStatusResp) Reset() { + *x = ExecutionStatusResp{} if protoimpl.UnsafeEnabled { mi := &file_protobuf_avs_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2671,13 +2667,13 @@ func (x *GetExecutionResp) Reset() { } } -func (x *GetExecutionResp) String() string { +func (x *ExecutionStatusResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetExecutionResp) ProtoMessage() {} +func (*ExecutionStatusResp) ProtoMessage() {} -func (x *GetExecutionResp) ProtoReflect() protoreflect.Message { +func (x *ExecutionStatusResp) ProtoReflect() protoreflect.Message { mi := &file_protobuf_avs_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2689,23 +2685,16 @@ func (x *GetExecutionResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetExecutionResp.ProtoReflect.Descriptor instead. -func (*GetExecutionResp) Descriptor() ([]byte, []int) { +// Deprecated: Use ExecutionStatusResp.ProtoReflect.Descriptor instead. +func (*ExecutionStatusResp) Descriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{32} } -func (x *GetExecutionResp) GetStatus() GetExecutionResp_ExecutionStatus { +func (x *ExecutionStatusResp) GetStatus() ExecutionStatus { if x != nil { return x.Status } - return GetExecutionResp_Queue -} - -func (x *GetExecutionResp) GetData() *Execution { - if x != nil { - return x.Data - } - return nil + return ExecutionStatus_Queued } type GetKeyReq struct { @@ -3097,8 +3086,9 @@ type UserTriggerTaskResp struct { // Regardless whether it is a block or async, we always get back the same kind of id for this trigger. // The caller then make a second request to GetExecution to check for the execution status and data. // In the blocking mode, the execution_id is materialized and has been created, we can then call GetExecution on it immediately to receive result - // In async mode, the execution_id is created ahead of time and not materialized, calling GetExecution on it will return Status=Pending for example - ExecutionId string `protobuf:"bytes,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` + // In async mode, the execution_id is created ahead of time and not materialized, calling GetExecutionStatus on it will return Status=Pending for example. Once Status=Completed you can call GetExecution to get all log and detail. Call GetExecution before it is completed will result in "Execution Not Found" + ExecutionId string `protobuf:"bytes,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` + Status ExecutionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=aggregator.ExecutionStatus" json:"status,omitempty"` } func (x *UserTriggerTaskResp) Reset() { @@ -3140,6 +3130,13 @@ func (x *UserTriggerTaskResp) GetExecutionId() string { return "" } +func (x *UserTriggerTaskResp) GetStatus() ExecutionStatus { + if x != nil { + return x.Status + } + return ExecutionStatus_Queued +} + type Execution_Step struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3710,148 +3707,152 @@ var file_protobuf_avs_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x22, 0x4d, 0x0a, 0x0f, - 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, - 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xbd, 0x01, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x44, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, - 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x38, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x75, 0x65, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x02, 0x22, 0x5e, 0x0a, 0x09, 0x47, - 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1d, - 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x1b, 0x0a, 0x07, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x92, 0x02, 0x0a, 0x0f, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x53, 0x0a, 0x0b, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x73, 0x65, 0x74, - 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, 0x12, 0x0d, - 0x0a, 0x09, 0x46, 0x69, 0x78, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x10, 0x03, 0x12, 0x08, 0x0a, - 0x04, 0x43, 0x72, 0x6f, 0x6e, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, 0x06, 0x22, 0x4b, 0x0a, - 0x0c, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, 0x6c, - 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x66, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, - 0x49, 0x64, 0x12, 0x46, 0x0a, 0x10, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x74, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x38, 0x0a, 0x13, 0x55, - 0x73, 0x65, 0x72, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x2a, 0xdf, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, - 0x0f, 0x0a, 0x0b, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, - 0x12, 0x11, 0x0a, 0x0c, 0x52, 0x70, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x10, 0xe8, 0x07, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x6e, - 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xd0, 0x0f, 0x12, 0x16, 0x0a, 0x11, - 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x10, 0xd1, 0x0f, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x52, 0x70, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf0, 0x2e, 0x12, 0x1d, - 0x0a, 0x18, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x6f, 0x74, - 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf1, 0x2e, 0x12, 0x16, 0x0a, - 0x11, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, - 0x65, 0x64, 0x10, 0xd8, 0x36, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, - 0x61, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd9, 0x36, - 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x10, 0xdb, 0x36, 0x2a, 0x50, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x01, - 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x2a, 0x20, 0x0a, 0x0e, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, - 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x10, 0x00, 0x32, 0xbc, 0x06, 0x0a, 0x0a, - 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x06, 0x47, 0x65, - 0x74, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x18, - 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x00, 0x12, 0x42, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x18, - 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, - 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x45, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x19, 0x2e, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x22, 0x4a, 0x0a, 0x0c, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, + 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x5e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x22, 0x1b, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x22, 0x92, 0x02, 0x0a, 0x0f, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x53, 0x0a, 0x0b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, + 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x69, 0x78, 0x65, 0x64, + 0x54, 0x69, 0x6d, 0x65, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x6f, 0x6e, 0x10, 0x04, + 0x12, 0x09, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x10, 0x06, 0x22, 0x4b, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x66, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, + 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x12, + 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x10, 0x74, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x0f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x6d, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2a, 0xdf, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0f, 0x0a, + 0x0b, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0c, 0x52, 0x70, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xe8, + 0x07, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x6e, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xd0, 0x0f, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, + 0xd1, 0x0f, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x52, 0x70, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf0, 0x2e, 0x12, 0x1d, 0x0a, 0x18, + 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, + 0x75, 0x6e, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf1, 0x2e, 0x12, 0x16, 0x0a, 0x11, 0x54, + 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x65, 0x64, + 0x10, 0xd8, 0x36, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x4d, + 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd9, 0x36, 0x12, 0x15, + 0x0a, 0x10, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x10, 0xdb, 0x36, 0x2a, 0x50, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x2a, 0x2b, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, + 0x65, 0x64, 0x10, 0x02, 0x2a, 0x20, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, + 0x64, 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x10, 0x00, 0x32, 0x85, 0x07, 0x0a, 0x0a, 0x41, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, + 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3d, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, + 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, + 0x12, 0x46, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, + 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, - 0x73, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x30, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0e, 0x4c, 0x69, - 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x2e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4b, 0x0a, - 0x0c, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 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, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 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, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0b, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, - 0x61, 0x76, 0x73, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, + 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x00, 0x12, 0x30, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, + 0x71, 0x1a, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x47, + 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3d, + 0x0a, 0x0a, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, + 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, 0x22, 0x00, 0x12, 0x3d, 0x0a, + 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 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, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0b, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0c, + 0x5a, 0x0a, 0x2e, 0x2f, 0x61, 0x76, 0x73, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3869,56 +3870,56 @@ func file_protobuf_avs_proto_rawDescGZIP() []byte { var file_protobuf_avs_proto_enumTypes = make([]protoimpl.EnumInfo, 5) var file_protobuf_avs_proto_msgTypes = make([]protoimpl.MessageInfo, 44) var file_protobuf_avs_proto_goTypes = []interface{}{ - (Error)(0), // 0: aggregator.Error - (TaskStatus)(0), // 1: aggregator.TaskStatus - (CustomCodeLang)(0), // 2: aggregator.CustomCodeLang - (GetExecutionResp_ExecutionStatus)(0), // 3: aggregator.GetExecutionResp.ExecutionStatus - (TriggerMetadata_TriggerType)(0), // 4: aggregator.TriggerMetadata.TriggerType - (*IdReq)(nil), // 5: aggregator.IdReq - (*FixedTimeCondition)(nil), // 6: aggregator.FixedTimeCondition - (*CronCondition)(nil), // 7: aggregator.CronCondition - (*BlockCondition)(nil), // 8: aggregator.BlockCondition - (*EventCondition)(nil), // 9: aggregator.EventCondition - (*TaskTrigger)(nil), // 10: aggregator.TaskTrigger - (*ETHTransferNode)(nil), // 11: aggregator.ETHTransferNode - (*ContractWriteNode)(nil), // 12: aggregator.ContractWriteNode - (*ContractReadNode)(nil), // 13: aggregator.ContractReadNode - (*GraphQLQueryNode)(nil), // 14: aggregator.GraphQLQueryNode - (*RestAPINode)(nil), // 15: aggregator.RestAPINode - (*CustomCodeNode)(nil), // 16: aggregator.CustomCodeNode - (*Condition)(nil), // 17: aggregator.Condition - (*BranchNode)(nil), // 18: aggregator.BranchNode - (*FilterNode)(nil), // 19: aggregator.FilterNode - (*LoopNode)(nil), // 20: aggregator.LoopNode - (*TaskEdge)(nil), // 21: aggregator.TaskEdge - (*TaskNode)(nil), // 22: aggregator.TaskNode - (*Execution)(nil), // 23: aggregator.Execution - (*Task)(nil), // 24: aggregator.Task - (*CreateTaskReq)(nil), // 25: aggregator.CreateTaskReq - (*CreateTaskResp)(nil), // 26: aggregator.CreateTaskResp - (*NonceRequest)(nil), // 27: aggregator.NonceRequest - (*NonceResp)(nil), // 28: aggregator.NonceResp - (*ListWalletReq)(nil), // 29: aggregator.ListWalletReq - (*SmartWallet)(nil), // 30: aggregator.SmartWallet - (*ListWalletResp)(nil), // 31: aggregator.ListWalletResp - (*ListTasksReq)(nil), // 32: aggregator.ListTasksReq - (*ListTasksResp)(nil), // 33: aggregator.ListTasksResp - (*ListExecutionsReq)(nil), // 34: aggregator.ListExecutionsReq - (*ListExecutionsResp)(nil), // 35: aggregator.ListExecutionsResp - (*GetExecutionReq)(nil), // 36: aggregator.GetExecutionReq - (*GetExecutionResp)(nil), // 37: aggregator.GetExecutionResp - (*GetKeyReq)(nil), // 38: aggregator.GetKeyReq - (*KeyResp)(nil), // 39: aggregator.KeyResp - (*TriggerMetadata)(nil), // 40: aggregator.TriggerMetadata - (*GetWalletReq)(nil), // 41: aggregator.GetWalletReq - (*GetWalletResp)(nil), // 42: aggregator.GetWalletResp - (*UserTriggerTaskReq)(nil), // 43: aggregator.UserTriggerTaskReq - (*UserTriggerTaskResp)(nil), // 44: aggregator.UserTriggerTaskResp - nil, // 45: aggregator.GraphQLQueryNode.VariablesEntry - nil, // 46: aggregator.RestAPINode.HeadersEntry - (*Execution_Step)(nil), // 47: aggregator.Execution.Step - (*ListTasksResp_Item)(nil), // 48: aggregator.ListTasksResp.Item - (*wrapperspb.BoolValue)(nil), // 49: google.protobuf.BoolValue + (Error)(0), // 0: aggregator.Error + (TaskStatus)(0), // 1: aggregator.TaskStatus + (ExecutionStatus)(0), // 2: aggregator.ExecutionStatus + (CustomCodeLang)(0), // 3: aggregator.CustomCodeLang + (TriggerMetadata_TriggerType)(0), // 4: aggregator.TriggerMetadata.TriggerType + (*IdReq)(nil), // 5: aggregator.IdReq + (*FixedTimeCondition)(nil), // 6: aggregator.FixedTimeCondition + (*CronCondition)(nil), // 7: aggregator.CronCondition + (*BlockCondition)(nil), // 8: aggregator.BlockCondition + (*EventCondition)(nil), // 9: aggregator.EventCondition + (*TaskTrigger)(nil), // 10: aggregator.TaskTrigger + (*ETHTransferNode)(nil), // 11: aggregator.ETHTransferNode + (*ContractWriteNode)(nil), // 12: aggregator.ContractWriteNode + (*ContractReadNode)(nil), // 13: aggregator.ContractReadNode + (*GraphQLQueryNode)(nil), // 14: aggregator.GraphQLQueryNode + (*RestAPINode)(nil), // 15: aggregator.RestAPINode + (*CustomCodeNode)(nil), // 16: aggregator.CustomCodeNode + (*Condition)(nil), // 17: aggregator.Condition + (*BranchNode)(nil), // 18: aggregator.BranchNode + (*FilterNode)(nil), // 19: aggregator.FilterNode + (*LoopNode)(nil), // 20: aggregator.LoopNode + (*TaskEdge)(nil), // 21: aggregator.TaskEdge + (*TaskNode)(nil), // 22: aggregator.TaskNode + (*Execution)(nil), // 23: aggregator.Execution + (*Task)(nil), // 24: aggregator.Task + (*CreateTaskReq)(nil), // 25: aggregator.CreateTaskReq + (*CreateTaskResp)(nil), // 26: aggregator.CreateTaskResp + (*NonceRequest)(nil), // 27: aggregator.NonceRequest + (*NonceResp)(nil), // 28: aggregator.NonceResp + (*ListWalletReq)(nil), // 29: aggregator.ListWalletReq + (*SmartWallet)(nil), // 30: aggregator.SmartWallet + (*ListWalletResp)(nil), // 31: aggregator.ListWalletResp + (*ListTasksReq)(nil), // 32: aggregator.ListTasksReq + (*ListTasksResp)(nil), // 33: aggregator.ListTasksResp + (*ListExecutionsReq)(nil), // 34: aggregator.ListExecutionsReq + (*ListExecutionsResp)(nil), // 35: aggregator.ListExecutionsResp + (*ExecutionReq)(nil), // 36: aggregator.ExecutionReq + (*ExecutionStatusResp)(nil), // 37: aggregator.ExecutionStatusResp + (*GetKeyReq)(nil), // 38: aggregator.GetKeyReq + (*KeyResp)(nil), // 39: aggregator.KeyResp + (*TriggerMetadata)(nil), // 40: aggregator.TriggerMetadata + (*GetWalletReq)(nil), // 41: aggregator.GetWalletReq + (*GetWalletResp)(nil), // 42: aggregator.GetWalletResp + (*UserTriggerTaskReq)(nil), // 43: aggregator.UserTriggerTaskReq + (*UserTriggerTaskResp)(nil), // 44: aggregator.UserTriggerTaskResp + nil, // 45: aggregator.GraphQLQueryNode.VariablesEntry + nil, // 46: aggregator.RestAPINode.HeadersEntry + (*Execution_Step)(nil), // 47: aggregator.Execution.Step + (*ListTasksResp_Item)(nil), // 48: aggregator.ListTasksResp.Item + (*wrapperspb.BoolValue)(nil), // 49: google.protobuf.BoolValue } var file_protobuf_avs_proto_depIdxs = []int32{ 6, // 0: aggregator.TaskTrigger.fixed_time:type_name -> aggregator.FixedTimeCondition @@ -3927,7 +3928,7 @@ var file_protobuf_avs_proto_depIdxs = []int32{ 9, // 3: aggregator.TaskTrigger.event:type_name -> aggregator.EventCondition 45, // 4: aggregator.GraphQLQueryNode.variables:type_name -> aggregator.GraphQLQueryNode.VariablesEntry 46, // 5: aggregator.RestAPINode.headers:type_name -> aggregator.RestAPINode.HeadersEntry - 2, // 6: aggregator.CustomCodeNode.lang:type_name -> aggregator.CustomCodeLang + 3, // 6: aggregator.CustomCodeNode.lang:type_name -> aggregator.CustomCodeLang 17, // 7: aggregator.BranchNode.conditions:type_name -> aggregator.Condition 11, // 8: aggregator.LoopNode.eth_transfer:type_name -> aggregator.ETHTransferNode 12, // 9: aggregator.LoopNode.contract_write:type_name -> aggregator.ContractWriteNode @@ -3956,10 +3957,10 @@ var file_protobuf_avs_proto_depIdxs = []int32{ 30, // 32: aggregator.ListWalletResp.items:type_name -> aggregator.SmartWallet 48, // 33: aggregator.ListTasksResp.items:type_name -> aggregator.ListTasksResp.Item 23, // 34: aggregator.ListExecutionsResp.items:type_name -> aggregator.Execution - 3, // 35: aggregator.GetExecutionResp.status:type_name -> aggregator.GetExecutionResp.ExecutionStatus - 23, // 36: aggregator.GetExecutionResp.data:type_name -> aggregator.Execution - 4, // 37: aggregator.TriggerMetadata.type:type_name -> aggregator.TriggerMetadata.TriggerType - 40, // 38: aggregator.UserTriggerTaskReq.trigger_metadata:type_name -> aggregator.TriggerMetadata + 2, // 35: aggregator.ExecutionStatusResp.status:type_name -> aggregator.ExecutionStatus + 4, // 36: aggregator.TriggerMetadata.type:type_name -> aggregator.TriggerMetadata.TriggerType + 40, // 37: aggregator.UserTriggerTaskReq.trigger_metadata:type_name -> aggregator.TriggerMetadata + 2, // 38: aggregator.UserTriggerTaskResp.status:type_name -> aggregator.ExecutionStatus 1, // 39: aggregator.ListTasksResp.Item.status:type_name -> aggregator.TaskStatus 10, // 40: aggregator.ListTasksResp.Item.trigger:type_name -> aggregator.TaskTrigger 38, // 41: aggregator.Aggregator.GetKey:input_type -> aggregator.GetKeyReq @@ -3970,24 +3971,26 @@ var file_protobuf_avs_proto_depIdxs = []int32{ 32, // 46: aggregator.Aggregator.ListTasks:input_type -> aggregator.ListTasksReq 5, // 47: aggregator.Aggregator.GetTask:input_type -> aggregator.IdReq 34, // 48: aggregator.Aggregator.ListExecutions:input_type -> aggregator.ListExecutionsReq - 36, // 49: aggregator.Aggregator.GetExecution:input_type -> aggregator.GetExecutionReq - 5, // 50: aggregator.Aggregator.CancelTask:input_type -> aggregator.IdReq - 5, // 51: aggregator.Aggregator.DeleteTask:input_type -> aggregator.IdReq - 43, // 52: aggregator.Aggregator.TriggerTask:input_type -> aggregator.UserTriggerTaskReq - 39, // 53: aggregator.Aggregator.GetKey:output_type -> aggregator.KeyResp - 28, // 54: aggregator.Aggregator.GetNonce:output_type -> aggregator.NonceResp - 42, // 55: aggregator.Aggregator.GetWallet:output_type -> aggregator.GetWalletResp - 31, // 56: aggregator.Aggregator.ListWallets:output_type -> aggregator.ListWalletResp - 26, // 57: aggregator.Aggregator.CreateTask:output_type -> aggregator.CreateTaskResp - 33, // 58: aggregator.Aggregator.ListTasks:output_type -> aggregator.ListTasksResp - 24, // 59: aggregator.Aggregator.GetTask:output_type -> aggregator.Task - 35, // 60: aggregator.Aggregator.ListExecutions:output_type -> aggregator.ListExecutionsResp - 37, // 61: aggregator.Aggregator.GetExecution:output_type -> aggregator.GetExecutionResp - 49, // 62: aggregator.Aggregator.CancelTask:output_type -> google.protobuf.BoolValue - 49, // 63: aggregator.Aggregator.DeleteTask:output_type -> google.protobuf.BoolValue - 44, // 64: aggregator.Aggregator.TriggerTask:output_type -> aggregator.UserTriggerTaskResp - 53, // [53:65] is the sub-list for method output_type - 41, // [41:53] is the sub-list for method input_type + 36, // 49: aggregator.Aggregator.GetExecution:input_type -> aggregator.ExecutionReq + 36, // 50: aggregator.Aggregator.GetExecutionStatus:input_type -> aggregator.ExecutionReq + 5, // 51: aggregator.Aggregator.CancelTask:input_type -> aggregator.IdReq + 5, // 52: aggregator.Aggregator.DeleteTask:input_type -> aggregator.IdReq + 43, // 53: aggregator.Aggregator.TriggerTask:input_type -> aggregator.UserTriggerTaskReq + 39, // 54: aggregator.Aggregator.GetKey:output_type -> aggregator.KeyResp + 28, // 55: aggregator.Aggregator.GetNonce:output_type -> aggregator.NonceResp + 42, // 56: aggregator.Aggregator.GetWallet:output_type -> aggregator.GetWalletResp + 31, // 57: aggregator.Aggregator.ListWallets:output_type -> aggregator.ListWalletResp + 26, // 58: aggregator.Aggregator.CreateTask:output_type -> aggregator.CreateTaskResp + 33, // 59: aggregator.Aggregator.ListTasks:output_type -> aggregator.ListTasksResp + 24, // 60: aggregator.Aggregator.GetTask:output_type -> aggregator.Task + 35, // 61: aggregator.Aggregator.ListExecutions:output_type -> aggregator.ListExecutionsResp + 23, // 62: aggregator.Aggregator.GetExecution:output_type -> aggregator.Execution + 37, // 63: aggregator.Aggregator.GetExecutionStatus:output_type -> aggregator.ExecutionStatusResp + 49, // 64: aggregator.Aggregator.CancelTask:output_type -> google.protobuf.BoolValue + 49, // 65: aggregator.Aggregator.DeleteTask:output_type -> google.protobuf.BoolValue + 44, // 66: aggregator.Aggregator.TriggerTask:output_type -> aggregator.UserTriggerTaskResp + 54, // [54:67] is the sub-list for method output_type + 41, // [41:54] is the sub-list for method input_type 41, // [41:41] is the sub-list for extension type_name 41, // [41:41] is the sub-list for extension extendee 0, // [0:41] is the sub-list for field type_name @@ -4372,7 +4375,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExecutionReq); i { + switch v := v.(*ExecutionReq); i { case 0: return &v.state case 1: @@ -4384,7 +4387,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExecutionResp); i { + switch v := v.(*ExecutionStatusResp); i { case 0: return &v.state case 1: diff --git a/protobuf/avs.proto b/protobuf/avs.proto index 4b6f574..9846de3 100644 --- a/protobuf/avs.proto +++ b/protobuf/avs.proto @@ -81,12 +81,19 @@ enum Error { // TaskStatus represents status of the task. The transition is as follow enum TaskStatus { Active = 0; + // Task is completd when it's reaching its max_execution or its expiration time Completed = 1; Failed = 2; Canceled = 3; Executing = 4; } +// Execution Status re-present a run of the task +enum ExecutionStatus { + Queued = 0; + Finished = 2; +} + message ETHTransferNode { string destination = 1; string amount = 2; @@ -210,7 +217,7 @@ message TaskNode { } message Execution { - string id = 1; + string id = 1; int64 start_at = 2; int64 end_at = 3; bool success = 4; @@ -234,6 +241,7 @@ message Execution { repeated Step steps = 8; } + message Task { string id = 1; string owner = 2; @@ -357,22 +365,13 @@ message ListExecutionsResp { bool has_more = 4; } -message GetExecutionReq { +message ExecutionReq { string task_id = 1; string execution_id = 2; } -message GetExecutionResp { - enum ExecutionStatus { - Queue = 0; // execution is schedule to run in our system - Running = 1; // execution is actively running right now - Completed = 2; // execution is finished. The outcome (whether the execution finished without or with error can be access by looking into the data - } - +message ExecutionStatusResp { ExecutionStatus status = 1; - // when the execution is queue or running, we don't have all the data yet, so this field will be null. - // when the status changed to "completed", the payload will be returned - Execution data = 2; } message GetKeyReq { @@ -440,8 +439,9 @@ message UserTriggerTaskResp { // Regardless whether it is a block or async, we always get back the same kind of id for this trigger. // The caller then make a second request to GetExecution to check for the execution status and data. // In the blocking mode, the execution_id is materialized and has been created, we can then call GetExecution on it immediately to receive result - // In async mode, the execution_id is created ahead of time and not materialized, calling GetExecution on it will return Status=Pending for example + // In async mode, the execution_id is created ahead of time and not materialized, calling GetExecutionStatus on it will return Status=Pending for example. Once Status=Completed you can call GetExecution to get all log and detail. Call GetExecution before it is completed will result in "Execution Not Found" string execution_id = 1; + ExecutionStatus status = 2; } service Aggregator { @@ -458,7 +458,9 @@ service Aggregator { rpc ListTasks(ListTasksReq) returns (ListTasksResp) {}; rpc GetTask(IdReq) returns (Task) {}; rpc ListExecutions(ListExecutionsReq) returns (ListExecutionsResp) {}; - rpc GetExecution(GetExecutionReq) returns (GetExecutionResp) {}; + + rpc GetExecution(ExecutionReq) returns (Execution) {}; + rpc GetExecutionStatus(ExecutionReq) returns (ExecutionStatusResp) {}; rpc CancelTask(IdReq) returns (google.protobuf.BoolValue) {}; rpc DeleteTask(IdReq) returns (google.protobuf.BoolValue) {}; diff --git a/protobuf/avs_grpc.pb.go b/protobuf/avs_grpc.pb.go index d8df57b..c5d1458 100644 --- a/protobuf/avs_grpc.pb.go +++ b/protobuf/avs_grpc.pb.go @@ -34,7 +34,8 @@ type AggregatorClient interface { ListTasks(ctx context.Context, in *ListTasksReq, opts ...grpc.CallOption) (*ListTasksResp, error) GetTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*Task, error) ListExecutions(ctx context.Context, in *ListExecutionsReq, opts ...grpc.CallOption) (*ListExecutionsResp, error) - GetExecution(ctx context.Context, in *GetExecutionReq, opts ...grpc.CallOption) (*GetExecutionResp, error) + GetExecution(ctx context.Context, in *ExecutionReq, opts ...grpc.CallOption) (*Execution, error) + GetExecutionStatus(ctx context.Context, in *ExecutionReq, opts ...grpc.CallOption) (*ExecutionStatusResp, error) CancelTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) DeleteTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) TriggerTask(ctx context.Context, in *UserTriggerTaskReq, opts ...grpc.CallOption) (*UserTriggerTaskResp, error) @@ -120,8 +121,8 @@ func (c *aggregatorClient) ListExecutions(ctx context.Context, in *ListExecution return out, nil } -func (c *aggregatorClient) GetExecution(ctx context.Context, in *GetExecutionReq, opts ...grpc.CallOption) (*GetExecutionResp, error) { - out := new(GetExecutionResp) +func (c *aggregatorClient) GetExecution(ctx context.Context, in *ExecutionReq, opts ...grpc.CallOption) (*Execution, error) { + out := new(Execution) err := c.cc.Invoke(ctx, "/aggregator.Aggregator/GetExecution", in, out, opts...) if err != nil { return nil, err @@ -129,6 +130,15 @@ func (c *aggregatorClient) GetExecution(ctx context.Context, in *GetExecutionReq return out, nil } +func (c *aggregatorClient) GetExecutionStatus(ctx context.Context, in *ExecutionReq, opts ...grpc.CallOption) (*ExecutionStatusResp, error) { + out := new(ExecutionStatusResp) + err := c.cc.Invoke(ctx, "/aggregator.Aggregator/GetExecutionStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *aggregatorClient) CancelTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) { out := new(wrapperspb.BoolValue) err := c.cc.Invoke(ctx, "/aggregator.Aggregator/CancelTask", in, out, opts...) @@ -171,7 +181,8 @@ type AggregatorServer interface { ListTasks(context.Context, *ListTasksReq) (*ListTasksResp, error) GetTask(context.Context, *IdReq) (*Task, error) ListExecutions(context.Context, *ListExecutionsReq) (*ListExecutionsResp, error) - GetExecution(context.Context, *GetExecutionReq) (*GetExecutionResp, error) + GetExecution(context.Context, *ExecutionReq) (*Execution, error) + GetExecutionStatus(context.Context, *ExecutionReq) (*ExecutionStatusResp, error) CancelTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) DeleteTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) TriggerTask(context.Context, *UserTriggerTaskReq) (*UserTriggerTaskResp, error) @@ -206,9 +217,12 @@ func (UnimplementedAggregatorServer) GetTask(context.Context, *IdReq) (*Task, er func (UnimplementedAggregatorServer) ListExecutions(context.Context, *ListExecutionsReq) (*ListExecutionsResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListExecutions not implemented") } -func (UnimplementedAggregatorServer) GetExecution(context.Context, *GetExecutionReq) (*GetExecutionResp, error) { +func (UnimplementedAggregatorServer) GetExecution(context.Context, *ExecutionReq) (*Execution, error) { return nil, status.Errorf(codes.Unimplemented, "method GetExecution not implemented") } +func (UnimplementedAggregatorServer) GetExecutionStatus(context.Context, *ExecutionReq) (*ExecutionStatusResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExecutionStatus not implemented") +} func (UnimplementedAggregatorServer) CancelTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelTask not implemented") } @@ -376,7 +390,7 @@ func _Aggregator_ListExecutions_Handler(srv interface{}, ctx context.Context, de } func _Aggregator_GetExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetExecutionReq) + in := new(ExecutionReq) if err := dec(in); err != nil { return nil, err } @@ -388,7 +402,25 @@ func _Aggregator_GetExecution_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/aggregator.Aggregator/GetExecution", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AggregatorServer).GetExecution(ctx, req.(*GetExecutionReq)) + return srv.(AggregatorServer).GetExecution(ctx, req.(*ExecutionReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Aggregator_GetExecutionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecutionReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AggregatorServer).GetExecutionStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/aggregator.Aggregator/GetExecutionStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AggregatorServer).GetExecutionStatus(ctx, req.(*ExecutionReq)) } return interceptor(ctx, in, info, handler) } @@ -490,6 +522,10 @@ var Aggregator_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetExecution", Handler: _Aggregator_GetExecution_Handler, }, + { + MethodName: "GetExecutionStatus", + Handler: _Aggregator_GetExecutionStatus_Handler, + }, { MethodName: "CancelTask", Handler: _Aggregator_CancelTask_Handler,