diff --git a/makefile b/makefile index 33a911792922f1ba45ea45689c730583a0016620..22fc555a04c37a03bbbe0aeb0210bb81c48a16af 100644 --- a/makefile +++ b/makefile @@ -2,3 +2,9 @@ IMAGE_NAME:=hub.cstcloud.cn/scalebox/goactuator build: docker build --network=host -f DockerFile -t $(IMAGE_NAME) . +push: + docker push $(IMAGE_NAME) + +clean: + docker rmi $(IMAGE_NAME) + diff --git a/src/actuator/actuatotFeatures.go b/src/actuator/actuatotFeatures.go index 9876efbf1dbe895ad8981a661b43beacecf95d68..5e1633e21b336cc03adf36ab2747fb487661ee57 100644 --- a/src/actuator/actuatotFeatures.go +++ b/src/actuator/actuatotFeatures.go @@ -57,7 +57,7 @@ func GetRunnableDaemonList() ([]*pb.Command,error) { defer conn.Close() c := pb.NewBoxServiceClient(conn) - res,err:=c.GetRunnableDaemonList(context.Background(),&empty.Empty{}) + res,err:=c.GetRunnableWorkerList(context.Background(),&empty.Empty{}) if err!=nil{ log.Printf("getRunnableDaemonList grpc error:%v",err) logger.Printf("getRunnableDaemonList grpc error:%v",err) @@ -80,7 +80,7 @@ func GetTerminatedDaemonList() ([]*pb.Command,error) { defer conn.Close() c := pb.NewBoxServiceClient(conn) - res,err:=c.GetTerminableDaemonList(context.Background(),&empty.Empty{}) + res,err:=c.GetTerminableWorkerList(context.Background(),&empty.Empty{}) if err!=nil{ log.Printf("getTerminatedDaemonList grpc error:%v",err) logger.Printf("getTerminatedDaemonList grpc error:%v",err) @@ -134,7 +134,7 @@ func SetRunnableDaemonInitialized(cmdPkg *pb.Command)error { } defer conn.Close() c := pb.NewBoxServiceClient(conn) - retCode,err:=c.SetDaemonInitialized(context.Background(),&wrps.Int32Value{Value: cmdPkg.Id}) + retCode,err:=c.SetWorkerInitialized(context.Background(),&wrps.Int32Value{Value: cmdPkg.Id}) if err!=nil{ log.Printf("setDaemonInit grpc error:%v",err) logger.Printf("setDaemonInit grpc error:%v",err) @@ -158,7 +158,7 @@ func SetRunnableDaemonTerminated(cmdPkg *pb.Command)error{ } defer conn.Close() c := pb.NewBoxServiceClient(conn) - retCode,err:=c.SetDaemonTerminated(context.Background(),&wrps.Int32Value{Value: cmdPkg.Id}) + retCode,err:=c.SetWorkerTerminated(context.Background(),&wrps.Int32Value{Value: cmdPkg.Id}) if err!=nil{ log.Printf("setDaemonTerminated grpc error:%v",err) logger.Printf("setDaemonTerminated grpc error:%v",err) diff --git a/src/main/main b/src/main/main index 8cc6ae8e70a83c8f36a971ea6bf1b6aa800ce71f..41269159efcff4838d7ca3824e4700dc0719e39e 100755 Binary files a/src/main/main and b/src/main/main differ diff --git a/src/main/main.go b/src/main/main.go index 9bcf35b9ae9066b6f97ee04aa95833c7dd5d3254..f0c5ad6e662aa51452548a503ab9984409244efa 100644 --- a/src/main/main.go +++ b/src/main/main.go @@ -78,7 +78,7 @@ func main() { go func() { err:=Instantiate(cmdPkg) if err!=nil{ - logger.Printf("Launch container failure:%v",err) + logger.Printf("Terminate container failure:%v",err) return } err = SetRunnableDaemonTerminated(cmdPkg) @@ -90,7 +90,7 @@ func main() { } } } - log.Println("Going to sleep for 2m") + log.Println("Going to sleep for 2min") time.Sleep(time.Second*120) } diff --git a/src/scalebox/agent.pb.go b/src/scalebox/agent.pb.go index c2b6c7d4b57af77aaa0c79a9ec46e0ef4441e4dc..68d20e3396e0d645a20b0bc8128894f020e2b059 100644 --- a/src/scalebox/agent.pb.go +++ b/src/scalebox/agent.pb.go @@ -31,7 +31,7 @@ type JobKey struct { // qualified name of job JobName string `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` KeyText string `protobuf:"bytes,2,opt,name=key_text,json=keyText,proto3" json:"key_text,omitempty"` - SlotId int32 `protobuf:"varint,3,opt,name=slot_id,json=slotId,proto3" json:"slot_id,omitempty"` + SlotId int32 `protobuf:"varint,3,opt,name=slot_id,json=slotId,proto3" json:"slot_id,omitempty"` // OR worker_id ? job_id ? } func (x *JobKey) Reset() { @@ -87,6 +87,70 @@ func (x *JobKey) GetSlotId() int32 { return 0 } +type JobKeys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // qualified name of job + NextJobName string `protobuf:"bytes,1,opt,name=next_job_name,json=nextJobName,proto3" json:"next_job_name,omitempty"` + KeyTexts []string `protobuf:"bytes,2,rep,name=key_texts,json=keyTexts,proto3" json:"key_texts,omitempty"` + CurrentJobId int32 `protobuf:"varint,3,opt,name=current_job_id,json=currentJobId,proto3" json:"current_job_id,omitempty"` // OR worker_id ? +} + +func (x *JobKeys) Reset() { + *x = JobKeys{} + if protoimpl.UnsafeEnabled { + mi := &file_agent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobKeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobKeys) ProtoMessage() {} + +func (x *JobKeys) ProtoReflect() protoreflect.Message { + mi := &file_agent_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobKeys.ProtoReflect.Descriptor instead. +func (*JobKeys) Descriptor() ([]byte, []int) { + return file_agent_proto_rawDescGZIP(), []int{1} +} + +func (x *JobKeys) GetNextJobName() string { + if x != nil { + return x.NextJobName + } + return "" +} + +func (x *JobKeys) GetKeyTexts() []string { + if x != nil { + return x.KeyTexts + } + return nil +} + +func (x *JobKeys) GetCurrentJobId() int32 { + if x != nil { + return x.CurrentJobId + } + return 0 +} + type TaskItem struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -99,7 +163,7 @@ type TaskItem struct { func (x *TaskItem) Reset() { *x = TaskItem{} if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[1] + mi := &file_agent_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -112,7 +176,7 @@ func (x *TaskItem) String() string { func (*TaskItem) ProtoMessage() {} func (x *TaskItem) ProtoReflect() protoreflect.Message { - mi := &file_agent_proto_msgTypes[1] + mi := &file_agent_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -125,7 +189,7 @@ func (x *TaskItem) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskItem.ProtoReflect.Descriptor instead. func (*TaskItem) Descriptor() ([]byte, []int) { - return file_agent_proto_rawDescGZIP(), []int{1} + return file_agent_proto_rawDescGZIP(), []int{2} } func (x *TaskItem) GetId() int64 { @@ -147,7 +211,7 @@ type Command struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // primary key of slot/daemon table + // primary key of slot/worker table Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` CommandText string `protobuf:"bytes,3,opt,name=command_text,json=commandText,proto3" json:"command_text,omitempty"` @@ -156,7 +220,7 @@ type Command struct { func (x *Command) Reset() { *x = Command{} if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[2] + mi := &file_agent_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -169,7 +233,7 @@ func (x *Command) String() string { func (*Command) ProtoMessage() {} func (x *Command) ProtoReflect() protoreflect.Message { - mi := &file_agent_proto_msgTypes[2] + mi := &file_agent_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -182,7 +246,7 @@ func (x *Command) ProtoReflect() protoreflect.Message { // Deprecated: Use Command.ProtoReflect.Descriptor instead. func (*Command) Descriptor() ([]byte, []int) { - return file_agent_proto_rawDescGZIP(), []int{2} + return file_agent_proto_rawDescGZIP(), []int{3} } func (x *Command) GetId() int32 { @@ -217,7 +281,7 @@ type CommandList struct { func (x *CommandList) Reset() { *x = CommandList{} if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[3] + mi := &file_agent_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -230,7 +294,7 @@ func (x *CommandList) String() string { func (*CommandList) ProtoMessage() {} func (x *CommandList) ProtoReflect() protoreflect.Message { - mi := &file_agent_proto_msgTypes[3] + mi := &file_agent_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -243,7 +307,7 @@ func (x *CommandList) ProtoReflect() protoreflect.Message { // Deprecated: Use CommandList.ProtoReflect.Descriptor instead. func (*CommandList) Descriptor() ([]byte, []int) { - return file_agent_proto_rawDescGZIP(), []int{3} + return file_agent_proto_rawDescGZIP(), []int{4} } func (x *CommandList) GetCommand() []*Command { @@ -276,7 +340,7 @@ type TaskExecMessage struct { func (x *TaskExecMessage) Reset() { *x = TaskExecMessage{} if protoimpl.UnsafeEnabled { - mi := &file_agent_proto_msgTypes[4] + mi := &file_agent_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -289,7 +353,7 @@ func (x *TaskExecMessage) String() string { func (*TaskExecMessage) ProtoMessage() {} func (x *TaskExecMessage) ProtoReflect() protoreflect.Message { - mi := &file_agent_proto_msgTypes[4] + mi := &file_agent_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -302,7 +366,7 @@ func (x *TaskExecMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskExecMessage.ProtoReflect.Descriptor instead. func (*TaskExecMessage) Descriptor() ([]byte, []int) { - return file_agent_proto_rawDescGZIP(), []int{4} + return file_agent_proto_rawDescGZIP(), []int{5} } func (x *TaskExecMessage) GetSlot() int32 { @@ -411,104 +475,116 @@ var file_agent_proto_rawDesc = []byte{ 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x65, 0x78, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x6c, 0x6f, 0x74, 0x49, 0x64, 0x22, 0x2c, - 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x50, 0x0a, 0x07, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x54, 0x65, 0x78, 0x74, 0x22, 0x3a, - 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x0a, - 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0xe8, 0x03, 0x0a, 0x0f, 0x54, - 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, - 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x30, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x30, 0x12, 0x2a, 0x0a, 0x02, - 0x74, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x31, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x32, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x02, 0x74, 0x32, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x33, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x33, - 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x34, 0x12, 0x35, 0x0a, 0x08, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x61, 0x72, 0x72, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x6c, 0x6f, 0x74, 0x49, 0x64, 0x22, 0x70, + 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x08, 0x6b, 0x65, 0x79, 0x54, 0x65, 0x78, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x6f, 0x62, 0x49, 0x64, + 0x22, 0x2c, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x50, + 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x54, 0x65, 0x78, 0x74, + 0x22, 0x3a, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x2b, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0xe8, 0x03, 0x0a, + 0x0f, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x30, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, - 0x41, 0x72, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x79, 0x73, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, - 0x61, 0x70, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, - 0x70, 0x70, 0x4f, 0x75, 0x74, 0x32, 0xbd, 0x06, 0x0a, 0x0a, 0x42, 0x6f, 0x78, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x1a, 0x12, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x49, 0x74, 0x65, 0x6d, 0x12, 0x4a, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x49, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x65, 0x64, 0x12, 0x19, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x30, 0x12, 0x2a, + 0x0a, 0x02, 0x74, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x31, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x32, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x02, 0x74, 0x32, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x33, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, + 0x74, 0x33, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x53, - 0x65, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x44, 0x0a, 0x13, 0x47, 0x65, - 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x73, 0x63, 0x61, 0x6c, - 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x4e, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x46, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x44, - 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x15, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x44, - 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, - 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x48, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, 0x65, 0x6d, 0x6f, - 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, - 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x44, 0x61, 0x65, 0x6d, 0x6f, - 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x4e, - 0x65, 0x78, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x10, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, - 0x78, 0x2e, 0x4a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x34, 0x12, 0x35, + 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x61, 0x72, 0x72, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x41, 0x72, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x79, 0x73, 0x5f, 0x6f, 0x75, 0x74, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x17, + 0x0a, 0x07, 0x61, 0x70, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x61, 0x70, 0x70, 0x4f, 0x75, 0x74, 0x32, 0x83, 0x07, 0x0a, 0x0a, 0x42, 0x6f, 0x78, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x78, + 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x1a, 0x12, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x4a, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x49, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x19, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4d, 0x0a, + 0x11, 0x53, 0x65, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x44, 0x0a, 0x13, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x21, 0x0a, 0x10, 0x63, 0x6e, 0x2e, 0x73, 0x63, 0x61, 0x6c, - 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x67, 0x70, 0x72, 0x63, 0x50, 0x01, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, - 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x46, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x14, 0x53, 0x65, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x48, 0x0a, 0x17, + 0x47, 0x65, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x15, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x65, 0x72, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x54, + 0x6f, 0x4e, 0x65, 0x78, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x10, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, + 0x62, 0x6f, 0x78, 0x2e, 0x4a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x44, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x54, 0x6f, 0x4e, 0x65, 0x78, 0x74, 0x12, 0x11, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x4a, 0x6f, 0x62, 0x4b, 0x65, 0x79, 0x73, + 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x21, 0x0a, + 0x10, 0x63, 0x6e, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, 0x2e, 0x67, 0x70, 0x72, + 0x63, 0x50, 0x01, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x62, 0x6f, 0x78, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -523,50 +599,53 @@ func file_agent_proto_rawDescGZIP() []byte { return file_agent_proto_rawDescData } -var file_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_agent_proto_goTypes = []interface{}{ (*JobKey)(nil), // 0: scalebox.JobKey - (*TaskItem)(nil), // 1: scalebox.TaskItem - (*Command)(nil), // 2: scalebox.Command - (*CommandList)(nil), // 3: scalebox.CommandList - (*TaskExecMessage)(nil), // 4: scalebox.TaskExecMessage - (*timestamp.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*wrappers.Int32Value)(nil), // 6: google.protobuf.Int32Value - (*wrappers.Int64Value)(nil), // 7: google.protobuf.Int64Value - (*empty.Empty)(nil), // 8: google.protobuf.Empty + (*JobKeys)(nil), // 1: scalebox.JobKeys + (*TaskItem)(nil), // 2: scalebox.TaskItem + (*Command)(nil), // 3: scalebox.Command + (*CommandList)(nil), // 4: scalebox.CommandList + (*TaskExecMessage)(nil), // 5: scalebox.TaskExecMessage + (*timestamp.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*wrappers.Int32Value)(nil), // 7: google.protobuf.Int32Value + (*wrappers.Int64Value)(nil), // 8: google.protobuf.Int64Value + (*empty.Empty)(nil), // 9: google.protobuf.Empty } var file_agent_proto_depIdxs = []int32{ - 2, // 0: scalebox.CommandList.command:type_name -> scalebox.Command - 5, // 1: scalebox.TaskExecMessage.t0:type_name -> google.protobuf.Timestamp - 5, // 2: scalebox.TaskExecMessage.t1:type_name -> google.protobuf.Timestamp - 5, // 3: scalebox.TaskExecMessage.t2:type_name -> google.protobuf.Timestamp - 5, // 4: scalebox.TaskExecMessage.t3:type_name -> google.protobuf.Timestamp - 5, // 5: scalebox.TaskExecMessage.t4:type_name -> google.protobuf.Timestamp - 5, // 6: scalebox.TaskExecMessage.time_arr:type_name -> google.protobuf.Timestamp - 6, // 7: scalebox.BoxService.GetNextTask:input_type -> google.protobuf.Int32Value - 7, // 8: scalebox.BoxService.SetTaskStarted:input_type -> google.protobuf.Int64Value - 4, // 9: scalebox.BoxService.SetTaskFinished:input_type -> scalebox.TaskExecMessage - 6, // 10: scalebox.BoxService.SetSlotTerminated:input_type -> google.protobuf.Int32Value - 8, // 11: scalebox.BoxService.GetRunnableSlotList:input_type -> google.protobuf.Empty - 6, // 12: scalebox.BoxService.SetSlotInitialized:input_type -> google.protobuf.Int32Value - 8, // 13: scalebox.BoxService.GetRunnableDaemonList:input_type -> google.protobuf.Empty - 6, // 14: scalebox.BoxService.SetDaemonInitialized:input_type -> google.protobuf.Int32Value - 8, // 15: scalebox.BoxService.GetTerminableDaemonList:input_type -> google.protobuf.Empty - 6, // 16: scalebox.BoxService.SetDaemonTerminated:input_type -> google.protobuf.Int32Value + 3, // 0: scalebox.CommandList.command:type_name -> scalebox.Command + 6, // 1: scalebox.TaskExecMessage.t0:type_name -> google.protobuf.Timestamp + 6, // 2: scalebox.TaskExecMessage.t1:type_name -> google.protobuf.Timestamp + 6, // 3: scalebox.TaskExecMessage.t2:type_name -> google.protobuf.Timestamp + 6, // 4: scalebox.TaskExecMessage.t3:type_name -> google.protobuf.Timestamp + 6, // 5: scalebox.TaskExecMessage.t4:type_name -> google.protobuf.Timestamp + 6, // 6: scalebox.TaskExecMessage.time_arr:type_name -> google.protobuf.Timestamp + 7, // 7: scalebox.BoxService.GetNextTask:input_type -> google.protobuf.Int32Value + 8, // 8: scalebox.BoxService.SetTaskStarted:input_type -> google.protobuf.Int64Value + 5, // 9: scalebox.BoxService.SetTaskFinished:input_type -> scalebox.TaskExecMessage + 7, // 10: scalebox.BoxService.SetSlotTerminated:input_type -> google.protobuf.Int32Value + 9, // 11: scalebox.BoxService.GetRunnableSlotList:input_type -> google.protobuf.Empty + 7, // 12: scalebox.BoxService.SetSlotInitialized:input_type -> google.protobuf.Int32Value + 9, // 13: scalebox.BoxService.GetRunnableWorkerList:input_type -> google.protobuf.Empty + 7, // 14: scalebox.BoxService.SetWorkerInitialized:input_type -> google.protobuf.Int32Value + 9, // 15: scalebox.BoxService.GetTerminableWorkerList:input_type -> google.protobuf.Empty + 7, // 16: scalebox.BoxService.SetWorkerTerminated:input_type -> google.protobuf.Int32Value 0, // 17: scalebox.BoxService.SendToNextJob:input_type -> scalebox.JobKey - 1, // 18: scalebox.BoxService.GetNextTask:output_type -> scalebox.TaskItem - 6, // 19: scalebox.BoxService.SetTaskStarted:output_type -> google.protobuf.Int32Value - 6, // 20: scalebox.BoxService.SetTaskFinished:output_type -> google.protobuf.Int32Value - 6, // 21: scalebox.BoxService.SetSlotTerminated:output_type -> google.protobuf.Int32Value - 3, // 22: scalebox.BoxService.GetRunnableSlotList:output_type -> scalebox.CommandList - 6, // 23: scalebox.BoxService.SetSlotInitialized:output_type -> google.protobuf.Int32Value - 3, // 24: scalebox.BoxService.GetRunnableDaemonList:output_type -> scalebox.CommandList - 6, // 25: scalebox.BoxService.SetDaemonInitialized:output_type -> google.protobuf.Int32Value - 3, // 26: scalebox.BoxService.GetTerminableDaemonList:output_type -> scalebox.CommandList - 6, // 27: scalebox.BoxService.SetDaemonTerminated:output_type -> google.protobuf.Int32Value - 6, // 28: scalebox.BoxService.SendToNextJob:output_type -> google.protobuf.Int32Value - 18, // [18:29] is the sub-list for method output_type - 7, // [7:18] is the sub-list for method input_type + 1, // 18: scalebox.BoxService.SendMessagesToNext:input_type -> scalebox.JobKeys + 2, // 19: scalebox.BoxService.GetNextTask:output_type -> scalebox.TaskItem + 7, // 20: scalebox.BoxService.SetTaskStarted:output_type -> google.protobuf.Int32Value + 7, // 21: scalebox.BoxService.SetTaskFinished:output_type -> google.protobuf.Int32Value + 7, // 22: scalebox.BoxService.SetSlotTerminated:output_type -> google.protobuf.Int32Value + 4, // 23: scalebox.BoxService.GetRunnableSlotList:output_type -> scalebox.CommandList + 7, // 24: scalebox.BoxService.SetSlotInitialized:output_type -> google.protobuf.Int32Value + 4, // 25: scalebox.BoxService.GetRunnableWorkerList:output_type -> scalebox.CommandList + 7, // 26: scalebox.BoxService.SetWorkerInitialized:output_type -> google.protobuf.Int32Value + 4, // 27: scalebox.BoxService.GetTerminableWorkerList:output_type -> scalebox.CommandList + 7, // 28: scalebox.BoxService.SetWorkerTerminated:output_type -> google.protobuf.Int32Value + 7, // 29: scalebox.BoxService.SendToNextJob:output_type -> google.protobuf.Int32Value + 7, // 30: scalebox.BoxService.SendMessagesToNext:output_type -> google.protobuf.Int32Value + 19, // [19:31] is the sub-list for method output_type + 7, // [7:19] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name 7, // [7:7] is the sub-list for extension extendee 0, // [0:7] is the sub-list for field type_name @@ -591,7 +670,7 @@ func file_agent_proto_init() { } } file_agent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskItem); i { + switch v := v.(*JobKeys); i { case 0: return &v.state case 1: @@ -603,7 +682,7 @@ func file_agent_proto_init() { } } file_agent_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Command); i { + switch v := v.(*TaskItem); i { case 0: return &v.state case 1: @@ -615,7 +694,7 @@ func file_agent_proto_init() { } } file_agent_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommandList); i { + switch v := v.(*Command); i { case 0: return &v.state case 1: @@ -627,6 +706,18 @@ func file_agent_proto_init() { } } file_agent_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_agent_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskExecMessage); i { case 0: return &v.state @@ -645,7 +736,7 @@ func file_agent_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_agent_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/src/scalebox/agent.proto b/src/scalebox/agent.proto index 999f4c6a3698077141055c6532fcac22a9df5a15..a0b14bd290078aee6c2fb51d65df1ca1e884e176 100644 --- a/src/scalebox/agent.proto +++ b/src/scalebox/agent.proto @@ -48,21 +48,21 @@ service BoxService { // slot: 'READY' -> 'ON' rpc SetSlotInitialized(google.protobuf.Int32Value) returns (google.protobuf.Int32Value); - // job:'RUNNING' && daemon:'PAUSED' - rpc GetRunnableDaemonList(google.protobuf.Empty) returns (CommandList); + // job:'RUNNING' && worker:'PAUSED' + rpc GetRunnableWorkerList(google.protobuf.Empty) returns (CommandList); - // input : daemon id - // return : ret_code : 0(OK), -1(daemon NOT FOUND), -2(daemon WRONG STATUS) - // daemon: 'PAUSED' -> 'RUNNING' - rpc SetDaemonInitialized(google.protobuf.Int32Value) returns (google.protobuf.Int32Value); + // input : worker id + // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) + // worker: 'PAUSED' -> 'RUNNING' + rpc SetWorkerInitialized(google.protobuf.Int32Value) returns (google.protobuf.Int32Value); - // job:'PAUSED' && daemon:'RUNNING' - rpc GetTerminableDaemonList(google.protobuf.Empty) returns (CommandList); + // job:'PAUSED' && worker:'RUNNING' + rpc GetTerminableWorkerList(google.protobuf.Empty) returns (CommandList); - // input : daemon id, return ret_code; - // return : ret_code : 0(OK), -1(daemon NOT FOUND), -2(daemon WRONG STATUS) - // daemon : 'RUNNING' -> 'PAUSED' - rpc SetDaemonTerminated(google.protobuf.Int32Value) returns (google.protobuf.Int32Value); + // input : worker id, return ret_code; + // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) + // worker : 'RUNNING' -> 'PAUSED' + rpc SetWorkerTerminated(google.protobuf.Int32Value) returns (google.protobuf.Int32Value); // ////////////////////////////////////////////////////////////////// // app client , called by user app. @@ -72,6 +72,8 @@ service BoxService { // return : ret_code : 0(OK), -1(job NOT FOUND) // task_status_code : 'INITIAL'/-9 rpc SendToNextJob(JobKey) returns (google.protobuf.Int32Value); + + rpc SendMessagesToNext(JobKeys) returns (google.protobuf.Int32Value); } message JobKey { @@ -79,6 +81,15 @@ message JobKey { string job_name=1; string key_text=2; int32 slot_id=3; + // OR worker_id ? job_id ? +} + +message JobKeys { + // qualified name of job + string next_job_name=1; + repeated string key_texts=2; + int32 current_job_id=3; + // OR worker_id ? } message TaskItem { @@ -87,7 +98,7 @@ message TaskItem { } message Command { - // primary key of slot/daemon table + // primary key of slot/worker table int32 id=1; string host=2; string command_text=3; diff --git a/src/scalebox/agent_grpc.pb.go b/src/scalebox/agent_grpc.pb.go index 15e5867f4598e8e0fd32647888a672dfb1b4e2ce..c716634ae312a55474ba8b3a598d83812641a9d0 100644 --- a/src/scalebox/agent_grpc.pb.go +++ b/src/scalebox/agent_grpc.pb.go @@ -44,22 +44,23 @@ type BoxServiceClient interface { // return : ret_code : 0(OK), -1(slot NOT FOUND), -2(slot WRONG STATUS) // slot: 'READY' -> 'ON' SetSlotInitialized(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) - // job:'RUNNING' && daemon:'PAUSED' - GetRunnableDaemonList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) - // input : daemon id - // return : ret_code : 0(OK), -1(daemon NOT FOUND), -2(daemon WRONG STATUS) - // daemon: 'PAUSED' -> 'RUNNING' - SetDaemonInitialized(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) - // job:'PAUSED' && daemon:'RUNNING' - GetTerminableDaemonList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) - // input : daemon id, return ret_code; - // return : ret_code : 0(OK), -1(daemon NOT FOUND), -2(daemon WRONG STATUS) - // daemon : 'RUNNING' -> 'PAUSED' - SetDaemonTerminated(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) + // job:'RUNNING' && worker:'PAUSED' + GetRunnableWorkerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) + // input : worker id + // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) + // worker: 'PAUSED' -> 'RUNNING' + SetWorkerInitialized(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) + // job:'PAUSED' && worker:'RUNNING' + GetTerminableWorkerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) + // input : worker id, return ret_code; + // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) + // worker : 'RUNNING' -> 'PAUSED' + SetWorkerTerminated(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) // send task-key to next job in current pipeline // return : ret_code : 0(OK), -1(job NOT FOUND) // task_status_code : 'INITIAL'/-9 SendToNextJob(ctx context.Context, in *JobKey, opts ...grpc.CallOption) (*wrappers.Int32Value, error) + SendMessagesToNext(ctx context.Context, in *JobKeys, opts ...grpc.CallOption) (*wrappers.Int32Value, error) } type boxServiceClient struct { @@ -124,36 +125,36 @@ func (c *boxServiceClient) SetSlotInitialized(ctx context.Context, in *wrappers. return out, nil } -func (c *boxServiceClient) GetRunnableDaemonList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) { +func (c *boxServiceClient) GetRunnableWorkerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) { out := new(CommandList) - err := c.cc.Invoke(ctx, "/scalebox.BoxService/GetRunnableDaemonList", in, out, opts...) + err := c.cc.Invoke(ctx, "/scalebox.BoxService/GetRunnableWorkerList", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *boxServiceClient) SetDaemonInitialized(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { +func (c *boxServiceClient) SetWorkerInitialized(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) - err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetDaemonInitialized", in, out, opts...) + err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetWorkerInitialized", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *boxServiceClient) GetTerminableDaemonList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) { +func (c *boxServiceClient) GetTerminableWorkerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CommandList, error) { out := new(CommandList) - err := c.cc.Invoke(ctx, "/scalebox.BoxService/GetTerminableDaemonList", in, out, opts...) + err := c.cc.Invoke(ctx, "/scalebox.BoxService/GetTerminableWorkerList", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *boxServiceClient) SetDaemonTerminated(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { +func (c *boxServiceClient) SetWorkerTerminated(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { out := new(wrappers.Int32Value) - err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetDaemonTerminated", in, out, opts...) + err := c.cc.Invoke(ctx, "/scalebox.BoxService/SetWorkerTerminated", in, out, opts...) if err != nil { return nil, err } @@ -169,6 +170,15 @@ func (c *boxServiceClient) SendToNextJob(ctx context.Context, in *JobKey, opts . return out, nil } +func (c *boxServiceClient) SendMessagesToNext(ctx context.Context, in *JobKeys, opts ...grpc.CallOption) (*wrappers.Int32Value, error) { + out := new(wrappers.Int32Value) + err := c.cc.Invoke(ctx, "/scalebox.BoxService/SendMessagesToNext", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // BoxServiceServer is the server API for BoxService service. // All implementations must embed UnimplementedBoxServiceServer // for forward compatibility @@ -197,22 +207,23 @@ type BoxServiceServer interface { // return : ret_code : 0(OK), -1(slot NOT FOUND), -2(slot WRONG STATUS) // slot: 'READY' -> 'ON' SetSlotInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) - // job:'RUNNING' && daemon:'PAUSED' - GetRunnableDaemonList(context.Context, *empty.Empty) (*CommandList, error) - // input : daemon id - // return : ret_code : 0(OK), -1(daemon NOT FOUND), -2(daemon WRONG STATUS) - // daemon: 'PAUSED' -> 'RUNNING' - SetDaemonInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) - // job:'PAUSED' && daemon:'RUNNING' - GetTerminableDaemonList(context.Context, *empty.Empty) (*CommandList, error) - // input : daemon id, return ret_code; - // return : ret_code : 0(OK), -1(daemon NOT FOUND), -2(daemon WRONG STATUS) - // daemon : 'RUNNING' -> 'PAUSED' - SetDaemonTerminated(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) + // job:'RUNNING' && worker:'PAUSED' + GetRunnableWorkerList(context.Context, *empty.Empty) (*CommandList, error) + // input : worker id + // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) + // worker: 'PAUSED' -> 'RUNNING' + SetWorkerInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) + // job:'PAUSED' && worker:'RUNNING' + GetTerminableWorkerList(context.Context, *empty.Empty) (*CommandList, error) + // input : worker id, return ret_code; + // return : ret_code : 0(OK), -1(worker NOT FOUND), -2(worker WRONG STATUS) + // worker : 'RUNNING' -> 'PAUSED' + SetWorkerTerminated(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) // send task-key to next job in current pipeline // return : ret_code : 0(OK), -1(job NOT FOUND) // task_status_code : 'INITIAL'/-9 SendToNextJob(context.Context, *JobKey) (*wrappers.Int32Value, error) + SendMessagesToNext(context.Context, *JobKeys) (*wrappers.Int32Value, error) mustEmbedUnimplementedBoxServiceServer() } @@ -238,21 +249,24 @@ func (UnimplementedBoxServiceServer) GetRunnableSlotList(context.Context, *empty func (UnimplementedBoxServiceServer) SetSlotInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SetSlotInitialized not implemented") } -func (UnimplementedBoxServiceServer) GetRunnableDaemonList(context.Context, *empty.Empty) (*CommandList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRunnableDaemonList not implemented") +func (UnimplementedBoxServiceServer) GetRunnableWorkerList(context.Context, *empty.Empty) (*CommandList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRunnableWorkerList not implemented") } -func (UnimplementedBoxServiceServer) SetDaemonInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetDaemonInitialized not implemented") +func (UnimplementedBoxServiceServer) SetWorkerInitialized(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetWorkerInitialized not implemented") } -func (UnimplementedBoxServiceServer) GetTerminableDaemonList(context.Context, *empty.Empty) (*CommandList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTerminableDaemonList not implemented") +func (UnimplementedBoxServiceServer) GetTerminableWorkerList(context.Context, *empty.Empty) (*CommandList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTerminableWorkerList not implemented") } -func (UnimplementedBoxServiceServer) SetDaemonTerminated(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetDaemonTerminated not implemented") +func (UnimplementedBoxServiceServer) SetWorkerTerminated(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetWorkerTerminated not implemented") } func (UnimplementedBoxServiceServer) SendToNextJob(context.Context, *JobKey) (*wrappers.Int32Value, error) { return nil, status.Errorf(codes.Unimplemented, "method SendToNextJob not implemented") } +func (UnimplementedBoxServiceServer) SendMessagesToNext(context.Context, *JobKeys) (*wrappers.Int32Value, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendMessagesToNext not implemented") +} func (UnimplementedBoxServiceServer) mustEmbedUnimplementedBoxServiceServer() {} // UnsafeBoxServiceServer may be embedded to opt out of forward compatibility for this service. @@ -374,74 +388,74 @@ func _BoxService_SetSlotInitialized_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } -func _BoxService_GetRunnableDaemonList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _BoxService_GetRunnableWorkerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BoxServiceServer).GetRunnableDaemonList(ctx, in) + return srv.(BoxServiceServer).GetRunnableWorkerList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/scalebox.BoxService/GetRunnableDaemonList", + FullMethod: "/scalebox.BoxService/GetRunnableWorkerList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BoxServiceServer).GetRunnableDaemonList(ctx, req.(*empty.Empty)) + return srv.(BoxServiceServer).GetRunnableWorkerList(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } -func _BoxService_SetDaemonInitialized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _BoxService_SetWorkerInitialized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(wrappers.Int32Value) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BoxServiceServer).SetDaemonInitialized(ctx, in) + return srv.(BoxServiceServer).SetWorkerInitialized(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/scalebox.BoxService/SetDaemonInitialized", + FullMethod: "/scalebox.BoxService/SetWorkerInitialized", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BoxServiceServer).SetDaemonInitialized(ctx, req.(*wrappers.Int32Value)) + return srv.(BoxServiceServer).SetWorkerInitialized(ctx, req.(*wrappers.Int32Value)) } return interceptor(ctx, in, info, handler) } -func _BoxService_GetTerminableDaemonList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _BoxService_GetTerminableWorkerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BoxServiceServer).GetTerminableDaemonList(ctx, in) + return srv.(BoxServiceServer).GetTerminableWorkerList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/scalebox.BoxService/GetTerminableDaemonList", + FullMethod: "/scalebox.BoxService/GetTerminableWorkerList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BoxServiceServer).GetTerminableDaemonList(ctx, req.(*empty.Empty)) + return srv.(BoxServiceServer).GetTerminableWorkerList(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } -func _BoxService_SetDaemonTerminated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _BoxService_SetWorkerTerminated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(wrappers.Int32Value) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BoxServiceServer).SetDaemonTerminated(ctx, in) + return srv.(BoxServiceServer).SetWorkerTerminated(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/scalebox.BoxService/SetDaemonTerminated", + FullMethod: "/scalebox.BoxService/SetWorkerTerminated", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BoxServiceServer).SetDaemonTerminated(ctx, req.(*wrappers.Int32Value)) + return srv.(BoxServiceServer).SetWorkerTerminated(ctx, req.(*wrappers.Int32Value)) } return interceptor(ctx, in, info, handler) } @@ -464,6 +478,24 @@ func _BoxService_SendToNextJob_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _BoxService_SendMessagesToNext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(JobKeys) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoxServiceServer).SendMessagesToNext(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/scalebox.BoxService/SendMessagesToNext", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoxServiceServer).SendMessagesToNext(ctx, req.(*JobKeys)) + } + return interceptor(ctx, in, info, handler) +} + // BoxService_ServiceDesc is the grpc.ServiceDesc for BoxService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -496,25 +528,29 @@ var BoxService_ServiceDesc = grpc.ServiceDesc{ Handler: _BoxService_SetSlotInitialized_Handler, }, { - MethodName: "GetRunnableDaemonList", - Handler: _BoxService_GetRunnableDaemonList_Handler, + MethodName: "GetRunnableWorkerList", + Handler: _BoxService_GetRunnableWorkerList_Handler, }, { - MethodName: "SetDaemonInitialized", - Handler: _BoxService_SetDaemonInitialized_Handler, + MethodName: "SetWorkerInitialized", + Handler: _BoxService_SetWorkerInitialized_Handler, }, { - MethodName: "GetTerminableDaemonList", - Handler: _BoxService_GetTerminableDaemonList_Handler, + MethodName: "GetTerminableWorkerList", + Handler: _BoxService_GetTerminableWorkerList_Handler, }, { - MethodName: "SetDaemonTerminated", - Handler: _BoxService_SetDaemonTerminated_Handler, + MethodName: "SetWorkerTerminated", + Handler: _BoxService_SetWorkerTerminated_Handler, }, { MethodName: "SendToNextJob", Handler: _BoxService_SendToNextJob_Handler, }, + { + MethodName: "SendMessagesToNext", + Handler: _BoxService_SendMessagesToNext_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "agent.proto", diff --git a/src/shells/makefile b/src/shells/makefile index 1b789fbc72ab7aa0f482a5dbeae2d4fdc4c0f9a2..ea288a27d83258f460f6ad3c95c580e48e244f12 100644 --- a/src/shells/makefile +++ b/src/shells/makefile @@ -9,3 +9,5 @@ down: docker stop test-box-server docker stop test-box-db docker rm test-box-server +generate: + protoc --go_out=. --go-grpc_out=. ./agent.proto \ No newline at end of file