diff --git a/internal/cmd/commands.go b/internal/cmd/commands.go index ca38200..44d647e 100644 --- a/internal/cmd/commands.go +++ b/internal/cmd/commands.go @@ -61,11 +61,6 @@ func Commands() map[string]cli.CommandFactory { Meta: meta, }, nil }, - "deployment status": func() (cli.Command, error) { - return &DeploymentStatusCommand{ - Meta: meta, - }, nil - }, "destroy": func() (cli.Command, error) { return &DestroyCommand{ Meta: meta, diff --git a/internal/cmd/deployment_status.go b/internal/cmd/deployment_status.go deleted file mode 100644 index eafd8e1..0000000 --- a/internal/cmd/deployment_status.go +++ /dev/null @@ -1,105 +0,0 @@ -package cmd - -import ( - "context" - "fmt" - - "github.com/umbracle/vesta/internal/server/proto" -) - -// DeploymentStatusCommand is the command to show the version of the agent -type DeploymentStatusCommand struct { - *Meta -} - -// Help implements the cli.Command interface -func (c *DeploymentStatusCommand) Help() string { - return `Usage: vesta deployment status - - Output the status of a deployment` -} - -// Synopsis implements the cli.Command interface -func (c *DeploymentStatusCommand) Synopsis() string { - return "Output the status of a deployment" -} - -// Run implements the cli.Command interface -func (c *DeploymentStatusCommand) Run(args []string) int { - flags := c.FlagSet("deployment status") - if err := flags.Parse(args); err != nil { - c.UI.Error(err.Error()) - return 1 - } - - args = flags.Args() - if len(args) != 1 { - c.UI.Error("incorrect input, provide one argument") - return 1 - } - - id := args[0] - - client, err := c.Conn() - if err != nil { - c.UI.Error(err.Error()) - return 1 - } - - resp, err := client.DeploymentStatus(context.Background(), &proto.DeploymentStatusRequest{Id: id}) - if err != nil { - c.UI.Error(err.Error()) - return 1 - } - - c.UI.Output(c.Colorize().Color(formatNodeStatus(resp))) - return 0 -} - -func formatNodeStatus(r *proto.DeploymentStatusResponse) string { - node := r.Allocation - - base := formatKV([]string{ - fmt.Sprintf("ID|%s", node.Id), - fmt.Sprintf("Status|%s", node.Status), - fmt.Sprintf("Sequence|%d", node.Sequence), - fmt.Sprintf("Name|%s", node.Alias), - }) - - taskRows := make([]string, len(node.Tasks)+1) - taskRows[0] = "ID|Name|Image|State" - - i := 1 - for name, d := range node.Tasks { - var state, id string - if taskState, ok := node.TaskStates[name]; ok { - state = taskState.State.String() - id = taskState.Id - } - - taskRows[i] = fmt.Sprintf("%s|%s|%s|%s", - id, - name, - d.Image, - state, - ) - i += 1 - } - - base += "\n\n[bold]Tasks[reset]\n" - base += formatList(taskRows) - - if len(node.SyncStatus) == 1 { - for _, syncStatus := range node.SyncStatus { - base += "\n\n[bold]Sync status[reset]\n" - base += formatKV([]string{ - fmt.Sprintf("Peers|%d", syncStatus.NumPeers), - fmt.Sprintf("Highest block|%d", syncStatus.HighestBlock), - fmt.Sprintf("Current block|%d", syncStatus.CurrentBlock), - fmt.Sprintf("Synced|%v", syncStatus.IsSynced), - }) - } - } - - return base -} diff --git a/internal/server/proto/utils.go b/internal/server/proto/utils.go deleted file mode 100644 index 5534467..0000000 --- a/internal/server/proto/utils.go +++ /dev/null @@ -1,16 +0,0 @@ -package proto - -import ( - "google.golang.org/protobuf/proto" -) - -const ( - TaskStarted = "Started" - TaskTerminated = "Terminated" - TaskRestarting = "Restarting" - TaskNotRestarting = "Not-restarting" -) - -func (a *Allocation) Copy() *Allocation { - return proto.Clone(a).(*Allocation) -} diff --git a/internal/server/proto/vesta.pb.go b/internal/server/proto/vesta.pb.go index 5dc3c66..574d085 100644 --- a/internal/server/proto/vesta.pb.go +++ b/internal/server/proto/vesta.pb.go @@ -20,153 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Allocation_Status int32 - -const ( - Allocation_Pending Allocation_Status = 0 - Allocation_Running Allocation_Status = 1 - Allocation_Complete Allocation_Status = 2 - Allocation_Failed Allocation_Status = 3 -) - -// Enum value maps for Allocation_Status. -var ( - Allocation_Status_name = map[int32]string{ - 0: "Pending", - 1: "Running", - 2: "Complete", - 3: "Failed", - } - Allocation_Status_value = map[string]int32{ - "Pending": 0, - "Running": 1, - "Complete": 2, - "Failed": 3, - } -) - -func (x Allocation_Status) Enum() *Allocation_Status { - p := new(Allocation_Status) - *p = x - return p -} - -func (x Allocation_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Allocation_Status) Descriptor() protoreflect.EnumDescriptor { - return file_internal_server_proto_vesta_proto_enumTypes[0].Descriptor() -} - -func (Allocation_Status) Type() protoreflect.EnumType { - return &file_internal_server_proto_vesta_proto_enumTypes[0] -} - -func (x Allocation_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Allocation_Status.Descriptor instead. -func (Allocation_Status) EnumDescriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{24, 0} -} - -type Allocation_DesiredStatus int32 - -const ( - Allocation_Run Allocation_DesiredStatus = 0 - Allocation_Stop Allocation_DesiredStatus = 1 -) - -// Enum value maps for Allocation_DesiredStatus. -var ( - Allocation_DesiredStatus_name = map[int32]string{ - 0: "Run", - 1: "Stop", - } - Allocation_DesiredStatus_value = map[string]int32{ - "Run": 0, - "Stop": 1, - } -) - -func (x Allocation_DesiredStatus) Enum() *Allocation_DesiredStatus { - p := new(Allocation_DesiredStatus) - *p = x - return p -} - -func (x Allocation_DesiredStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Allocation_DesiredStatus) Descriptor() protoreflect.EnumDescriptor { - return file_internal_server_proto_vesta_proto_enumTypes[1].Descriptor() -} - -func (Allocation_DesiredStatus) Type() protoreflect.EnumType { - return &file_internal_server_proto_vesta_proto_enumTypes[1] -} - -func (x Allocation_DesiredStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Allocation_DesiredStatus.Descriptor instead. -func (Allocation_DesiredStatus) EnumDescriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{24, 1} -} - -type TaskState_State int32 - -const ( - TaskState_Pending TaskState_State = 0 - TaskState_Running TaskState_State = 1 - TaskState_Dead TaskState_State = 2 -) - -// Enum value maps for TaskState_State. -var ( - TaskState_State_name = map[int32]string{ - 0: "Pending", - 1: "Running", - 2: "Dead", - } - TaskState_State_value = map[string]int32{ - "Pending": 0, - "Running": 1, - "Dead": 2, - } -) - -func (x TaskState_State) Enum() *TaskState_State { - p := new(TaskState_State) - *p = x - return p -} - -func (x TaskState_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TaskState_State) Descriptor() protoreflect.EnumDescriptor { - return file_internal_server_proto_vesta_proto_enumTypes[2].Descriptor() -} - -func (TaskState_State) Type() protoreflect.EnumType { - return &file_internal_server_proto_vesta_proto_enumTypes[2] -} - -func (x TaskState_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TaskState_State.Descriptor instead. -func (TaskState_State) EnumDescriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{25, 0} -} - type VolumeListRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -724,100 +577,6 @@ func (*DestroyResponse) Descriptor() ([]byte, []int) { return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{12} } -type DeploymentStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeploymentStatusRequest) Reset() { - *x = DeploymentStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeploymentStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeploymentStatusRequest) ProtoMessage() {} - -func (x *DeploymentStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeploymentStatusRequest.ProtoReflect.Descriptor instead. -func (*DeploymentStatusRequest) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{13} -} - -func (x *DeploymentStatusRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeploymentStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Allocation *Allocation `protobuf:"bytes,1,opt,name=allocation,proto3" json:"allocation,omitempty"` -} - -func (x *DeploymentStatusResponse) Reset() { - *x = DeploymentStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeploymentStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeploymentStatusResponse) ProtoMessage() {} - -func (x *DeploymentStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeploymentStatusResponse.ProtoReflect.Descriptor instead. -func (*DeploymentStatusResponse) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{14} -} - -func (x *DeploymentStatusResponse) GetAllocation() *Allocation { - if x != nil { - return x.Allocation - } - return nil -} - type ListDeploymentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -827,7 +586,7 @@ type ListDeploymentRequest struct { func (x *ListDeploymentRequest) Reset() { *x = ListDeploymentRequest{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[15] + mi := &file_internal_server_proto_vesta_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -840,7 +599,7 @@ func (x *ListDeploymentRequest) String() string { func (*ListDeploymentRequest) ProtoMessage() {} func (x *ListDeploymentRequest) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[15] + mi := &file_internal_server_proto_vesta_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -853,7 +612,7 @@ func (x *ListDeploymentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListDeploymentRequest.ProtoReflect.Descriptor instead. func (*ListDeploymentRequest) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{15} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{13} } type ListDeploymentResponse struct { @@ -867,7 +626,7 @@ type ListDeploymentResponse struct { func (x *ListDeploymentResponse) Reset() { *x = ListDeploymentResponse{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[16] + mi := &file_internal_server_proto_vesta_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -880,7 +639,7 @@ func (x *ListDeploymentResponse) String() string { func (*ListDeploymentResponse) ProtoMessage() {} func (x *ListDeploymentResponse) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[16] + mi := &file_internal_server_proto_vesta_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -893,7 +652,7 @@ func (x *ListDeploymentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListDeploymentResponse.ProtoReflect.Descriptor instead. func (*ListDeploymentResponse) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{16} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{14} } func (x *ListDeploymentResponse) GetServices() []*Service { @@ -923,7 +682,7 @@ type ApplyRequest struct { func (x *ApplyRequest) Reset() { *x = ApplyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[17] + mi := &file_internal_server_proto_vesta_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -936,7 +695,7 @@ func (x *ApplyRequest) String() string { func (*ApplyRequest) ProtoMessage() {} func (x *ApplyRequest) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[17] + mi := &file_internal_server_proto_vesta_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -949,7 +708,7 @@ func (x *ApplyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyRequest.ProtoReflect.Descriptor instead. func (*ApplyRequest) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{17} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{15} } func (x *ApplyRequest) GetAction() string { @@ -1012,7 +771,7 @@ type ApplyResponse struct { func (x *ApplyResponse) Reset() { *x = ApplyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[18] + mi := &file_internal_server_proto_vesta_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1025,7 +784,7 @@ func (x *ApplyResponse) String() string { func (*ApplyResponse) ProtoMessage() {} func (x *ApplyResponse) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[18] + mi := &file_internal_server_proto_vesta_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1038,7 +797,7 @@ func (x *ApplyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyResponse.ProtoReflect.Descriptor instead. func (*ApplyResponse) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{18} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{16} } func (x *ApplyResponse) GetId() string { @@ -1062,7 +821,7 @@ type Item struct { func (x *Item) Reset() { *x = Item{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[19] + mi := &file_internal_server_proto_vesta_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1075,7 +834,7 @@ func (x *Item) String() string { func (*Item) ProtoMessage() {} func (x *Item) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[19] + mi := &file_internal_server_proto_vesta_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1088,7 +847,7 @@ func (x *Item) ProtoReflect() protoreflect.Message { // Deprecated: Use Item.ProtoReflect.Descriptor instead. func (*Item) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{19} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{17} } func (x *Item) GetName() string { @@ -1112,70 +871,6 @@ func (x *Item) GetChains() []string { return nil } -// Node1 is a node that can allocate resources -type Node struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Datacenter string `protobuf:"bytes,2,opt,name=datacenter,proto3" json:"datacenter,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Node) Reset() { - *x = Node{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Node) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Node) ProtoMessage() {} - -func (x *Node) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Node.ProtoReflect.Descriptor instead. -func (*Node) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{20} -} - -func (x *Node) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Node) GetDatacenter() string { - if x != nil { - return x.Datacenter - } - return "" -} - -func (x *Node) GetName() string { - if x != nil { - return x.Name - } - return "" -} - type Service struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1190,7 +885,7 @@ type Service struct { func (x *Service) Reset() { *x = Service{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[21] + mi := &file_internal_server_proto_vesta_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1203,7 +898,7 @@ func (x *Service) String() string { func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[21] + mi := &file_internal_server_proto_vesta_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1216,7 +911,7 @@ func (x *Service) ProtoReflect() protoreflect.Message { // Deprecated: Use Service.ProtoReflect.Descriptor instead. func (*Service) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{21} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{18} } func (x *Service) GetName() string { @@ -1260,7 +955,7 @@ type Volume struct { func (x *Volume) Reset() { *x = Volume{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[22] + mi := &file_internal_server_proto_vesta_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1273,7 +968,7 @@ func (x *Volume) String() string { func (*Volume) ProtoMessage() {} func (x *Volume) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[22] + mi := &file_internal_server_proto_vesta_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1286,7 +981,7 @@ func (x *Volume) ProtoReflect() protoreflect.Message { // Deprecated: Use Volume.ProtoReflect.Descriptor instead. func (*Volume) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{22} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{19} } func (x *Volume) GetId() string { @@ -1334,7 +1029,7 @@ type Task struct { func (x *Task) Reset() { *x = Task{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[23] + mi := &file_internal_server_proto_vesta_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1347,7 +1042,7 @@ func (x *Task) String() string { func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[23] + mi := &file_internal_server_proto_vesta_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1360,7 +1055,7 @@ func (x *Task) ProtoReflect() protoreflect.Message { // Deprecated: Use Task.ProtoReflect.Descriptor instead. func (*Task) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{23} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{20} } func (x *Task) GetImage() string { @@ -1447,212 +1142,6 @@ func (x *Task) GetPorts() []*Task_Port { return nil } -// Allocation represents an allocation of a deployment -type Allocation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id of the allocation - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // node to which the allocation is assigned - NodeId string `protobuf:"bytes,2,opt,name=nodeId,proto3" json:"nodeId,omitempty"` - // tasks to run on the allocation - Tasks map[string]*Task `protobuf:"bytes,3,rep,name=tasks,proto3" json:"tasks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // state of each of the tasks - TaskStates map[string]*TaskState `protobuf:"bytes,4,rep,name=taskStates,proto3" json:"taskStates,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // status of the allocation - Status Allocation_Status `protobuf:"varint,5,opt,name=status,proto3,enum=proto.Allocation_Status" json:"status,omitempty"` - SyncStatus map[string]*Allocation_SyncStatus `protobuf:"bytes,6,rep,name=syncStatus,proto3" json:"syncStatus,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // desired status of the allocation - DesiredStatus Allocation_DesiredStatus `protobuf:"varint,7,opt,name=desiredStatus,proto3,enum=proto.Allocation_DesiredStatus" json:"desiredStatus,omitempty"` - // modify index sequence number - Sequence int64 `protobuf:"varint,8,opt,name=sequence,proto3" json:"sequence,omitempty"` - InputState []byte `protobuf:"bytes,9,opt,name=inputState,proto3" json:"inputState,omitempty"` - Alias string `protobuf:"bytes,10,opt,name=alias,proto3" json:"alias,omitempty"` -} - -func (x *Allocation) Reset() { - *x = Allocation{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Allocation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Allocation) ProtoMessage() {} - -func (x *Allocation) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[24] - 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 Allocation.ProtoReflect.Descriptor instead. -func (*Allocation) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{24} -} - -func (x *Allocation) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Allocation) GetNodeId() string { - if x != nil { - return x.NodeId - } - return "" -} - -func (x *Allocation) GetTasks() map[string]*Task { - if x != nil { - return x.Tasks - } - return nil -} - -func (x *Allocation) GetTaskStates() map[string]*TaskState { - if x != nil { - return x.TaskStates - } - return nil -} - -func (x *Allocation) GetStatus() Allocation_Status { - if x != nil { - return x.Status - } - return Allocation_Pending -} - -func (x *Allocation) GetSyncStatus() map[string]*Allocation_SyncStatus { - if x != nil { - return x.SyncStatus - } - return nil -} - -func (x *Allocation) GetDesiredStatus() Allocation_DesiredStatus { - if x != nil { - return x.DesiredStatus - } - return Allocation_Run -} - -func (x *Allocation) GetSequence() int64 { - if x != nil { - return x.Sequence - } - return 0 -} - -func (x *Allocation) GetInputState() []byte { - if x != nil { - return x.InputState - } - return nil -} - -func (x *Allocation) GetAlias() string { - if x != nil { - return x.Alias - } - return "" -} - -type TaskState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - State TaskState_State `protobuf:"varint,1,opt,name=state,proto3,enum=proto.TaskState_State" json:"state,omitempty"` - Failed bool `protobuf:"varint,2,opt,name=failed,proto3" json:"failed,omitempty"` - Restarts uint64 `protobuf:"varint,3,opt,name=restarts,proto3" json:"restarts,omitempty"` - Id string `protobuf:"bytes,6,opt,name=id,proto3" json:"id,omitempty"` - Killing bool `protobuf:"varint,7,opt,name=killing,proto3" json:"killing,omitempty"` -} - -func (x *TaskState) Reset() { - *x = TaskState{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskState) ProtoMessage() {} - -func (x *TaskState) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[25] - 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 TaskState.ProtoReflect.Descriptor instead. -func (*TaskState) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{25} -} - -func (x *TaskState) GetState() TaskState_State { - if x != nil { - return x.State - } - return TaskState_Pending -} - -func (x *TaskState) GetFailed() bool { - if x != nil { - return x.Failed - } - return false -} - -func (x *TaskState) GetRestarts() uint64 { - if x != nil { - return x.Restarts - } - return 0 -} - -func (x *TaskState) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *TaskState) GetKilling() bool { - if x != nil { - return x.Killing - } - return false -} - type Event struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1669,7 +1158,7 @@ type Event struct { func (x *Event) Reset() { *x = Event{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[26] + mi := &file_internal_server_proto_vesta_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1682,7 +1171,7 @@ func (x *Event) String() string { func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[26] + mi := &file_internal_server_proto_vesta_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1695,7 +1184,7 @@ func (x *Event) ProtoReflect() protoreflect.Message { // Deprecated: Use Event.ProtoReflect.Descriptor instead. func (*Event) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{26} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{21} } func (x *Event) GetId() string { @@ -1755,7 +1244,7 @@ type Item_Field struct { func (x *Item_Field) Reset() { *x = Item_Field{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[27] + mi := &file_internal_server_proto_vesta_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1768,7 +1257,7 @@ func (x *Item_Field) String() string { func (*Item_Field) ProtoMessage() {} func (x *Item_Field) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[27] + mi := &file_internal_server_proto_vesta_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1781,7 +1270,7 @@ func (x *Item_Field) ProtoReflect() protoreflect.Message { // Deprecated: Use Item_Field.ProtoReflect.Descriptor instead. func (*Item_Field) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{19, 0} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{17, 0} } func (x *Item_Field) GetName() string { @@ -1832,7 +1321,7 @@ type Task_Volume struct { func (x *Task_Volume) Reset() { *x = Task_Volume{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[34] + mi := &file_internal_server_proto_vesta_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1845,7 +1334,7 @@ func (x *Task_Volume) String() string { func (*Task_Volume) ProtoMessage() {} func (x *Task_Volume) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[34] + mi := &file_internal_server_proto_vesta_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1858,7 +1347,7 @@ func (x *Task_Volume) ProtoReflect() protoreflect.Message { // Deprecated: Use Task_Volume.ProtoReflect.Descriptor instead. func (*Task_Volume) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{23, 4} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{20, 4} } func (x *Task_Volume) GetName() string { @@ -1894,7 +1383,7 @@ type Task_Telemetry struct { func (x *Task_Telemetry) Reset() { *x = Task_Telemetry{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[35] + mi := &file_internal_server_proto_vesta_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1907,7 +1396,7 @@ func (x *Task_Telemetry) String() string { func (*Task_Telemetry) ProtoMessage() {} func (x *Task_Telemetry) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[35] + mi := &file_internal_server_proto_vesta_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1920,7 +1409,7 @@ func (x *Task_Telemetry) ProtoReflect() protoreflect.Message { // Deprecated: Use Task_Telemetry.ProtoReflect.Descriptor instead. func (*Task_Telemetry) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{23, 5} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{20, 5} } func (x *Task_Telemetry) GetPort() uint64 { @@ -1949,7 +1438,7 @@ type Task_Artifact struct { func (x *Task_Artifact) Reset() { *x = Task_Artifact{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[36] + mi := &file_internal_server_proto_vesta_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1962,7 +1451,7 @@ func (x *Task_Artifact) String() string { func (*Task_Artifact) ProtoMessage() {} func (x *Task_Artifact) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[36] + mi := &file_internal_server_proto_vesta_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1975,7 +1464,7 @@ func (x *Task_Artifact) ProtoReflect() protoreflect.Message { // Deprecated: Use Task_Artifact.ProtoReflect.Descriptor instead. func (*Task_Artifact) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{23, 6} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{20, 6} } func (x *Task_Artifact) GetSource() string { @@ -2004,7 +1493,7 @@ type Task_Port struct { func (x *Task_Port) Reset() { *x = Task_Port{} if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[37] + mi := &file_internal_server_proto_vesta_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2017,7 +1506,7 @@ func (x *Task_Port) String() string { func (*Task_Port) ProtoMessage() {} func (x *Task_Port) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[37] + mi := &file_internal_server_proto_vesta_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2030,7 +1519,7 @@ func (x *Task_Port) ProtoReflect() protoreflect.Message { // Deprecated: Use Task_Port.ProtoReflect.Descriptor instead. func (*Task_Port) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{23, 7} + return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{20, 7} } func (x *Task_Port) GetName() string { @@ -2047,77 +1536,6 @@ func (x *Task_Port) GetPort() uint64 { return 0 } -type Allocation_SyncStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IsSynced bool `protobuf:"varint,1,opt,name=isSynced,proto3" json:"isSynced,omitempty"` - CurrentBlock uint64 `protobuf:"varint,2,opt,name=currentBlock,proto3" json:"currentBlock,omitempty"` - HighestBlock uint64 `protobuf:"varint,3,opt,name=highestBlock,proto3" json:"highestBlock,omitempty"` - NumPeers uint64 `protobuf:"varint,4,opt,name=numPeers,proto3" json:"numPeers,omitempty"` -} - -func (x *Allocation_SyncStatus) Reset() { - *x = Allocation_SyncStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_server_proto_vesta_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Allocation_SyncStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Allocation_SyncStatus) ProtoMessage() {} - -func (x *Allocation_SyncStatus) ProtoReflect() protoreflect.Message { - mi := &file_internal_server_proto_vesta_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Allocation_SyncStatus.ProtoReflect.Descriptor instead. -func (*Allocation_SyncStatus) Descriptor() ([]byte, []int) { - return file_internal_server_proto_vesta_proto_rawDescGZIP(), []int{24, 3} -} - -func (x *Allocation_SyncStatus) GetIsSynced() bool { - if x != nil { - return x.IsSynced - } - return false -} - -func (x *Allocation_SyncStatus) GetCurrentBlock() uint64 { - if x != nil { - return x.CurrentBlock - } - return 0 -} - -func (x *Allocation_SyncStatus) GetHighestBlock() uint64 { - if x != nil { - return x.HighestBlock - } - return 0 -} - -func (x *Allocation_SyncStatus) GetNumPeers() uint64 { - if x != nil { - return x.NumPeers - } - return 0 -} - var File_internal_server_proto_vesta_proto protoreflect.FileDescriptor var file_internal_server_proto_vesta_proto_rawDesc = []byte{ @@ -2151,260 +1569,172 @@ var file_internal_server_proto_vesta_proto_rawDesc = []byte{ 0x20, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x4d, 0x0a, 0x18, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x61, - 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x17, - 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0xc2, 0x01, - 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x22, 0x0a, 0x0c, - 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x22, 0x1f, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x29, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x73, 0x1a, 0x87, 0x01, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x4a, 0x0a, - 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, - 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x63, - 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x74, 0x61, 0x73, - 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, - 0x65, 0x76, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, - 0x72, 0x65, 0x76, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x07, 0x76, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x73, 0x1a, 0x45, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9a, 0x01, 0x0a, 0x06, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xac, 0x07, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, - 0x76, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, - 0x6e, 0x76, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4f, - 0x70, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x4f, 0x70, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x32, 0x0a, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x76, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, - 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x52, 0x09, - 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x61, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x0f, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, - 0x50, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x1a, 0x36, 0x0a, 0x08, 0x45, - 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x37, - 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4e, 0x0a, 0x0c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x06, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x1a, 0x33, 0x0a, 0x09, 0x54, 0x65, 0x6c, - 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x44, - 0x0a, 0x08, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2e, 0x0a, 0x04, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x22, 0x9f, 0x07, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x74, - 0x61, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, - 0x41, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x73, 0x79, 0x6e, - 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x45, 0x0a, 0x0d, 0x64, 0x65, 0x73, 0x69, 0x72, - 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x0d, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, - 0x69, 0x61, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x1a, 0x45, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4f, 0x0a, 0x0f, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x8c, 0x01, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x65, 0x64, - 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x68, 0x69, 0x67, 0x68, - 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x50, - 0x65, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x50, - 0x65, 0x65, 0x72, 0x73, 0x22, 0x3c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, - 0x0a, 0x07, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, - 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x10, 0x03, 0x22, 0x22, 0x0a, 0x0d, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x75, 0x6e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x53, 0x74, 0x6f, 0x70, 0x10, 0x01, 0x22, 0xc4, 0x01, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x69, 0x6c, 0x6c, 0x69, 0x6e, - 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6b, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, - 0x22, 0x2b, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, - 0x67, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x65, 0x61, 0x64, 0x10, 0x02, 0x22, 0x8f, 0x01, - 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, - 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x32, - 0x9c, 0x05, 0x0a, 0x0c, 0x56, 0x65, 0x73, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x32, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x12, - 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, - 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, - 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, - 0x10, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x43, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, - 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x2f, 0x0a, 0x04, 0x53, 0x74, - 0x6f, 0x70, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, - 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x18, - 0x5a, 0x16, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, + 0x16, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x1f, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x6c, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x04, 0x49, 0x74, + 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, + 0x74, 0x65, 0x6d, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x1a, 0x87, 0x01, 0x0a, 0x05, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x76, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x72, 0x65, 0x76, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x27, 0x0a, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x1a, 0x45, 0x0a, 0x0a, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x9a, 0x01, 0x0a, 0x06, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0xac, 0x07, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, + 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, + 0x61, 0x72, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x45, + 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x2f, 0x0a, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, + 0x0b, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x12, + 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x07, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x33, + 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x54, + 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, + 0x74, 0x72, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, + 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x05, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, + 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x4e, 0x0a, 0x0c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x40, 0x0a, 0x06, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x1a, 0x33, 0x0a, 0x09, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x44, 0x0a, 0x08, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2e, + 0x0a, 0x04, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x8f, + 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x32, 0xc7, 0x04, 0x0a, 0x0c, 0x56, 0x65, 0x73, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x32, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, + 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4d, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, + 0x0a, 0x0b, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x2f, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x12, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x18, 0x5a, 0x16, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2419,107 +1749,82 @@ func file_internal_server_proto_vesta_proto_rawDescGZIP() []byte { return file_internal_server_proto_vesta_proto_rawDescData } -var file_internal_server_proto_vesta_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_internal_server_proto_vesta_proto_msgTypes = make([]protoimpl.MessageInfo, 42) +var file_internal_server_proto_vesta_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_internal_server_proto_vesta_proto_goTypes = []interface{}{ - (Allocation_Status)(0), // 0: proto.Allocation.Status - (Allocation_DesiredStatus)(0), // 1: proto.Allocation.DesiredStatus - (TaskState_State)(0), // 2: proto.TaskState.State - (*VolumeListRequest)(nil), // 3: proto.VolumeListRequest - (*VolumeListResponse)(nil), // 4: proto.VolumeListResponse - (*StopRequest)(nil), // 5: proto.StopRequest - (*StopResponse)(nil), // 6: proto.StopResponse - (*SubscribeEventsRequest)(nil), // 7: proto.SubscribeEventsRequest - (*PingRequest)(nil), // 8: proto.PingRequest - (*PingResponse)(nil), // 9: proto.PingResponse - (*CatalogListRequest)(nil), // 10: proto.CatalogListRequest - (*CatalogListResponse)(nil), // 11: proto.CatalogListResponse - (*CatalogInspectRequest)(nil), // 12: proto.CatalogInspectRequest - (*CatalogInspectResponse)(nil), // 13: proto.CatalogInspectResponse - (*DestroyRequest)(nil), // 14: proto.DestroyRequest - (*DestroyResponse)(nil), // 15: proto.DestroyResponse - (*DeploymentStatusRequest)(nil), // 16: proto.DeploymentStatusRequest - (*DeploymentStatusResponse)(nil), // 17: proto.DeploymentStatusResponse - (*ListDeploymentRequest)(nil), // 18: proto.ListDeploymentRequest - (*ListDeploymentResponse)(nil), // 19: proto.ListDeploymentResponse - (*ApplyRequest)(nil), // 20: proto.ApplyRequest - (*ApplyResponse)(nil), // 21: proto.ApplyResponse - (*Item)(nil), // 22: proto.Item - (*Node)(nil), // 23: proto.Node - (*Service)(nil), // 24: proto.Service - (*Volume)(nil), // 25: proto.Volume - (*Task)(nil), // 26: proto.Task - (*Allocation)(nil), // 27: proto.Allocation - (*TaskState)(nil), // 28: proto.TaskState - (*Event)(nil), // 29: proto.Event - (*Item_Field)(nil), // 30: proto.Item.Field - nil, // 31: proto.Service.TasksEntry - nil, // 32: proto.Volume.LabelsEntry - nil, // 33: proto.Task.EnvEntry - nil, // 34: proto.Task.LabelsEntry - nil, // 35: proto.Task.DataEntry - nil, // 36: proto.Task.VolumesEntry - (*Task_Volume)(nil), // 37: proto.Task.Volume - (*Task_Telemetry)(nil), // 38: proto.Task.Telemetry - (*Task_Artifact)(nil), // 39: proto.Task.Artifact - (*Task_Port)(nil), // 40: proto.Task.Port - nil, // 41: proto.Allocation.TasksEntry - nil, // 42: proto.Allocation.TaskStatesEntry - nil, // 43: proto.Allocation.SyncStatusEntry - (*Allocation_SyncStatus)(nil), // 44: proto.Allocation.SyncStatus + (*VolumeListRequest)(nil), // 0: proto.VolumeListRequest + (*VolumeListResponse)(nil), // 1: proto.VolumeListResponse + (*StopRequest)(nil), // 2: proto.StopRequest + (*StopResponse)(nil), // 3: proto.StopResponse + (*SubscribeEventsRequest)(nil), // 4: proto.SubscribeEventsRequest + (*PingRequest)(nil), // 5: proto.PingRequest + (*PingResponse)(nil), // 6: proto.PingResponse + (*CatalogListRequest)(nil), // 7: proto.CatalogListRequest + (*CatalogListResponse)(nil), // 8: proto.CatalogListResponse + (*CatalogInspectRequest)(nil), // 9: proto.CatalogInspectRequest + (*CatalogInspectResponse)(nil), // 10: proto.CatalogInspectResponse + (*DestroyRequest)(nil), // 11: proto.DestroyRequest + (*DestroyResponse)(nil), // 12: proto.DestroyResponse + (*ListDeploymentRequest)(nil), // 13: proto.ListDeploymentRequest + (*ListDeploymentResponse)(nil), // 14: proto.ListDeploymentResponse + (*ApplyRequest)(nil), // 15: proto.ApplyRequest + (*ApplyResponse)(nil), // 16: proto.ApplyResponse + (*Item)(nil), // 17: proto.Item + (*Service)(nil), // 18: proto.Service + (*Volume)(nil), // 19: proto.Volume + (*Task)(nil), // 20: proto.Task + (*Event)(nil), // 21: proto.Event + (*Item_Field)(nil), // 22: proto.Item.Field + nil, // 23: proto.Service.TasksEntry + nil, // 24: proto.Volume.LabelsEntry + nil, // 25: proto.Task.EnvEntry + nil, // 26: proto.Task.LabelsEntry + nil, // 27: proto.Task.DataEntry + nil, // 28: proto.Task.VolumesEntry + (*Task_Volume)(nil), // 29: proto.Task.Volume + (*Task_Telemetry)(nil), // 30: proto.Task.Telemetry + (*Task_Artifact)(nil), // 31: proto.Task.Artifact + (*Task_Port)(nil), // 32: proto.Task.Port } var file_internal_server_proto_vesta_proto_depIdxs = []int32{ - 25, // 0: proto.VolumeListResponse.volumes:type_name -> proto.Volume - 22, // 1: proto.CatalogInspectResponse.item:type_name -> proto.Item - 27, // 2: proto.DeploymentStatusResponse.allocation:type_name -> proto.Allocation - 24, // 3: proto.ListDeploymentResponse.services:type_name -> proto.Service - 30, // 4: proto.Item.fields:type_name -> proto.Item.Field - 31, // 5: proto.Service.tasks:type_name -> proto.Service.TasksEntry - 25, // 6: proto.Service.volumes:type_name -> proto.Volume - 32, // 7: proto.Volume.labels:type_name -> proto.Volume.LabelsEntry - 33, // 8: proto.Task.env:type_name -> proto.Task.EnvEntry - 34, // 9: proto.Task.labels:type_name -> proto.Task.LabelsEntry - 35, // 10: proto.Task.data:type_name -> proto.Task.DataEntry - 36, // 11: proto.Task.volumes:type_name -> proto.Task.VolumesEntry - 38, // 12: proto.Task.telemetry:type_name -> proto.Task.Telemetry - 39, // 13: proto.Task.artifacts:type_name -> proto.Task.Artifact - 40, // 14: proto.Task.ports:type_name -> proto.Task.Port - 41, // 15: proto.Allocation.tasks:type_name -> proto.Allocation.TasksEntry - 42, // 16: proto.Allocation.taskStates:type_name -> proto.Allocation.TaskStatesEntry - 0, // 17: proto.Allocation.status:type_name -> proto.Allocation.Status - 43, // 18: proto.Allocation.syncStatus:type_name -> proto.Allocation.SyncStatusEntry - 1, // 19: proto.Allocation.desiredStatus:type_name -> proto.Allocation.DesiredStatus - 2, // 20: proto.TaskState.state:type_name -> proto.TaskState.State - 26, // 21: proto.Service.TasksEntry.value:type_name -> proto.Task - 37, // 22: proto.Task.VolumesEntry.value:type_name -> proto.Task.Volume - 26, // 23: proto.Allocation.TasksEntry.value:type_name -> proto.Task - 28, // 24: proto.Allocation.TaskStatesEntry.value:type_name -> proto.TaskState - 44, // 25: proto.Allocation.SyncStatusEntry.value:type_name -> proto.Allocation.SyncStatus - 20, // 26: proto.VestaService.Apply:input_type -> proto.ApplyRequest - 14, // 27: proto.VestaService.Destroy:input_type -> proto.DestroyRequest - 18, // 28: proto.VestaService.DeploymentList:input_type -> proto.ListDeploymentRequest - 16, // 29: proto.VestaService.DeploymentStatus:input_type -> proto.DeploymentStatusRequest - 10, // 30: proto.VestaService.CatalogList:input_type -> proto.CatalogListRequest - 12, // 31: proto.VestaService.CatalogInspect:input_type -> proto.CatalogInspectRequest - 8, // 32: proto.VestaService.Ping:input_type -> proto.PingRequest - 7, // 33: proto.VestaService.SubscribeEvents:input_type -> proto.SubscribeEventsRequest - 5, // 34: proto.VestaService.Stop:input_type -> proto.StopRequest - 3, // 35: proto.VestaService.VolumeList:input_type -> proto.VolumeListRequest - 21, // 36: proto.VestaService.Apply:output_type -> proto.ApplyResponse - 15, // 37: proto.VestaService.Destroy:output_type -> proto.DestroyResponse - 19, // 38: proto.VestaService.DeploymentList:output_type -> proto.ListDeploymentResponse - 17, // 39: proto.VestaService.DeploymentStatus:output_type -> proto.DeploymentStatusResponse - 11, // 40: proto.VestaService.CatalogList:output_type -> proto.CatalogListResponse - 13, // 41: proto.VestaService.CatalogInspect:output_type -> proto.CatalogInspectResponse - 9, // 42: proto.VestaService.Ping:output_type -> proto.PingResponse - 29, // 43: proto.VestaService.SubscribeEvents:output_type -> proto.Event - 6, // 44: proto.VestaService.Stop:output_type -> proto.StopResponse - 4, // 45: proto.VestaService.VolumeList:output_type -> proto.VolumeListResponse - 36, // [36:46] is the sub-list for method output_type - 26, // [26:36] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 19, // 0: proto.VolumeListResponse.volumes:type_name -> proto.Volume + 17, // 1: proto.CatalogInspectResponse.item:type_name -> proto.Item + 18, // 2: proto.ListDeploymentResponse.services:type_name -> proto.Service + 22, // 3: proto.Item.fields:type_name -> proto.Item.Field + 23, // 4: proto.Service.tasks:type_name -> proto.Service.TasksEntry + 19, // 5: proto.Service.volumes:type_name -> proto.Volume + 24, // 6: proto.Volume.labels:type_name -> proto.Volume.LabelsEntry + 25, // 7: proto.Task.env:type_name -> proto.Task.EnvEntry + 26, // 8: proto.Task.labels:type_name -> proto.Task.LabelsEntry + 27, // 9: proto.Task.data:type_name -> proto.Task.DataEntry + 28, // 10: proto.Task.volumes:type_name -> proto.Task.VolumesEntry + 30, // 11: proto.Task.telemetry:type_name -> proto.Task.Telemetry + 31, // 12: proto.Task.artifacts:type_name -> proto.Task.Artifact + 32, // 13: proto.Task.ports:type_name -> proto.Task.Port + 20, // 14: proto.Service.TasksEntry.value:type_name -> proto.Task + 29, // 15: proto.Task.VolumesEntry.value:type_name -> proto.Task.Volume + 15, // 16: proto.VestaService.Apply:input_type -> proto.ApplyRequest + 11, // 17: proto.VestaService.Destroy:input_type -> proto.DestroyRequest + 13, // 18: proto.VestaService.DeploymentList:input_type -> proto.ListDeploymentRequest + 7, // 19: proto.VestaService.CatalogList:input_type -> proto.CatalogListRequest + 9, // 20: proto.VestaService.CatalogInspect:input_type -> proto.CatalogInspectRequest + 5, // 21: proto.VestaService.Ping:input_type -> proto.PingRequest + 4, // 22: proto.VestaService.SubscribeEvents:input_type -> proto.SubscribeEventsRequest + 2, // 23: proto.VestaService.Stop:input_type -> proto.StopRequest + 0, // 24: proto.VestaService.VolumeList:input_type -> proto.VolumeListRequest + 16, // 25: proto.VestaService.Apply:output_type -> proto.ApplyResponse + 12, // 26: proto.VestaService.Destroy:output_type -> proto.DestroyResponse + 14, // 27: proto.VestaService.DeploymentList:output_type -> proto.ListDeploymentResponse + 8, // 28: proto.VestaService.CatalogList:output_type -> proto.CatalogListResponse + 10, // 29: proto.VestaService.CatalogInspect:output_type -> proto.CatalogInspectResponse + 6, // 30: proto.VestaService.Ping:output_type -> proto.PingResponse + 21, // 31: proto.VestaService.SubscribeEvents:output_type -> proto.Event + 3, // 32: proto.VestaService.Stop:output_type -> proto.StopResponse + 1, // 33: proto.VestaService.VolumeList:output_type -> proto.VolumeListResponse + 25, // [25:34] is the sub-list for method output_type + 16, // [16:25] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_internal_server_proto_vesta_proto_init() } @@ -2685,30 +1990,6 @@ func file_internal_server_proto_vesta_proto_init() { } } file_internal_server_proto_vesta_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeploymentStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_server_proto_vesta_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeploymentStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_server_proto_vesta_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListDeploymentRequest); i { case 0: return &v.state @@ -2720,7 +2001,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListDeploymentResponse); i { case 0: return &v.state @@ -2732,7 +2013,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ApplyRequest); i { case 0: return &v.state @@ -2744,7 +2025,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ApplyResponse); i { case 0: return &v.state @@ -2756,7 +2037,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Item); i { case 0: return &v.state @@ -2768,19 +2049,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_server_proto_vesta_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Service); i { case 0: return &v.state @@ -2792,7 +2061,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Volume); i { case 0: return &v.state @@ -2804,7 +2073,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Task); i { case 0: return &v.state @@ -2816,31 +2085,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Allocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_server_proto_vesta_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_server_proto_vesta_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Event); i { case 0: return &v.state @@ -2852,7 +2097,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Item_Field); i { case 0: return &v.state @@ -2864,7 +2109,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Task_Volume); i { case 0: return &v.state @@ -2876,7 +2121,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Task_Telemetry); i { case 0: return &v.state @@ -2888,7 +2133,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Task_Artifact); i { case 0: return &v.state @@ -2900,7 +2145,7 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_internal_server_proto_vesta_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Task_Port); i { case 0: return &v.state @@ -2912,32 +2157,19 @@ func file_internal_server_proto_vesta_proto_init() { return nil } } - file_internal_server_proto_vesta_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Allocation_SyncStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_internal_server_proto_vesta_proto_rawDesc, - NumEnums: 3, - NumMessages: 42, + NumEnums: 0, + NumMessages: 33, NumExtensions: 0, NumServices: 1, }, GoTypes: file_internal_server_proto_vesta_proto_goTypes, DependencyIndexes: file_internal_server_proto_vesta_proto_depIdxs, - EnumInfos: file_internal_server_proto_vesta_proto_enumTypes, MessageInfos: file_internal_server_proto_vesta_proto_msgTypes, }.Build() File_internal_server_proto_vesta_proto = out.File diff --git a/internal/server/proto/vesta.proto b/internal/server/proto/vesta.proto index b0d7239..904d34e 100644 --- a/internal/server/proto/vesta.proto +++ b/internal/server/proto/vesta.proto @@ -8,7 +8,6 @@ service VestaService { rpc Apply(ApplyRequest) returns (ApplyResponse); rpc Destroy(DestroyRequest) returns (DestroyResponse); rpc DeploymentList(ListDeploymentRequest) returns (ListDeploymentResponse); - rpc DeploymentStatus(DeploymentStatusRequest) returns (DeploymentStatusResponse); rpc CatalogList(CatalogListRequest) returns (CatalogListResponse); rpc CatalogInspect(CatalogInspectRequest) returns (CatalogInspectResponse); rpc Ping(PingRequest) returns (PingResponse); @@ -63,14 +62,6 @@ message DestroyRequest { message DestroyResponse { } -message DeploymentStatusRequest { - string id = 1; -} - -message DeploymentStatusResponse { - Allocation allocation = 1; -} - message ListDeploymentRequest { } @@ -118,13 +109,6 @@ message Item { } } -// Node1 is a node that can allocate resources -message Node { - string id = 1; - string datacenter = 2; - string name = 3; -} - message Service { string name = 1; map tasks = 2; @@ -182,73 +166,6 @@ message Task { } } -// Allocation represents an allocation of a deployment -message Allocation { - // id of the allocation - string id = 1; - - // node to which the allocation is assigned - string nodeId = 2; - - // tasks to run on the allocation - map tasks = 3; - - // state of each of the tasks - map taskStates = 4; - - // status of the allocation - Status status = 5; - - map syncStatus = 6; - - // desired status of the allocation - DesiredStatus desiredStatus = 7; - - // modify index sequence number - int64 sequence = 8; - - bytes inputState = 9; - - string alias = 10; - - enum Status { - Pending = 0; - Running = 1; - Complete = 2; - Failed = 3; - } - - message SyncStatus { - bool isSynced = 1; - uint64 currentBlock = 2; - uint64 highestBlock = 3; - uint64 numPeers = 4; - } - - enum DesiredStatus { - Run = 0; - Stop = 1; - } -} - -message TaskState { - State state = 1; - - bool failed = 2; - - uint64 restarts = 3; - - string id = 6; - - bool killing = 7; - - enum State { - Pending = 0; - Running = 1; - Dead = 2; - } -} - message Event { string id = 1; diff --git a/internal/server/proto/vesta_grpc.pb.go b/internal/server/proto/vesta_grpc.pb.go index 70f576f..52d72c6 100644 --- a/internal/server/proto/vesta_grpc.pb.go +++ b/internal/server/proto/vesta_grpc.pb.go @@ -25,7 +25,6 @@ type VestaServiceClient interface { Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*DestroyResponse, error) DeploymentList(ctx context.Context, in *ListDeploymentRequest, opts ...grpc.CallOption) (*ListDeploymentResponse, error) - DeploymentStatus(ctx context.Context, in *DeploymentStatusRequest, opts ...grpc.CallOption) (*DeploymentStatusResponse, error) CatalogList(ctx context.Context, in *CatalogListRequest, opts ...grpc.CallOption) (*CatalogListResponse, error) CatalogInspect(ctx context.Context, in *CatalogInspectRequest, opts ...grpc.CallOption) (*CatalogInspectResponse, error) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) @@ -69,15 +68,6 @@ func (c *vestaServiceClient) DeploymentList(ctx context.Context, in *ListDeploym return out, nil } -func (c *vestaServiceClient) DeploymentStatus(ctx context.Context, in *DeploymentStatusRequest, opts ...grpc.CallOption) (*DeploymentStatusResponse, error) { - out := new(DeploymentStatusResponse) - err := c.cc.Invoke(ctx, "/proto.VestaService/DeploymentStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *vestaServiceClient) CatalogList(ctx context.Context, in *CatalogListRequest, opts ...grpc.CallOption) (*CatalogListResponse, error) { out := new(CatalogListResponse) err := c.cc.Invoke(ctx, "/proto.VestaService/CatalogList", in, out, opts...) @@ -162,7 +152,6 @@ type VestaServiceServer interface { Apply(context.Context, *ApplyRequest) (*ApplyResponse, error) Destroy(context.Context, *DestroyRequest) (*DestroyResponse, error) DeploymentList(context.Context, *ListDeploymentRequest) (*ListDeploymentResponse, error) - DeploymentStatus(context.Context, *DeploymentStatusRequest) (*DeploymentStatusResponse, error) CatalogList(context.Context, *CatalogListRequest) (*CatalogListResponse, error) CatalogInspect(context.Context, *CatalogInspectRequest) (*CatalogInspectResponse, error) Ping(context.Context, *PingRequest) (*PingResponse, error) @@ -185,9 +174,6 @@ func (UnimplementedVestaServiceServer) Destroy(context.Context, *DestroyRequest) func (UnimplementedVestaServiceServer) DeploymentList(context.Context, *ListDeploymentRequest) (*ListDeploymentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeploymentList not implemented") } -func (UnimplementedVestaServiceServer) DeploymentStatus(context.Context, *DeploymentStatusRequest) (*DeploymentStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeploymentStatus not implemented") -} func (UnimplementedVestaServiceServer) CatalogList(context.Context, *CatalogListRequest) (*CatalogListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CatalogList not implemented") } @@ -273,24 +259,6 @@ func _VestaService_DeploymentList_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _VestaService_DeploymentStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeploymentStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VestaServiceServer).DeploymentStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/proto.VestaService/DeploymentStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VestaServiceServer).DeploymentStatus(ctx, req.(*DeploymentStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _VestaService_CatalogList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CatalogListRequest) if err := dec(in); err != nil { @@ -421,10 +389,6 @@ var VestaService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeploymentList", Handler: _VestaService_DeploymentList_Handler, }, - { - MethodName: "DeploymentStatus", - Handler: _VestaService_DeploymentStatus_Handler, - }, { MethodName: "CatalogList", Handler: _VestaService_CatalogList_Handler, diff --git a/internal/server/server.go b/internal/server/server.go index 9de8151..1f1d3a1 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -12,8 +12,6 @@ import ( "github.com/boltdb/bolt" "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-memdb" - babel "github.com/umbracle/babel/sdk" "github.com/umbracle/vesta/internal/backend/docker" "github.com/umbracle/vesta/internal/catalog" "github.com/umbracle/vesta/internal/framework" @@ -332,58 +330,3 @@ func (s *Server) Create(req *proto.ApplyRequest) (string, error) { return alias, nil } - -func (s *Server) Pull(nodeId string, ws memdb.WatchSet) ([]*proto.Allocation, error) { - tasks, err := s.state.AllocationListByNodeId(nodeId, ws) - if err != nil { - return nil, err - } - return tasks, nil -} - -func (s *Server) UpdateSyncStatus(alloc, task string, status *babel.SyncStatus) error { - realAlloc, err := s.state.GetAllocation(alloc) - if err != nil { - return err - } - if realAlloc == nil { - return fmt.Errorf("alloc not found: %s", alloc) - } - - realAlloc = realAlloc.Copy() - if realAlloc.SyncStatus == nil { - realAlloc.SyncStatus = map[string]*proto.Allocation_SyncStatus{} - } - - realAlloc.SyncStatus[task] = &proto.Allocation_SyncStatus{ - IsSynced: status.IsSynced, - HighestBlock: status.HighestBlock, - CurrentBlock: status.CurrentBlock, - NumPeers: status.NumPeers, - } - - if err := s.state.UpsertAllocation(realAlloc); err != nil { - return err - } - return nil -} - -func (s *Server) UpdateAlloc(alloc *proto.Allocation) error { - // merge alloc types - realAlloc, err := s.state.GetAllocation(alloc.Id) - if err != nil { - return err - } - if realAlloc == nil { - return fmt.Errorf("alloc not found: %s", alloc) - } - - realAlloc = realAlloc.Copy() - realAlloc.Status = alloc.Status - realAlloc.TaskStates = alloc.TaskStates - - if err := s.state.UpsertAllocation(realAlloc); err != nil { - return err - } - return nil -} diff --git a/internal/server/service.go b/internal/server/service.go index 935b68b..f7eee13 100644 --- a/internal/server/service.go +++ b/internal/server/service.go @@ -57,17 +57,6 @@ func (s *service) DeploymentList(ctx context.Context, req *proto.ListDeploymentR return resp, nil } -func (s *service) DeploymentStatus(ctx context.Context, req *proto.DeploymentStatusRequest) (*proto.DeploymentStatusResponse, error) { - alloc, err := s.srv.state.AllocationByAliasOrIDOrPrefix(req.Id) - if err != nil { - return nil, err - } - resp := &proto.DeploymentStatusResponse{ - Allocation: alloc, - } - return resp, nil -} - func (s *service) Destroy(ctx context.Context, req *proto.DestroyRequest) (*proto.DestroyResponse, error) { s.srv.backend.Destroy(req.Id) diff --git a/internal/server/state/schema.go b/internal/server/state/schema.go index 00025a4..607b605 100644 --- a/internal/server/state/schema.go +++ b/internal/server/state/schema.go @@ -4,46 +4,6 @@ import "github.com/hashicorp/go-memdb" var schema = &memdb.DBSchema{ Tables: map[string]*memdb.TableSchema{ - "deployments": { - Name: "deployments", - Indexes: map[string]*memdb.IndexSchema{ - "id": { - Name: "id", - Unique: true, - Indexer: &memdb.StringFieldIndex{Field: "Id"}, - }, - }, - }, - "allocations": { - Name: "allocations", - Indexes: map[string]*memdb.IndexSchema{ - "id": { - Name: "id", - Unique: true, - Indexer: &memdb.StringFieldIndex{Field: "Id"}, - }, - "nodeId": { - Name: "nodeId", - Indexer: &memdb.StringFieldIndex{Field: "NodeId"}, - }, - "alias": { - Name: "alias", - AllowMissing: true, - Unique: true, - Indexer: &memdb.StringFieldIndex{Field: "Alias"}, - }, - }, - }, - "data": { - Name: "data", - Indexes: map[string]*memdb.IndexSchema{ - "id": { - Name: "id", - Unique: true, - Indexer: &memdb.StringFieldIndex{Field: "Id"}, - }, - }, - }, "events": { Name: "events", Indexes: map[string]*memdb.IndexSchema{ diff --git a/internal/server/state/schema2.go b/internal/server/state/schema2.go deleted file mode 100644 index cebaa00..0000000 --- a/internal/server/state/schema2.go +++ /dev/null @@ -1,15 +0,0 @@ -package state - -var schemaDB = ` -CREATE TABLE IF NOT EXISTS deployments ( - name TEXT PRIMARY KEY, - spec TEXT -); - -CREATE TABLE IF NOT EXISTS events ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - deployment TEXT, - timestamp INTEGER, - event TEXT -); -` diff --git a/internal/server/state/state.go b/internal/server/state/state.go index afe3d6f..2a12d29 100644 --- a/internal/server/state/state.go +++ b/internal/server/state/state.go @@ -1,7 +1,6 @@ package state import ( - "database/sql" "fmt" "github.com/boltdb/bolt" @@ -24,8 +23,6 @@ type StateStore struct { // db is the persistence layer db *bolt.DB - - db2 *sql.DB } func NewStateStore(path string) (*StateStore, error) { @@ -59,31 +56,13 @@ func NewStateStoreWithBoltDB(db *bolt.DB) (*StateStore, error) { memDb, err := memdb.NewMemDB(schema) if err != nil { - panic(err) + return nil, err } s := &StateStore{ db: db, memDb: memDb, } - if err := s.reIndex(); err != nil { - return nil, err - } - - /* - // start sqlite db with foreign index checks - db2, err := sql.Open("sqlite3", ":memory:") - if err != nil { - return nil, err - } - s.db2 = db2 - - // apply the schema - if _, err := db2.Exec(schemaDB); err != nil { - return nil, err - } - */ - return s, nil } @@ -91,123 +70,6 @@ func (s *StateStore) Close() error { return s.db.Close() } -func (s *StateStore) reIndex() error { - memTxn := s.memDb.Txn(true) - defer memTxn.Abort() - - // re-index allocations - err := s.db.View(func(tx *bolt.Tx) error { - bkt := tx.Bucket(allocationBucket) - - return bkt.ForEach(func(k, v []byte) error { - var alloc proto.Allocation - if err := dbGet(bkt, k, &alloc); err != nil { - return err - } - - if err := memTxn.Insert("allocations", &alloc); err != nil { - return err - } - return nil - }) - }) - if err != nil { - return err - } - - memTxn.Commit() - return nil -} - -func (s *StateStore) GetAllocation(id string) (*proto.Allocation, error) { - txn := s.memDb.Txn(false) - defer txn.Abort() - - item, err := txn.First("allocations", "id", id) - if err != nil { - return nil, err - } - if item == nil { - return nil, nil - } - return item.(*proto.Allocation), nil -} - -func (s *StateStore) AllocationByAlias(alias string) (*proto.Allocation, error) { - txn := s.memDb.Txn(false) - defer txn.Abort() - - return s.allocationByAliasImpl(txn, alias) -} - -func (s *StateStore) allocationByAliasImpl(txn *memdb.Txn, alias string) (*proto.Allocation, error) { - val, err := txn.First("allocations", "alias", alias) - if err != nil { - return nil, err - } - if val == nil { - return nil, nil - } - return val.(*proto.Allocation), nil -} - -func (s *StateStore) AllocationByAliasOrIDOrPrefix(id string) (*proto.Allocation, error) { - // try to resolve first by alias - obj, err := s.AllocationByAlias(id) - if err != nil { - return nil, err - } - if obj != nil { - return obj, nil - } - - // try to resolve by id or prefix - allocs, err := s.AllocationsByIDPrefix(id) - if err != nil { - return nil, err - } - if len(allocs) == 0 { - return nil, fmt.Errorf("no allocations found with id or prefix '%s'", id) - } - if len(allocs) != 1 { - return nil, fmt.Errorf("more than one allocation found with prefix") - } - return allocs[0], nil -} - -func (s *StateStore) AllocationsByIDPrefix(prefix string) ([]*proto.Allocation, error) { - txn := s.memDb.Txn(false) - defer txn.Abort() - - iter, err := txn.Get("allocations", "id_prefix", prefix) - if err != nil { - return nil, err - } - - allocs := []*proto.Allocation{} - for obj := iter.Next(); obj != nil; obj = iter.Next() { - allocs = append(allocs, obj.(*proto.Allocation)) - } - return allocs, nil -} - -func (s *StateStore) AllocationList(ws memdb.WatchSet) ([]*proto.Allocation, error) { - txn := s.memDb.Txn(false) - defer txn.Abort() - - iter, err := txn.Get("allocations", "id") - if err != nil { - return nil, err - } - tasks := []*proto.Allocation{} - for obj := iter.Next(); obj != nil; obj = iter.Next() { - tasks = append(tasks, obj.(*proto.Allocation)) - } - - ws.Add(iter.WatchCh()) - return tasks, nil -} - func (s *StateStore) GetVolume(id string) (*proto.Volume, error) { var volume proto.Volume err := s.db.View(func(tx *bolt.Tx) error { @@ -311,75 +173,6 @@ func (s *StateStore) PutDeployment(dep *proto.Service) error { return nil } -func (s *StateStore) AllocationListByNodeId(nodeId string, ws memdb.WatchSet) ([]*proto.Allocation, error) { - txn := s.memDb.Txn(false) - defer txn.Abort() - - iter, err := txn.Get("allocations", "nodeId", nodeId) - if err != nil { - return nil, err - } - tasks := []*proto.Allocation{} - for obj := iter.Next(); obj != nil; obj = iter.Next() { - tasks = append(tasks, obj.(*proto.Allocation)) - } - - ws.Add(iter.WatchCh()) - return tasks, nil -} - -func (s *StateStore) DestroyAllocation(id string) error { - memTxn := s.memDb.Txn(true) - defer memTxn.Abort() - - // get the allocation - item, err := memTxn.First("allocations", "id", id) - if err != nil { - return err - } - if item == nil { - return fmt.Errorf("allocation not found") - } - - alloc := item.(*proto.Allocation).Copy() - alloc.Sequence++ - alloc.DesiredStatus = proto.Allocation_Stop - - err = s.db.Update(func(dbTxn *bolt.Tx) error { - return s.putAllocation(dbTxn, memTxn, alloc) - }) - if err == nil { - memTxn.Commit() - } - - return nil -} - -func (s *StateStore) UpsertAllocation(alloc *proto.Allocation) error { - memTxn := s.memDb.Txn(true) - defer memTxn.Abort() - - // validate that if the alloc is being updated, the alias is available - if alloc.Alias != "" { - obj, err := s.allocationByAliasImpl(memTxn, alloc.Alias) - if err != nil { - return err - } - if obj != nil && obj.Id != alloc.Id { - return fmt.Errorf("alias already in use") - } - } - - err := s.db.Update(func(dbTxn *bolt.Tx) error { - return s.putAllocation(dbTxn, memTxn, alloc) - }) - if err == nil { - memTxn.Commit() - } - - return err -} - func (s *StateStore) SubscribeEvents(service string, ws memdb.WatchSet) memdb.ResultIterator { txn := s.memDb.Txn(false) defer txn.Abort() @@ -404,18 +197,6 @@ func (s *StateStore) InsertEvent(event *proto.Event) error { return nil } -func (s *StateStore) putAllocation(dbTxn *bolt.Tx, memTxn *memdb.Txn, alloc *proto.Allocation) error { - bkt := dbTxn.Bucket(allocationBucket) - - if err := dbPut(bkt, []byte(alloc.Id), alloc); err != nil { - return err - } - if err := memTxn.Insert("allocations", alloc); err != nil { - return err - } - return nil -} - func dbPut(b *bolt.Bucket, id []byte, msg gproto.Message) error { enc, err := gproto.Marshal(msg) if err != nil { diff --git a/internal/server/state/state_test.go b/internal/server/state/state_test.go index d58d4b8..7bf2df5 100644 --- a/internal/server/state/state_test.go +++ b/internal/server/state/state_test.go @@ -1,143 +1 @@ package state - -import ( - "io/ioutil" - "os" - "path/filepath" - "testing" - - "github.com/hashicorp/go-memdb" - "github.com/stretchr/testify/require" - "github.com/umbracle/vesta/internal/server/proto" -) - -func TestState_Allocation_InsertGet(t *testing.T) { - state := NewInmemStore(t) - - alloc := &proto.Allocation{ - Id: "a", - NodeId: "local", - } - require.NoError(t, state.UpsertAllocation(alloc)) - - alloc1, err := state.GetAllocation("a") - require.NoError(t, err) - require.NotNil(t, alloc1) -} - -func TestState_Allocation_GetByNode(t *testing.T) { - state := NewInmemStore(t) - - ids := []string{"a", "b", "c"} - for _, id := range ids { - alloc := &proto.Allocation{ - Id: id, - NodeId: "local", - } - require.NoError(t, state.UpsertAllocation(alloc)) - } - - ws := memdb.NewWatchSet() - allocs, err := state.AllocationListByNodeId("local", ws) - require.NoError(t, err) - require.Len(t, allocs, 3) -} - -func TestState_Allocation_Destroy(t *testing.T) { - state := NewInmemStore(t) - - alloc := &proto.Allocation{ - Id: "a", - NodeId: "local", - } - - require.NoError(t, state.UpsertAllocation(alloc)) - - // destroy allocation increases the sequence and - // updates the desired state. Note, we could abstract this - // on the server itself? - require.NoError(t, state.DestroyAllocation("a")) - - alloc1, err := state.GetAllocation("a") - require.NoError(t, err) - require.Equal(t, alloc1.DesiredStatus, proto.Allocation_Stop) - require.Equal(t, alloc1.Sequence, alloc.Sequence+1) -} - -func TestState_Allocation_Persistence(t *testing.T) { - tmpDir, err := ioutil.TempDir("/tmp", "task-runner-") - require.NoError(t, err) - - boldDBPath := filepath.Join(tmpDir, "my.db") - - t.Cleanup(func() { - os.RemoveAll(tmpDir) - }) - - state1, err := NewStateStore(boldDBPath) - require.NoError(t, err) - - alloc := &proto.Allocation{ - Id: "a", - NodeId: "local", - } - require.NoError(t, state1.UpsertAllocation(alloc)) - - // mount the state again - state1.Close() - - state2, err := NewStateStore(boldDBPath) - require.NoError(t, err) - - alloc1, err := state2.GetAllocation("a") - require.NoError(t, err) - require.NotNil(t, alloc1) -} - -func TestStateStore_AllocationByIDPrefix(t *testing.T) { - state := NewInmemStore(t) - - alloc0 := &proto.Allocation{ - Id: "ab", - NodeId: "local", - } - alloc1 := &proto.Allocation{ - Id: "ac", - NodeId: "local", - } - - require.NoError(t, state.UpsertAllocation(alloc0)) - require.NoError(t, state.UpsertAllocation(alloc1)) - - allocs, err := state.AllocationsByIDPrefix("a") - require.NoError(t, err) - require.Len(t, allocs, 2) -} - -func TestStateStore_InsertWithAlias(t *testing.T) { - state := NewInmemStore(t) - - // cannot get an empty alias - obj, err := state.AllocationByAlias("a") - require.NoError(t, err) - require.Empty(t, obj) - - // multiple allocations can have an empty alias - alloc0 := &proto.Allocation{Id: "ab", NodeId: "b"} - alloc1 := &proto.Allocation{Id: "ac", NodeId: "b"} - - require.NoError(t, state.UpsertAllocation(alloc0)) - require.NoError(t, state.UpsertAllocation(alloc1)) - - // update the alias of the allocation - alloc0.Alias = "a" - require.NoError(t, state.UpsertAllocation(alloc0)) - - obj, err = state.AllocationByAlias("a") - require.NoError(t, err) - require.Equal(t, obj.Id, "ab") - - // cannot be two allocations with the same alias - alloc1.Alias = "a" - require.Error(t, state.UpsertAllocation(alloc1)) -}