From 395e14793461c026b9a1f9c0d22315d39882a6c5 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 1 Jan 2025 21:47:34 -0800 Subject: [PATCH] always return execution id when triggering task --- aggregator/rpc_server.go | 2 +- aggregator/task_engine.go | 2 +- core/apqueue/worker.go | 49 +-- core/taskengine/doc.go | 1 + core/taskengine/engine.go | 74 +++- core/taskengine/engine_test.go | 134 ++++++- core/taskengine/executor.go | 21 +- core/taskengine/schema.go | 8 + core/testutil/utils.go | 2 +- protobuf/avs.pb.go | 617 ++++++++++++++++++++------------- protobuf/avs.proto | 25 +- protobuf/avs_grpc.pb.go | 10 +- 12 files changed, 642 insertions(+), 303 deletions(-) diff --git a/aggregator/rpc_server.go b/aggregator/rpc_server.go index 4a77710..e21c907 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.Execution, error) { +func (r *RpcServer) GetExecution(ctx context.Context, payload *avsproto.GetExecutionReq) (*avsproto.GetExecutionResp, error) { user, err := r.verifyAuth(ctx) if err != nil { return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.AuthenticationError, err.Error()) diff --git a/aggregator/task_engine.go b/aggregator/task_engine.go index 609b8c4..c4106f6 100644 --- a/aggregator/task_engine.go +++ b/aggregator/task_engine.go @@ -30,7 +30,7 @@ func (agg *Aggregator) startTaskEngine(ctx context.Context) { macros.SetRpc(agg.config.SmartWallet.EthRpcUrl) agg.worker.RegisterProcessor( - taskengine.ExecuteTask, + taskengine.JobTypeExecuteTask, taskExecutor, ) diff --git a/core/apqueue/worker.go b/core/apqueue/worker.go index b0f2235..0bb476c 100644 --- a/core/apqueue/worker.go +++ b/core/apqueue/worker.go @@ -37,32 +37,37 @@ func NewWorker(q *Queue, db storage.Storage) *Worker { return w } +// wake up and pop first item in the queue to process +func (w *Worker) ProcessSignal(jid uint64) { + w.logger.Info("process job from queue", "signal", jid) + job, err := w.q.Dequeue() + if err != nil { + w.logger.Error("failed to dequeue", "error", err) + } + + processor, ok := w.processorRegistry[job.Type] + if ok { + err = processor.Perform(job) + } else { + w.logger.Info("unsupported job", "job", string(job.Data)) + } + w.logger.Info("decoded job", "job_id", jid, "jobName", job.Name, "jobdata", string(job.Data)) + + if err == nil { + w.q.markJobDone(job, jobComplete) + w.logger.Info("succesfully perform job", "job_id", jid, "task_id", job.Name) + } else { + // TODO: move to a retry queue depend on what kind of error + w.q.markJobDone(job, jobFailed) + w.logger.Error("failed to perform job", "error", err, "job_id", jid, "task_id", job.Name) + } +} + func (w *Worker) loop() { for { select { case jid := <-w.q.eventCh: - w.logger.Info("process job from queue", "job_id", jid) - job, err := w.q.Dequeue() - if err != nil { - w.logger.Error("failed to dequeue", "error", err) - } - - processor, ok := w.processorRegistry[job.Type] - if ok { - err = processor.Perform(job) - } else { - w.logger.Info("unsupported job", "job", string(job.Data)) - } - w.logger.Info("decoded job", "job_id", jid, "jobName", job.Name, "jobdata", string(job.Data)) - - if err == nil { - w.q.markJobDone(job, jobComplete) - w.logger.Info("succesfully perform job", "job_id", jid, "task_id", job.Name) - } else { - // TODO: move to a retry queue depend on what kind of error - w.q.markJobDone(job, jobFailed) - w.logger.Error("failed to perform job", "error", err, "job_id", jid, "task_id", job.Name) - } + w.ProcessSignal(jid) case <-w.q.closeCh: // loop was stopped return } diff --git a/core/taskengine/doc.go b/core/taskengine/doc.go index 7f46c95..d22bd62 100644 --- a/core/taskengine/doc.go +++ b/core/taskengine/doc.go @@ -11,6 +11,7 @@ w:: -> {factory, salt} t:: -> task payload, the source of truth of task information u::: -> task status history:: -> an execution history +trigger:: -> execution status The task storage was designed for fast retrieve time at the cost of extra storage. diff --git a/core/taskengine/engine.go b/core/taskengine/engine.go index 8ec840e..667c88b 100644 --- a/core/taskengine/engine.go +++ b/core/taskengine/engine.go @@ -31,7 +31,7 @@ import ( ) const ( - ExecuteTask = "execute_task" + JobTypeExecuteTask = "execute_task" DefaultItemPerPage = 50 ) @@ -390,13 +390,18 @@ func (n *Engine) AggregateChecksResult(address string, payload *avsproto.NotifyT n.logger.Info("processed aggregator check hit", "operator", address, "task_id", payload.TaskId) n.lock.Unlock() - data, err := json.Marshal(payload.TriggerMetadata) + queueTaskData := QueueExecutionData{ + TriggerMetadata: payload.TriggerMetadata, + ExecutionID: ulid.Make().String(), + } + + data, err := json.Marshal(queueTaskData) if err != nil { n.logger.Error("error serialize trigger to json", err) return err } - n.queue.Enqueue(ExecuteTask, payload.TaskId, data) + n.queue.Enqueue(JobTypeExecuteTask, payload.TaskId, data) n.logger.Info("enqueue task into the queue system", "task_id", payload.TaskId) // if the task can still run, add it back @@ -558,36 +563,40 @@ func (n *Engine) TriggerTask(user *model.User, payload *avsproto.UserTriggerTask return nil, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) } - data, err := json.Marshal(payload.TriggerMetadata) - if err != nil { - n.logger.Error("error serialize trigger to json", err) - return nil, status.Errorf(codes.InvalidArgument, codes.InvalidArgument.String()) + queueTaskData := QueueExecutionData{ + TriggerMetadata: payload.TriggerMetadata, + ExecutionID: ulid.Make().String(), } if payload.IsBlocking { // Run the task inline, by pass the queue system executor := NewExecutor(n.db, n.logger) - execution, err := executor.RunTask(task, payload.TriggerMetadata) + execution, err := executor.RunTask(task, &queueTaskData) if err == nil { return &avsproto.UserTriggerTaskResp{ - Result: true, ExecutionId: execution.Id, }, nil } - return &avsproto.UserTriggerTaskResp{ - Result: false, - }, err + return nil, grpcstatus.Errorf(codes.Code(avsproto.Error_TaskTriggerError), fmt.Sprintf("error trigger task: %s", err.Error())) } - jid, err := n.queue.Enqueue(ExecuteTask, payload.TaskId, data) + data, err := json.Marshal(queueTaskData) if err != nil { + n.logger.Error("error serialize trigger to json", err) + return nil, status.Errorf(codes.InvalidArgument, codes.InvalidArgument.String()) + } + + jid, err := n.queue.Enqueue(JobTypeExecuteTask, payload.TaskId, data) + if err != nil { + n.logger.Error("error enqueue job %s %s %w", payload.TaskId, string(data), err) return nil, grpcstatus.Errorf(codes.Code(avsproto.Error_StorageUnavailable), StorageQueueUnavailableError) } - n.logger.Info("enqueue task into the queue system", "task_id", payload.TaskId, "jid", jid) + n.setExecutionStatusQueue(task, queueTaskData.ExecutionID) + n.logger.Info("enqueue task into the queue system", "task_id", payload.TaskId, "jid", jid, "execution_id", queueTaskData.ExecutionID) return &avsproto.UserTriggerTaskResp{ - Result: true, + ExecutionId: queueTaskData.ExecutionID, }, nil } @@ -696,10 +705,30 @@ func (n *Engine) ListExecutions(user *model.User, payload *avsproto.ListExecutio return executioResp, nil } +func (n *Engine) setExecutionStatusQueue(task *model.Task, executionID string) error { + status := strconv.Itoa(int(avsproto.GetExecutionResp_Queue)) + return n.db.Set(TaskTriggerKey(task, executionID), []byte(status)) +} + +func (n *Engine) getExecutonStatusFromQueue(task *model.Task, executionID string) (*avsproto.GetExecutionResp_ExecutionStatus, error) { + status, err := n.db.GetKey(TaskTriggerKey(task, executionID)) + if err != nil { + return nil, err + } + + value, err := strconv.Atoi(string(status)) + if err != nil { + return nil, err + } + statusValue := avsproto.GetExecutionResp_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.Execution, error) { +func (n *Engine) GetExecution(user *model.User, payload *avsproto.GetExecutionReq) (*avsproto.GetExecutionResp, 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) + if err != nil { return nil, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) } @@ -710,6 +739,12 @@ 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{} @@ -727,7 +762,12 @@ func (n *Engine) GetExecution(user *model.User, payload *avsproto.GetExecutionRe exec.TriggerMetadata.Type = avsproto.TriggerMetadata_Event } } - return &exec, nil + + result := &avsproto.GetExecutionResp{ + Status: avsproto.GetExecutionResp_Completed, + Data: &exec, + } + return result, 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 415d2a0..724c4c9 100644 --- a/core/taskengine/engine_test.go +++ b/core/taskengine/engine_test.go @@ -2,8 +2,10 @@ package taskengine import ( "fmt" + "strings" "testing" + "github.com/AvaProtocol/ap-avs/core/apqueue" "github.com/AvaProtocol/ap-avs/core/testutil" avsproto "github.com/AvaProtocol/ap-avs/protobuf" "github.com/AvaProtocol/ap-avs/storage" @@ -212,12 +214,12 @@ func TestGetExecution(t *testing.T) { ExecutionId: resultTrigger.ExecutionId, }) - 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.TriggerMetadata.BlockNumber != 101 { - t.Errorf("invalid triggered block. expect 101 got %d", execution.TriggerMetadata.BlockNumber) + if execution.Data.TriggerMetadata.BlockNumber != 101 { + t.Errorf("invalid triggered block. expect 101 got %d", execution.Data.TriggerMetadata.BlockNumber) } // Another user cannot get this executin id @@ -288,3 +290,127 @@ func TestListWallets(t *testing.T) { t.Errorf("expect only default wallet but got %d", len(wallets)) } } + +func TestTriggerSync(t *testing.T) { + db := testutil.TestMustDB() + defer storage.Destroy(db.(*storage.BadgerStorage)) + + config := testutil.GetAggregatorConfig() + n := New(db, config, nil, testutil.GetLogger()) + + // Now create a test task + tr1 := testutil.RestTask() + tr1.Memo = "t1" + // salt 0 + tr1.SmartWalletAddress = "0x7c3a76086588230c7B3f4839A4c1F5BBafcd57C6" + result, _ := n.CreateTask(testutil.TestUser1(), tr1) + + resultTrigger, err := n.TriggerTask(testutil.TestUser1(), &avsproto.UserTriggerTaskReq{ + TaskId: result.Id, + TriggerMetadata: &avsproto.TriggerMetadata{ + BlockNumber: 101, + }, + IsBlocking: true, + }) + + if err != nil { + t.Errorf("expected trigger succesfully but got error: %s", err) + } + + // Now get back that execution id + execution, err := n.GetExecution(testutil.TestUser1(), &avsproto.GetExecutionReq{ + 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.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) + } +} + +func TestTriggerAsync(t *testing.T) { + db := testutil.TestMustDB() + defer storage.Destroy(db.(*storage.BadgerStorage)) + + config := testutil.GetAggregatorConfig() + n := New(db, config, nil, testutil.GetLogger()) + n.queue = apqueue.New(db, testutil.GetLogger(), &apqueue.QueueOption{ + Prefix: "default", + }) + worker := apqueue.NewWorker(n.queue, n.db) + taskExecutor := NewExecutor(n.db, testutil.GetLogger()) + worker.RegisterProcessor( + JobTypeExecuteTask, + taskExecutor, + ) + n.queue.MustStart() + + // Now create a test task + tr1 := testutil.RestTask() + tr1.Memo = "t1" + // salt 0 wallet + tr1.SmartWalletAddress = "0x7c3a76086588230c7B3f4839A4c1F5BBafcd57C6" + result, _ := n.CreateTask(testutil.TestUser1(), tr1) + + resultTrigger, err := n.TriggerTask(testutil.TestUser1(), &avsproto.UserTriggerTaskReq{ + TaskId: result.Id, + TriggerMetadata: &avsproto.TriggerMetadata{ + BlockNumber: 101, + }, + IsBlocking: false, + }) + + if err != nil { + t.Errorf("expected trigger succesfully but got error: %s", err) + } + + // 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{ + 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)]) + } + + // 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{ + 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.Data.Success { + t.Errorf("wrong success result, expected true got false") + } + + if execution.Data.Steps[0].NodeId != "ping1" { + t.Errorf("wrong node id in execution log") + } + if !strings.Contains(execution.Data.Steps[0].OutputData, "httpbin.org") { + t.Error("Invalid output data") + } +} diff --git a/core/taskengine/executor.go b/core/taskengine/executor.go index 9fd69d1..4c57b59 100644 --- a/core/taskengine/executor.go +++ b/core/taskengine/executor.go @@ -8,7 +8,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" - "github.com/oklog/ulid/v2" "google.golang.org/protobuf/encoding/protojson" "github.com/AvaProtocol/ap-avs/core/chainio/aa" @@ -35,6 +34,11 @@ type TaskExecutor struct { logger sdklogging.Logger } +type QueueExecutionData struct { + TriggerMetadata *avsproto.TriggerMetadata + ExecutionID string +} + func (x *TaskExecutor) GetTask(id string) (*model.Task, error) { task := &model.Task{ Task: &avsproto.Task{}, @@ -59,19 +63,24 @@ func (x *TaskExecutor) Perform(job *apqueue.Job) error { return fmt.Errorf("fail to load task: %s", job.Name) } - triggerMetadata := &avsproto.TriggerMetadata{} + queueData := &QueueExecutionData{} // A task executor data is the trigger mark // ref: AggregateChecksResult - err = json.Unmarshal(job.Data, triggerMetadata) + err = json.Unmarshal(job.Data, queueData) if err != nil { return fmt.Errorf("error decode job payload when executing task: %s with job id %d", task.Id, job.ID) } - _, err = x.RunTask(task, triggerMetadata) + _, err = x.RunTask(task, queueData) return err } -func (x *TaskExecutor) RunTask(task *model.Task, triggerMetadata *avsproto.TriggerMetadata) (*avsproto.Execution, error) { +func (x *TaskExecutor) RunTask(task *model.Task, queueData *QueueExecutionData) (*avsproto.Execution, error) { + if queueData == nil || queueData.ExecutionID == "" { + return nil, fmt.Errorf("internal error: invalid execution id") + } + triggerMetadata := queueData.TriggerMetadata + vm, err := NewVMWithData(task.Id, triggerMetadata, task.Nodes, task.Edges) if err != nil { return nil, err @@ -104,7 +113,7 @@ func (x *TaskExecutor) RunTask(task *model.Task, triggerMetadata *avsproto.Trigg } execution := &avsproto.Execution{ - Id: ulid.Make().String(), + Id: queueData.ExecutionID, StartAt: t0.Unix(), EndAt: t1.Unix(), Success: err == nil, diff --git a/core/taskengine/schema.go b/core/taskengine/schema.go index 7e0bae2..94e4ba2 100644 --- a/core/taskengine/schema.go +++ b/core/taskengine/schema.go @@ -65,6 +65,14 @@ func TaskExecutionKey(t *model.Task, executionID string) []byte { )) } +func TaskTriggerKey(t *model.Task, executionID string) []byte { + return []byte(fmt.Sprintf( + "trigger:%s:%s", + t.Id, + executionID, + )) +} + func ExecutionIdFromStorageKey(key []byte) string { // key layout: history:01JG2FE5MDVKBPHEG0PEYSDKAC:01JG2FE5MFKTH0754RGF2DMVY7 return string(key[35:]) diff --git a/core/testutil/utils.go b/core/testutil/utils.go index e930207..2a9d146 100644 --- a/core/testutil/utils.go +++ b/core/testutil/utils.go @@ -73,7 +73,7 @@ func TestMustDB() storage.Storage { if err != nil { panic(err) } - //dir = "/tmp/ap-avs" + dir = "/tmp/ap-avs" db, err := storage.NewWithPath(dir) if err != nil { panic(err) diff --git a/protobuf/avs.pb.go b/protobuf/avs.pb.go index 8996e4f..39aef13 100644 --- a/protobuf/avs.pb.go +++ b/protobuf/avs.pb.go @@ -40,6 +40,8 @@ const ( // Error occurs when we failed to migrate task data and it cannot be decode Error_TaskDataCorrupted Error = 7000 Error_TaskDataMissingError Error = 7001 + // Trigger Task failed + Error_TaskTriggerError Error = 7003 ) // Enum value maps for Error. @@ -53,6 +55,7 @@ var ( 6001: "SmartWalletNotFoundError", 7000: "TaskDataCorrupted", 7001: "TaskDataMissingError", + 7003: "TaskTriggerError", } Error_value = map[string]int32{ "UnknowError": 0, @@ -63,6 +66,7 @@ var ( "SmartWalletNotFoundError": 6001, "TaskDataCorrupted": 7000, "TaskDataMissingError": 7001, + "TaskTriggerError": 7003, } ) @@ -192,6 +196,55 @@ func (CustomCodeLang) EnumDescriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{2} } +type GetExecutionResp_ExecutionStatus 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 +) + +// Enum value maps for GetExecutionResp_ExecutionStatus. +var ( + GetExecutionResp_ExecutionStatus_name = map[int32]string{ + 0: "Queue", + 1: "Running", + 2: "Completed", + } + GetExecutionResp_ExecutionStatus_value = map[string]int32{ + "Queue": 0, + "Running": 1, + "Completed": 2, + } +) + +func (x GetExecutionResp_ExecutionStatus) Enum() *GetExecutionResp_ExecutionStatus { + p := new(GetExecutionResp_ExecutionStatus) + *p = x + return p +} + +func (x GetExecutionResp_ExecutionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GetExecutionResp_ExecutionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_protobuf_avs_proto_enumTypes[3].Descriptor() +} + +func (GetExecutionResp_ExecutionStatus) Type() protoreflect.EnumType { + return &file_protobuf_avs_proto_enumTypes[3] +} + +func (x GetExecutionResp_ExecutionStatus) 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} +} + // This value isn't needed because when we query an execution or trigger a task, we know the trigger type // But, The JS SDK needed this value probabaly to saving the lookup time when it only have execution id somehow // So we added this value to the respose for the client to consume and use however it want @@ -239,11 +292,11 @@ func (x TriggerMetadata_TriggerType) String() string { } func (TriggerMetadata_TriggerType) Descriptor() protoreflect.EnumDescriptor { - return file_protobuf_avs_proto_enumTypes[3].Descriptor() + return file_protobuf_avs_proto_enumTypes[4].Descriptor() } func (TriggerMetadata_TriggerType) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[3] + return &file_protobuf_avs_proto_enumTypes[4] } func (x TriggerMetadata_TriggerType) Number() protoreflect.EnumNumber { @@ -252,7 +305,7 @@ func (x TriggerMetadata_TriggerType) Number() protoreflect.EnumNumber { // Deprecated: Use TriggerMetadata_TriggerType.Descriptor instead. func (TriggerMetadata_TriggerType) EnumDescriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{34, 0} + return file_protobuf_avs_proto_rawDescGZIP(), []int{35, 0} } type IdReq struct { @@ -2598,6 +2651,63 @@ func (x *GetExecutionReq) GetExecutionId() string { return "" } +type GetExecutionResp 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"` +} + +func (x *GetExecutionResp) Reset() { + *x = GetExecutionResp{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetExecutionResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExecutionResp) ProtoMessage() {} + +func (x *GetExecutionResp) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_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 GetExecutionResp.ProtoReflect.Descriptor instead. +func (*GetExecutionResp) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{32} +} + +func (x *GetExecutionResp) GetStatus() GetExecutionResp_ExecutionStatus { + if x != nil { + return x.Status + } + return GetExecutionResp_Queue +} + +func (x *GetExecutionResp) GetData() *Execution { + if x != nil { + return x.Data + } + return nil +} + type GetKeyReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2611,7 +2721,7 @@ type GetKeyReq struct { func (x *GetKeyReq) Reset() { *x = GetKeyReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[32] + mi := &file_protobuf_avs_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2624,7 +2734,7 @@ func (x *GetKeyReq) String() string { func (*GetKeyReq) ProtoMessage() {} func (x *GetKeyReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[32] + mi := &file_protobuf_avs_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2637,7 +2747,7 @@ func (x *GetKeyReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GetKeyReq.ProtoReflect.Descriptor instead. func (*GetKeyReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{32} + return file_protobuf_avs_proto_rawDescGZIP(), []int{33} } func (x *GetKeyReq) GetOwner() string { @@ -2672,7 +2782,7 @@ type KeyResp struct { func (x *KeyResp) Reset() { *x = KeyResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[33] + mi := &file_protobuf_avs_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2685,7 +2795,7 @@ func (x *KeyResp) String() string { func (*KeyResp) ProtoMessage() {} func (x *KeyResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[33] + mi := &file_protobuf_avs_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2698,7 +2808,7 @@ func (x *KeyResp) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyResp.ProtoReflect.Descriptor instead. func (*KeyResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{33} + return file_protobuf_avs_proto_rawDescGZIP(), []int{34} } func (x *KeyResp) GetKey() string { @@ -2730,7 +2840,7 @@ type TriggerMetadata struct { func (x *TriggerMetadata) Reset() { *x = TriggerMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[34] + mi := &file_protobuf_avs_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2743,7 +2853,7 @@ func (x *TriggerMetadata) String() string { func (*TriggerMetadata) ProtoMessage() {} func (x *TriggerMetadata) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[34] + mi := &file_protobuf_avs_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2756,7 +2866,7 @@ func (x *TriggerMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerMetadata.ProtoReflect.Descriptor instead. func (*TriggerMetadata) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{34} + return file_protobuf_avs_proto_rawDescGZIP(), []int{35} } func (x *TriggerMetadata) GetBlockNumber() uint64 { @@ -2807,7 +2917,7 @@ type GetWalletReq struct { func (x *GetWalletReq) Reset() { *x = GetWalletReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[35] + mi := &file_protobuf_avs_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2820,7 +2930,7 @@ func (x *GetWalletReq) String() string { func (*GetWalletReq) ProtoMessage() {} func (x *GetWalletReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[35] + mi := &file_protobuf_avs_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2833,7 +2943,7 @@ func (x *GetWalletReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWalletReq.ProtoReflect.Descriptor instead. func (*GetWalletReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{35} + return file_protobuf_avs_proto_rawDescGZIP(), []int{36} } func (x *GetWalletReq) GetSalt() string { @@ -2863,7 +2973,7 @@ type GetWalletResp struct { func (x *GetWalletResp) Reset() { *x = GetWalletResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[36] + mi := &file_protobuf_avs_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2876,7 +2986,7 @@ func (x *GetWalletResp) String() string { func (*GetWalletResp) ProtoMessage() {} func (x *GetWalletResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[36] + mi := &file_protobuf_avs_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2889,7 +2999,7 @@ func (x *GetWalletResp) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWalletResp.ProtoReflect.Descriptor instead. func (*GetWalletResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{36} + return file_protobuf_avs_proto_rawDescGZIP(), []int{37} } func (x *GetWalletResp) GetAddress() string { @@ -2929,7 +3039,7 @@ type UserTriggerTaskReq struct { func (x *UserTriggerTaskReq) Reset() { *x = UserTriggerTaskReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[37] + mi := &file_protobuf_avs_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2942,7 +3052,7 @@ func (x *UserTriggerTaskReq) String() string { func (*UserTriggerTaskReq) ProtoMessage() {} func (x *UserTriggerTaskReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[37] + mi := &file_protobuf_avs_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2955,7 +3065,7 @@ func (x *UserTriggerTaskReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserTriggerTaskReq.ProtoReflect.Descriptor instead. func (*UserTriggerTaskReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{37} + return file_protobuf_avs_proto_rawDescGZIP(), []int{38} } func (x *UserTriggerTaskReq) GetTaskId() string { @@ -2984,15 +3094,17 @@ type UserTriggerTaskResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` - // if trigger inline, the execution id will be returned - ExecutionId string `protobuf:"bytes,2,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` + // 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"` } func (x *UserTriggerTaskResp) Reset() { *x = UserTriggerTaskResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[38] + mi := &file_protobuf_avs_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3005,7 +3117,7 @@ func (x *UserTriggerTaskResp) String() string { func (*UserTriggerTaskResp) ProtoMessage() {} func (x *UserTriggerTaskResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[38] + mi := &file_protobuf_avs_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3018,14 +3130,7 @@ func (x *UserTriggerTaskResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UserTriggerTaskResp.ProtoReflect.Descriptor instead. func (*UserTriggerTaskResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{38} -} - -func (x *UserTriggerTaskResp) GetResult() bool { - if x != nil { - return x.Result - } - return false + return file_protobuf_avs_proto_rawDescGZIP(), []int{39} } func (x *UserTriggerTaskResp) GetExecutionId() string { @@ -3053,7 +3158,7 @@ type Execution_Step struct { func (x *Execution_Step) Reset() { *x = Execution_Step{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[41] + mi := &file_protobuf_avs_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3066,7 +3171,7 @@ func (x *Execution_Step) String() string { func (*Execution_Step) ProtoMessage() {} func (x *Execution_Step) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[41] + mi := &file_protobuf_avs_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3158,7 +3263,7 @@ type ListTasksResp_Item struct { func (x *ListTasksResp_Item) Reset() { *x = ListTasksResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[42] + mi := &file_protobuf_avs_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3171,7 +3276,7 @@ func (x *ListTasksResp_Item) String() string { func (*ListTasksResp_Item) ProtoMessage() {} func (x *ListTasksResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[42] + mi := &file_protobuf_avs_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3610,7 +3715,19 @@ var file_protobuf_avs_proto_rawDesc = []byte{ 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, 0x5e, 0x0a, 0x09, 0x47, + 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, @@ -3656,85 +3773,85 @@ var file_protobuf_avs_proto_rawDesc = []byte{ 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, 0x50, 0x0a, 0x13, 0x55, + 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, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 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, 0x2a, 0xc8, 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, 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, 0xb5, 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, 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, + 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, + 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, 0x73, 0x70, 0x22, 0x00, 0x12, 0x44, - 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, 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, 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, + 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, } var ( @@ -3749,127 +3866,131 @@ func file_protobuf_avs_proto_rawDescGZIP() []byte { return file_protobuf_avs_proto_rawDescData } -var file_protobuf_avs_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_protobuf_avs_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +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 - (TriggerMetadata_TriggerType)(0), // 3: aggregator.TriggerMetadata.TriggerType - (*IdReq)(nil), // 4: aggregator.IdReq - (*FixedTimeCondition)(nil), // 5: aggregator.FixedTimeCondition - (*CronCondition)(nil), // 6: aggregator.CronCondition - (*BlockCondition)(nil), // 7: aggregator.BlockCondition - (*EventCondition)(nil), // 8: aggregator.EventCondition - (*TaskTrigger)(nil), // 9: aggregator.TaskTrigger - (*ETHTransferNode)(nil), // 10: aggregator.ETHTransferNode - (*ContractWriteNode)(nil), // 11: aggregator.ContractWriteNode - (*ContractReadNode)(nil), // 12: aggregator.ContractReadNode - (*GraphQLQueryNode)(nil), // 13: aggregator.GraphQLQueryNode - (*RestAPINode)(nil), // 14: aggregator.RestAPINode - (*CustomCodeNode)(nil), // 15: aggregator.CustomCodeNode - (*Condition)(nil), // 16: aggregator.Condition - (*BranchNode)(nil), // 17: aggregator.BranchNode - (*FilterNode)(nil), // 18: aggregator.FilterNode - (*LoopNode)(nil), // 19: aggregator.LoopNode - (*TaskEdge)(nil), // 20: aggregator.TaskEdge - (*TaskNode)(nil), // 21: aggregator.TaskNode - (*Execution)(nil), // 22: aggregator.Execution - (*Task)(nil), // 23: aggregator.Task - (*CreateTaskReq)(nil), // 24: aggregator.CreateTaskReq - (*CreateTaskResp)(nil), // 25: aggregator.CreateTaskResp - (*NonceRequest)(nil), // 26: aggregator.NonceRequest - (*NonceResp)(nil), // 27: aggregator.NonceResp - (*ListWalletReq)(nil), // 28: aggregator.ListWalletReq - (*SmartWallet)(nil), // 29: aggregator.SmartWallet - (*ListWalletResp)(nil), // 30: aggregator.ListWalletResp - (*ListTasksReq)(nil), // 31: aggregator.ListTasksReq - (*ListTasksResp)(nil), // 32: aggregator.ListTasksResp - (*ListExecutionsReq)(nil), // 33: aggregator.ListExecutionsReq - (*ListExecutionsResp)(nil), // 34: aggregator.ListExecutionsResp - (*GetExecutionReq)(nil), // 35: aggregator.GetExecutionReq - (*GetKeyReq)(nil), // 36: aggregator.GetKeyReq - (*KeyResp)(nil), // 37: aggregator.KeyResp - (*TriggerMetadata)(nil), // 38: aggregator.TriggerMetadata - (*GetWalletReq)(nil), // 39: aggregator.GetWalletReq - (*GetWalletResp)(nil), // 40: aggregator.GetWalletResp - (*UserTriggerTaskReq)(nil), // 41: aggregator.UserTriggerTaskReq - (*UserTriggerTaskResp)(nil), // 42: aggregator.UserTriggerTaskResp - nil, // 43: aggregator.GraphQLQueryNode.VariablesEntry - nil, // 44: aggregator.RestAPINode.HeadersEntry - (*Execution_Step)(nil), // 45: aggregator.Execution.Step - (*ListTasksResp_Item)(nil), // 46: aggregator.ListTasksResp.Item - (*wrapperspb.BoolValue)(nil), // 47: google.protobuf.BoolValue + (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 } var file_protobuf_avs_proto_depIdxs = []int32{ - 5, // 0: aggregator.TaskTrigger.fixed_time:type_name -> aggregator.FixedTimeCondition - 6, // 1: aggregator.TaskTrigger.cron:type_name -> aggregator.CronCondition - 7, // 2: aggregator.TaskTrigger.block:type_name -> aggregator.BlockCondition - 8, // 3: aggregator.TaskTrigger.event:type_name -> aggregator.EventCondition - 43, // 4: aggregator.GraphQLQueryNode.variables:type_name -> aggregator.GraphQLQueryNode.VariablesEntry - 44, // 5: aggregator.RestAPINode.headers:type_name -> aggregator.RestAPINode.HeadersEntry + 6, // 0: aggregator.TaskTrigger.fixed_time:type_name -> aggregator.FixedTimeCondition + 7, // 1: aggregator.TaskTrigger.cron:type_name -> aggregator.CronCondition + 8, // 2: aggregator.TaskTrigger.block:type_name -> aggregator.BlockCondition + 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 - 16, // 7: aggregator.BranchNode.conditions:type_name -> aggregator.Condition - 10, // 8: aggregator.LoopNode.eth_transfer:type_name -> aggregator.ETHTransferNode - 11, // 9: aggregator.LoopNode.contract_write:type_name -> aggregator.ContractWriteNode - 12, // 10: aggregator.LoopNode.contract_read:type_name -> aggregator.ContractReadNode - 13, // 11: aggregator.LoopNode.graphql_data_query:type_name -> aggregator.GraphQLQueryNode - 14, // 12: aggregator.LoopNode.rest_api:type_name -> aggregator.RestAPINode - 15, // 13: aggregator.LoopNode.custom_code:type_name -> aggregator.CustomCodeNode - 10, // 14: aggregator.TaskNode.eth_transfer:type_name -> aggregator.ETHTransferNode - 11, // 15: aggregator.TaskNode.contract_write:type_name -> aggregator.ContractWriteNode - 12, // 16: aggregator.TaskNode.contract_read:type_name -> aggregator.ContractReadNode - 13, // 17: aggregator.TaskNode.graphql_query:type_name -> aggregator.GraphQLQueryNode - 14, // 18: aggregator.TaskNode.rest_api:type_name -> aggregator.RestAPINode - 17, // 19: aggregator.TaskNode.branch:type_name -> aggregator.BranchNode - 18, // 20: aggregator.TaskNode.filter:type_name -> aggregator.FilterNode - 19, // 21: aggregator.TaskNode.loop:type_name -> aggregator.LoopNode - 15, // 22: aggregator.TaskNode.custom_code:type_name -> aggregator.CustomCodeNode - 38, // 23: aggregator.Execution.trigger_metadata:type_name -> aggregator.TriggerMetadata - 45, // 24: aggregator.Execution.steps:type_name -> aggregator.Execution.Step + 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 + 13, // 10: aggregator.LoopNode.contract_read:type_name -> aggregator.ContractReadNode + 14, // 11: aggregator.LoopNode.graphql_data_query:type_name -> aggregator.GraphQLQueryNode + 15, // 12: aggregator.LoopNode.rest_api:type_name -> aggregator.RestAPINode + 16, // 13: aggregator.LoopNode.custom_code:type_name -> aggregator.CustomCodeNode + 11, // 14: aggregator.TaskNode.eth_transfer:type_name -> aggregator.ETHTransferNode + 12, // 15: aggregator.TaskNode.contract_write:type_name -> aggregator.ContractWriteNode + 13, // 16: aggregator.TaskNode.contract_read:type_name -> aggregator.ContractReadNode + 14, // 17: aggregator.TaskNode.graphql_query:type_name -> aggregator.GraphQLQueryNode + 15, // 18: aggregator.TaskNode.rest_api:type_name -> aggregator.RestAPINode + 18, // 19: aggregator.TaskNode.branch:type_name -> aggregator.BranchNode + 19, // 20: aggregator.TaskNode.filter:type_name -> aggregator.FilterNode + 20, // 21: aggregator.TaskNode.loop:type_name -> aggregator.LoopNode + 16, // 22: aggregator.TaskNode.custom_code:type_name -> aggregator.CustomCodeNode + 40, // 23: aggregator.Execution.trigger_metadata:type_name -> aggregator.TriggerMetadata + 47, // 24: aggregator.Execution.steps:type_name -> aggregator.Execution.Step 1, // 25: aggregator.Task.status:type_name -> aggregator.TaskStatus - 9, // 26: aggregator.Task.trigger:type_name -> aggregator.TaskTrigger - 21, // 27: aggregator.Task.nodes:type_name -> aggregator.TaskNode - 20, // 28: aggregator.Task.edges:type_name -> aggregator.TaskEdge - 9, // 29: aggregator.CreateTaskReq.trigger:type_name -> aggregator.TaskTrigger - 21, // 30: aggregator.CreateTaskReq.nodes:type_name -> aggregator.TaskNode - 20, // 31: aggregator.CreateTaskReq.edges:type_name -> aggregator.TaskEdge - 29, // 32: aggregator.ListWalletResp.items:type_name -> aggregator.SmartWallet - 46, // 33: aggregator.ListTasksResp.items:type_name -> aggregator.ListTasksResp.Item - 22, // 34: aggregator.ListExecutionsResp.items:type_name -> aggregator.Execution - 3, // 35: aggregator.TriggerMetadata.type:type_name -> aggregator.TriggerMetadata.TriggerType - 38, // 36: aggregator.UserTriggerTaskReq.trigger_metadata:type_name -> aggregator.TriggerMetadata - 1, // 37: aggregator.ListTasksResp.Item.status:type_name -> aggregator.TaskStatus - 9, // 38: aggregator.ListTasksResp.Item.trigger:type_name -> aggregator.TaskTrigger - 36, // 39: aggregator.Aggregator.GetKey:input_type -> aggregator.GetKeyReq - 26, // 40: aggregator.Aggregator.GetNonce:input_type -> aggregator.NonceRequest - 39, // 41: aggregator.Aggregator.GetWallet:input_type -> aggregator.GetWalletReq - 28, // 42: aggregator.Aggregator.ListWallets:input_type -> aggregator.ListWalletReq - 24, // 43: aggregator.Aggregator.CreateTask:input_type -> aggregator.CreateTaskReq - 31, // 44: aggregator.Aggregator.ListTasks:input_type -> aggregator.ListTasksReq - 4, // 45: aggregator.Aggregator.GetTask:input_type -> aggregator.IdReq - 33, // 46: aggregator.Aggregator.ListExecutions:input_type -> aggregator.ListExecutionsReq - 35, // 47: aggregator.Aggregator.GetExecution:input_type -> aggregator.GetExecutionReq - 4, // 48: aggregator.Aggregator.CancelTask:input_type -> aggregator.IdReq - 4, // 49: aggregator.Aggregator.DeleteTask:input_type -> aggregator.IdReq - 41, // 50: aggregator.Aggregator.TriggerTask:input_type -> aggregator.UserTriggerTaskReq - 37, // 51: aggregator.Aggregator.GetKey:output_type -> aggregator.KeyResp - 27, // 52: aggregator.Aggregator.GetNonce:output_type -> aggregator.NonceResp - 40, // 53: aggregator.Aggregator.GetWallet:output_type -> aggregator.GetWalletResp - 30, // 54: aggregator.Aggregator.ListWallets:output_type -> aggregator.ListWalletResp - 25, // 55: aggregator.Aggregator.CreateTask:output_type -> aggregator.CreateTaskResp - 32, // 56: aggregator.Aggregator.ListTasks:output_type -> aggregator.ListTasksResp - 23, // 57: aggregator.Aggregator.GetTask:output_type -> aggregator.Task - 34, // 58: aggregator.Aggregator.ListExecutions:output_type -> aggregator.ListExecutionsResp - 22, // 59: aggregator.Aggregator.GetExecution:output_type -> aggregator.Execution - 47, // 60: aggregator.Aggregator.CancelTask:output_type -> google.protobuf.BoolValue - 47, // 61: aggregator.Aggregator.DeleteTask:output_type -> google.protobuf.BoolValue - 42, // 62: aggregator.Aggregator.TriggerTask:output_type -> aggregator.UserTriggerTaskResp - 51, // [51:63] is the sub-list for method output_type - 39, // [39:51] is the sub-list for method input_type - 39, // [39:39] is the sub-list for extension type_name - 39, // [39:39] is the sub-list for extension extendee - 0, // [0:39] is the sub-list for field type_name + 10, // 26: aggregator.Task.trigger:type_name -> aggregator.TaskTrigger + 22, // 27: aggregator.Task.nodes:type_name -> aggregator.TaskNode + 21, // 28: aggregator.Task.edges:type_name -> aggregator.TaskEdge + 10, // 29: aggregator.CreateTaskReq.trigger:type_name -> aggregator.TaskTrigger + 22, // 30: aggregator.CreateTaskReq.nodes:type_name -> aggregator.TaskNode + 21, // 31: aggregator.CreateTaskReq.edges:type_name -> aggregator.TaskEdge + 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 + 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 + 27, // 42: aggregator.Aggregator.GetNonce:input_type -> aggregator.NonceRequest + 41, // 43: aggregator.Aggregator.GetWallet:input_type -> aggregator.GetWalletReq + 29, // 44: aggregator.Aggregator.ListWallets:input_type -> aggregator.ListWalletReq + 25, // 45: aggregator.Aggregator.CreateTask:input_type -> aggregator.CreateTaskReq + 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 + 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 } func init() { file_protobuf_avs_proto_init() } @@ -4263,7 +4384,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeyReq); i { + switch v := v.(*GetExecutionResp); i { case 0: return &v.state case 1: @@ -4275,7 +4396,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyResp); i { + switch v := v.(*GetKeyReq); i { case 0: return &v.state case 1: @@ -4287,7 +4408,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TriggerMetadata); i { + switch v := v.(*KeyResp); i { case 0: return &v.state case 1: @@ -4299,7 +4420,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWalletReq); i { + switch v := v.(*TriggerMetadata); i { case 0: return &v.state case 1: @@ -4311,7 +4432,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWalletResp); i { + switch v := v.(*GetWalletReq); i { case 0: return &v.state case 1: @@ -4323,7 +4444,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserTriggerTaskReq); i { + switch v := v.(*GetWalletResp); i { case 0: return &v.state case 1: @@ -4335,6 +4456,18 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserTriggerTaskReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protobuf_avs_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserTriggerTaskResp); i { case 0: return &v.state @@ -4346,7 +4479,7 @@ func file_protobuf_avs_proto_init() { return nil } } - file_protobuf_avs_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_protobuf_avs_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Execution_Step); i { case 0: return &v.state @@ -4358,7 +4491,7 @@ func file_protobuf_avs_proto_init() { return nil } } - file_protobuf_avs_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_protobuf_avs_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListTasksResp_Item); i { case 0: return &v.state @@ -4402,8 +4535,8 @@ func file_protobuf_avs_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protobuf_avs_proto_rawDesc, - NumEnums: 4, - NumMessages: 43, + NumEnums: 5, + NumMessages: 44, NumExtensions: 0, NumServices: 1, }, diff --git a/protobuf/avs.proto b/protobuf/avs.proto index 4d327af..4b6f574 100644 --- a/protobuf/avs.proto +++ b/protobuf/avs.proto @@ -73,6 +73,8 @@ enum Error { // Error occurs when we failed to migrate task data and it cannot be decode TaskDataCorrupted = 7000; TaskDataMissingError = 7001; + // Trigger Task failed + TaskTriggerError = 7003; } @@ -360,6 +362,19 @@ message GetExecutionReq { 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 + } + + 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 { string owner = 1; int64 expired_at = 2; @@ -422,9 +437,11 @@ message UserTriggerTaskReq { } message UserTriggerTaskResp { - bool result = 1; - // if trigger inline, the execution id will be returned - string execution_id = 2; + // 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 + string execution_id = 1; } service Aggregator { @@ -441,7 +458,7 @@ service Aggregator { rpc ListTasks(ListTasksReq) returns (ListTasksResp) {}; rpc GetTask(IdReq) returns (Task) {}; rpc ListExecutions(ListExecutionsReq) returns (ListExecutionsResp) {}; - rpc GetExecution(GetExecutionReq) returns (Execution) {}; + rpc GetExecution(GetExecutionReq) returns (GetExecutionResp) {}; 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 d3a0a0a..d8df57b 100644 --- a/protobuf/avs_grpc.pb.go +++ b/protobuf/avs_grpc.pb.go @@ -34,7 +34,7 @@ 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) (*Execution, error) + GetExecution(ctx context.Context, in *GetExecutionReq, opts ...grpc.CallOption) (*GetExecutionResp, 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 +120,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) (*Execution, error) { - out := new(Execution) +func (c *aggregatorClient) GetExecution(ctx context.Context, in *GetExecutionReq, opts ...grpc.CallOption) (*GetExecutionResp, error) { + out := new(GetExecutionResp) err := c.cc.Invoke(ctx, "/aggregator.Aggregator/GetExecution", in, out, opts...) if err != nil { return nil, err @@ -171,7 +171,7 @@ 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) (*Execution, error) + GetExecution(context.Context, *GetExecutionReq) (*GetExecutionResp, error) CancelTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) DeleteTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) TriggerTask(context.Context, *UserTriggerTaskReq) (*UserTriggerTaskResp, error) @@ -206,7 +206,7 @@ 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) (*Execution, error) { +func (UnimplementedAggregatorServer) GetExecution(context.Context, *GetExecutionReq) (*GetExecutionResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetExecution not implemented") } func (UnimplementedAggregatorServer) CancelTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) {