diff --git a/core/grpc/server/server.go b/core/grpc/server/server.go index dbde2885..cc416a80 100644 --- a/core/grpc/server/server.go +++ b/core/grpc/server/server.go @@ -2,6 +2,9 @@ package server import ( "fmt" + "net" + "sync" + "github.com/crawlab-team/crawlab/core/grpc/middlewares" "github.com/crawlab-team/crawlab/core/interfaces" "github.com/crawlab-team/crawlab/core/utils" @@ -11,8 +14,6 @@ import ( grpcrecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" errors2 "github.com/pkg/errors" "google.golang.org/grpc" - "net" - "sync" ) type GrpcServer struct { @@ -83,11 +84,11 @@ func (svr *GrpcServer) Stop() (err error) { } func (svr *GrpcServer) register() { - grpc2.RegisterNodeServiceServer(svr.svr, *svr.NodeSvr) - grpc2.RegisterModelBaseServiceServer(svr.svr, *svr.ModelBaseServiceSvr) - grpc2.RegisterTaskServiceServer(svr.svr, *svr.TaskSvr) - grpc2.RegisterDependencyServiceServer(svr.svr, *svr.DependencySvr) - grpc2.RegisterMetricServiceServer(svr.svr, *svr.MetricSvr) + grpc2.RegisterNodeServiceServer(svr.svr, svr.NodeSvr) + grpc2.RegisterModelBaseServiceServer(svr.svr, svr.ModelBaseServiceSvr) + grpc2.RegisterTaskServiceServer(svr.svr, svr.TaskSvr) + grpc2.RegisterDependencyServiceServer(svr.svr, svr.DependencySvr) + grpc2.RegisterMetricServiceServer(svr.svr, svr.MetricSvr) } func (svr *GrpcServer) recoveryHandlerFunc(p interface{}) (err error) { diff --git a/core/grpc/server/task_service_server.go b/core/grpc/server/task_service_server.go index 30658fa6..8613a9a9 100644 --- a/core/grpc/server/task_service_server.go +++ b/core/grpc/server/task_service_server.go @@ -264,9 +264,12 @@ func (svr TaskServiceServer) FetchTask(ctx context.Context, request *grpc.TaskSe return &grpc.TaskServiceFetchTaskResponse{TaskId: tid.Hex()}, nil } -func (svr TaskServiceServer) SendNotification(_ context.Context, request *grpc.TaskServiceSendNotificationRequest) (response *grpc.Response, err error) { +func (svr TaskServiceServer) SendNotification(_ context.Context, request *grpc.TaskServiceSendNotificationRequest) (response *grpc.TaskServiceSendNotificationResponse, err error) { if !utils.IsPro() { - return nil, nil + return &grpc.TaskServiceSendNotificationResponse{ + Code: grpc.TaskServiceSendNotificationResponseCode_NOTIFICATION_DISABLED, + Message: "Notification service is disabled (Pro version required)", + }, nil } // task id @@ -363,7 +366,91 @@ func (svr TaskServiceServer) SendNotification(_ context.Context, request *grpc.T } } - return nil, nil + return &grpc.TaskServiceSendNotificationResponse{ + Code: grpc.TaskServiceSendNotificationResponseCode_NOTIFICATION_SUCCESS, + Message: "Notification sent successfully", + }, nil +} + +func (svr TaskServiceServer) CheckProcess(_ context.Context, request *grpc.TaskServiceCheckProcessRequest) (response *grpc.TaskServiceCheckProcessResponse, err error) { + // Validate request + _, err = primitive.ObjectIDFromHex(request.TaskId) + if err != nil { + svr.Errorf("invalid task id: %s", request.TaskId) + return &grpc.TaskServiceCheckProcessResponse{ + TaskId: request.TaskId, + Pid: request.Pid, + Status: grpc.ProcessStatus_PROCESS_UNKNOWN, + ErrorMessage: "invalid task id", + }, nil + } + + pid := int(request.Pid) + if pid <= 0 { + return &grpc.TaskServiceCheckProcessResponse{ + TaskId: request.TaskId, + Pid: request.Pid, + Status: grpc.ProcessStatus_PROCESS_NOT_FOUND, + ErrorMessage: "invalid process id", + }, nil + } + + // Check if process exists + processExists := utils.ProcessIdExists(pid) + if !processExists { + return &grpc.TaskServiceCheckProcessResponse{ + TaskId: request.TaskId, + Pid: request.Pid, + Status: grpc.ProcessStatus_PROCESS_NOT_FOUND, + ExitCode: -1, + }, nil + } + + // Get process details using gopsutil + processStatus, exitCode, errMsg := svr.getProcessDetails(pid) + + return &grpc.TaskServiceCheckProcessResponse{ + TaskId: request.TaskId, + Pid: request.Pid, + Status: processStatus, + ExitCode: int32(exitCode), + ErrorMessage: errMsg, + }, nil +} + +// getProcessDetails queries the process details using gopsutil +func (svr TaskServiceServer) getProcessDetails(pid int) (status grpc.ProcessStatus, exitCode int, errorMessage string) { + // Import the gopsutil process package + processLib, err := utils.GetProcesses() + if err != nil { + return grpc.ProcessStatus_PROCESS_UNKNOWN, -1, fmt.Sprintf("failed to get processes: %v", err) + } + + // Find the specific process + for _, p := range processLib { + if int(p.Pid) == pid { + // Get process status + processStatus, err := p.Status() + if err != nil { + return grpc.ProcessStatus_PROCESS_UNKNOWN, -1, fmt.Sprintf("failed to get process status: %v", err) + } + + // Map process status to our enum + switch strings.ToLower(processStatus) { + case "running", "sleep", "disk-sleep": + return grpc.ProcessStatus_PROCESS_RUNNING, 0, "" + case "zombie": + return grpc.ProcessStatus_PROCESS_ZOMBIE, 0, "process is zombie" + case "stopped", "tracing-stop": + return grpc.ProcessStatus_PROCESS_FINISHED, 0, "process stopped" + default: + return grpc.ProcessStatus_PROCESS_UNKNOWN, -1, fmt.Sprintf("unknown process status: %s", processStatus) + } + } + } + + // Process not found + return grpc.ProcessStatus_PROCESS_NOT_FOUND, -1, "process not found" } func (svr TaskServiceServer) GetSubscribeStream(taskId primitive.ObjectID) (stream grpc.TaskService_SubscribeServer, ok bool) { diff --git a/core/node/service/master_service.go b/core/node/service/master_service.go index 67a7de7c..dd3caeeb 100644 --- a/core/node/service/master_service.go +++ b/core/node/service/master_service.go @@ -73,6 +73,9 @@ func (svc *MasterService) Start() { // start monitoring worker nodes go svc.startMonitoring() + // start task reconciliation service for periodic status checks + go svc.taskReconciliationSvc.StartPeriodicReconciliation() + // start task handler go svc.taskHandlerSvc.Start() diff --git a/core/node/service/task_reconciliation_service.go b/core/node/service/task_reconciliation_service.go index 1f795278..fd57490b 100644 --- a/core/node/service/task_reconciliation_service.go +++ b/core/node/service/task_reconciliation_service.go @@ -1,6 +1,7 @@ package service import ( + "context" "fmt" "sync" "time" @@ -160,13 +161,32 @@ func (svc *TaskReconciliationService) queryProcessStatusFromWorker(node *models. // requestProcessStatusFromWorker sends a status query request to the worker node func (svc *TaskReconciliationService) requestProcessStatusFromWorker(nodeStream grpc.NodeService_SubscribeServer, task *models.Task, timeout time.Duration) (string, error) { - // TODO: Implement actual gRPC call to worker to check process status - // This would require extending the gRPC protocol to support process status queries - // For now, we'll use the existing heuristics but with improved logic + // Check if task has a valid PID + if task.Pid <= 0 { + return svc.inferProcessStatusFromLocalState(task, false) + } - // As a placeholder, we'll use the improved heuristic detection - _, hasActiveStream := svc.server.TaskSvr.GetSubscribeStream(task.Id) - return svc.inferProcessStatusFromLocalState(task, hasActiveStream) + // Get the node for this task + node, err := service.NewModelService[models.Node]().GetById(task.NodeId) + if err != nil { + svc.Warnf("failed to get node[%s] for task[%s]: %v", task.NodeId.Hex(), task.Id.Hex(), err) + _, hasActiveStream := svc.server.TaskSvr.GetSubscribeStream(task.Id) + return svc.inferProcessStatusFromLocalState(task, hasActiveStream) + } + + // Attempt to query worker directly (future implementation) + // This will return an error until worker discovery infrastructure is built + workerStatus, err := svc.queryWorkerProcessStatus(node, task, timeout) + if err != nil { + svc.Debugf("direct worker query not available, falling back to heuristics: %v", err) + + // Fallback to heuristic detection + _, hasActiveStream := svc.server.TaskSvr.GetSubscribeStream(task.Id) + return svc.inferProcessStatusFromLocalState(task, hasActiveStream) + } + + svc.Infof("successfully queried worker process status for task[%s]: %s", task.Id.Hex(), workerStatus) + return workerStatus, nil } // inferProcessStatusFromLocalState uses local information to infer process status @@ -226,6 +246,92 @@ func (svc *TaskReconciliationService) checkFinalTaskState(task *models.Task) str } } +// mapProcessStatusToTaskStatus converts gRPC process status to task status +func (svc *TaskReconciliationService) mapProcessStatusToTaskStatus(processStatus grpc.ProcessStatus, exitCode int32, task *models.Task) string { + switch processStatus { + case grpc.ProcessStatus_PROCESS_RUNNING: + return constants.TaskStatusRunning + case grpc.ProcessStatus_PROCESS_FINISHED: + // Process finished - check exit code to determine success or failure + if exitCode == 0 { + return constants.TaskStatusFinished + } + return constants.TaskStatusError + case grpc.ProcessStatus_PROCESS_ERROR: + return constants.TaskStatusError + case grpc.ProcessStatus_PROCESS_NOT_FOUND: + // Process not found - could mean it finished and was cleaned up + // Check if task was recently active to determine likely outcome + if time.Since(task.UpdatedAt) < 5*time.Minute { + // Recently active task with missing process - likely completed + if task.Error != "" { + return constants.TaskStatusError + } + return constants.TaskStatusFinished + } + // Old task with missing process - probably error + return constants.TaskStatusError + case grpc.ProcessStatus_PROCESS_ZOMBIE: + // Zombie process indicates abnormal termination + return constants.TaskStatusError + case grpc.ProcessStatus_PROCESS_UNKNOWN: + fallthrough + default: + // Unknown status - use heuristic detection + _, hasActiveStream := svc.server.TaskSvr.GetSubscribeStream(task.Id) + status, _ := svc.inferProcessStatusFromLocalState(task, hasActiveStream) + return status + } +} + +// createWorkerClient creates a gRPC client connection to a worker node +// This is a placeholder for future implementation when worker discovery is available +func (svc *TaskReconciliationService) createWorkerClient(node *models.Node) (grpc.TaskServiceClient, error) { + // TODO: Implement worker node discovery and connection + // This would require: + // 1. Worker nodes to register their gRPC server endpoints + // 2. A service discovery mechanism + // 3. Connection pooling and management + // + // For now, return an error to indicate this functionality is not yet available + return nil, fmt.Errorf("direct worker client connections not yet implemented - need worker discovery infrastructure") +} + +// queryWorkerProcessStatus attempts to query a worker node directly for process status +// This demonstrates the intended future architecture for worker communication +func (svc *TaskReconciliationService) queryWorkerProcessStatus(node *models.Node, task *models.Task, timeout time.Duration) (string, error) { + // This is the intended implementation once worker discovery is available + + // 1. Create gRPC client to worker + client, err := svc.createWorkerClient(node) + if err != nil { + return "", fmt.Errorf("failed to create worker client: %w", err) + } + + // 2. Create timeout context + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + + // 3. Send process status request + req := &grpc.TaskServiceCheckProcessRequest{ + TaskId: task.Id.Hex(), + Pid: int32(task.Pid), + } + + resp, err := client.CheckProcess(ctx, req) + if err != nil { + return "", fmt.Errorf("worker process status query failed: %w", err) + } + + // 4. Convert process status to task status + taskStatus := svc.mapProcessStatusToTaskStatus(resp.Status, resp.ExitCode, task) + + svc.Infof("worker reported process status for task[%s]: process_status=%s, exit_code=%d, mapped_to=%s", + task.Id.Hex(), resp.Status.String(), resp.ExitCode, taskStatus) + + return taskStatus, nil +} + // syncTaskStatusWithProcess ensures task status matches the actual process status func (svc *TaskReconciliationService) syncTaskStatusWithProcess(task *models.Task, actualProcessStatus string) (string, error) { // If the actual process status differs from the database status, we need to sync @@ -528,7 +634,9 @@ var taskReconciliationServiceOnce sync.Once func GetTaskReconciliationService() *TaskReconciliationService { taskReconciliationServiceOnce.Do(func() { - taskReconciliationService = NewTaskReconciliationService(nil) // Will be set by the master service + // Get the server from gRPC server singleton + grpcServer := server.GetGrpcServer() + taskReconciliationService = NewTaskReconciliationService(grpcServer) }) return taskReconciliationService } diff --git a/grpc/dependency_service.pb.go b/grpc/dependency_service.pb.go index b66d56d8..dbd6d785 100644 --- a/grpc/dependency_service.pb.go +++ b/grpc/dependency_service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 -// protoc v5.29.2 +// protoc-gen-go v1.34.2 +// protoc v5.27.2 // source: services/dependency_service.proto package grpc @@ -76,18 +76,21 @@ func (DependencyServiceCode) EnumDescriptor() ([]byte, []int) { } type Dependency struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` } func (x *Dependency) Reset() { *x = Dependency{} - mi := &file_services_dependency_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_dependency_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Dependency) String() string { @@ -98,7 +101,7 @@ func (*Dependency) ProtoMessage() {} func (x *Dependency) ProtoReflect() protoreflect.Message { mi := &file_services_dependency_service_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,17 +131,20 @@ func (x *Dependency) GetVersion() string { } type DependencyServiceConnectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` } func (x *DependencyServiceConnectRequest) Reset() { *x = DependencyServiceConnectRequest{} - mi := &file_services_dependency_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_dependency_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DependencyServiceConnectRequest) String() string { @@ -149,7 +155,7 @@ func (*DependencyServiceConnectRequest) ProtoMessage() {} func (x *DependencyServiceConnectRequest) ProtoReflect() protoreflect.Message { mi := &file_services_dependency_service_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -172,21 +178,24 @@ func (x *DependencyServiceConnectRequest) GetNodeKey() string { } type DependencyServiceConnectResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code DependencyServiceCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.DependencyServiceCode" json:"code,omitempty"` - Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` - Proxy string `protobuf:"bytes,3,opt,name=proxy,proto3" json:"proxy,omitempty"` - Dependency *Dependency `protobuf:"bytes,4,opt,name=dependency,proto3" json:"dependency,omitempty"` - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code DependencyServiceCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.DependencyServiceCode" json:"code,omitempty"` + Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` + Proxy string `protobuf:"bytes,3,opt,name=proxy,proto3" json:"proxy,omitempty"` + Dependency *Dependency `protobuf:"bytes,4,opt,name=dependency,proto3" json:"dependency,omitempty"` + Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` } func (x *DependencyServiceConnectResponse) Reset() { *x = DependencyServiceConnectResponse{} - mi := &file_services_dependency_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_dependency_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DependencyServiceConnectResponse) String() string { @@ -197,7 +206,7 @@ func (*DependencyServiceConnectResponse) ProtoMessage() {} func (x *DependencyServiceConnectResponse) ProtoReflect() protoreflect.Message { mi := &file_services_dependency_service_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,19 +257,22 @@ func (x *DependencyServiceConnectResponse) GetVersion() string { } type DependencyServiceSyncRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` - Dependencies []*Dependency `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` + Dependencies []*Dependency `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"` } func (x *DependencyServiceSyncRequest) Reset() { *x = DependencyServiceSyncRequest{} - mi := &file_services_dependency_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_dependency_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DependencyServiceSyncRequest) String() string { @@ -271,7 +283,7 @@ func (*DependencyServiceSyncRequest) ProtoMessage() {} func (x *DependencyServiceSyncRequest) ProtoReflect() protoreflect.Message { mi := &file_services_dependency_service_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,18 +320,21 @@ func (x *DependencyServiceSyncRequest) GetDependencies() []*Dependency { } type DependencyServiceUpdateLogsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TargetId string `protobuf:"bytes,1,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"` - Logs []string `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TargetId string `protobuf:"bytes,1,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"` + Logs []string `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` } func (x *DependencyServiceUpdateLogsRequest) Reset() { *x = DependencyServiceUpdateLogsRequest{} - mi := &file_services_dependency_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_dependency_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DependencyServiceUpdateLogsRequest) String() string { @@ -330,7 +345,7 @@ func (*DependencyServiceUpdateLogsRequest) ProtoMessage() {} func (x *DependencyServiceUpdateLogsRequest) ProtoReflect() protoreflect.Message { mi := &file_services_dependency_service_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,18 +375,21 @@ func (x *DependencyServiceUpdateLogsRequest) GetLogs() []string { } type DependencyDriver struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` } func (x *DependencyDriver) Reset() { *x = DependencyDriver{} - mi := &file_services_dependency_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_dependency_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DependencyDriver) String() string { @@ -382,7 +400,7 @@ func (*DependencyDriver) ProtoMessage() {} func (x *DependencyDriver) ProtoReflect() protoreflect.Message { mi := &file_services_dependency_service_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,22 +430,25 @@ func (x *DependencyDriver) GetVersion() string { } type DependencyServiceSyncConfigSetupRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` - Drivers []*DependencyDriver `protobuf:"bytes,6,rep,name=drivers,proto3" json:"drivers,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` + Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` + Drivers []*DependencyDriver `protobuf:"bytes,6,rep,name=drivers,proto3" json:"drivers,omitempty"` } func (x *DependencyServiceSyncConfigSetupRequest) Reset() { *x = DependencyServiceSyncConfigSetupRequest{} - mi := &file_services_dependency_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_dependency_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DependencyServiceSyncConfigSetupRequest) String() string { @@ -438,7 +459,7 @@ func (*DependencyServiceSyncConfigSetupRequest) ProtoMessage() {} func (x *DependencyServiceSyncConfigSetupRequest) ProtoReflect() protoreflect.Message { mi := &file_services_dependency_service_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,6 +657,92 @@ func file_services_dependency_service_proto_init() { return } file_entity_response_proto_init() + if !protoimpl.UnsafeEnabled { + file_services_dependency_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Dependency); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_dependency_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DependencyServiceConnectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_dependency_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*DependencyServiceConnectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_dependency_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*DependencyServiceSyncRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_dependency_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DependencyServiceUpdateLogsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_dependency_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DependencyDriver); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_dependency_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DependencyServiceSyncConfigSetupRequest); 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{ diff --git a/grpc/dependency_service_grpc.pb.go b/grpc/dependency_service_grpc.pb.go index 756954ea..9680891b 100644 --- a/grpc/dependency_service_grpc.pb.go +++ b/grpc/dependency_service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.2 +// - protoc-gen-go-grpc v1.4.0 +// - protoc v5.27.2 // source: services/dependency_service.proto package grpc @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( DependencyService_Connect_FullMethodName = "/grpc.DependencyService/Connect" @@ -29,9 +29,9 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type DependencyServiceClient interface { - Connect(ctx context.Context, in *DependencyServiceConnectRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DependencyServiceConnectResponse], error) + Connect(ctx context.Context, in *DependencyServiceConnectRequest, opts ...grpc.CallOption) (DependencyService_ConnectClient, error) Sync(ctx context.Context, in *DependencyServiceSyncRequest, opts ...grpc.CallOption) (*Response, error) - UpdateLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[DependencyServiceUpdateLogsRequest, Response], error) + UpdateLogs(ctx context.Context, opts ...grpc.CallOption) (DependencyService_UpdateLogsClient, error) SyncConfigSetup(ctx context.Context, in *DependencyServiceSyncConfigSetupRequest, opts ...grpc.CallOption) (*Response, error) } @@ -43,13 +43,13 @@ func NewDependencyServiceClient(cc grpc.ClientConnInterface) DependencyServiceCl return &dependencyServiceClient{cc} } -func (c *dependencyServiceClient) Connect(ctx context.Context, in *DependencyServiceConnectRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DependencyServiceConnectResponse], error) { +func (c *dependencyServiceClient) Connect(ctx context.Context, in *DependencyServiceConnectRequest, opts ...grpc.CallOption) (DependencyService_ConnectClient, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &DependencyService_ServiceDesc.Streams[0], DependencyService_Connect_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[DependencyServiceConnectRequest, DependencyServiceConnectResponse]{ClientStream: stream} + x := &dependencyServiceConnectClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -59,8 +59,22 @@ func (c *dependencyServiceClient) Connect(ctx context.Context, in *DependencySer return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DependencyService_ConnectClient = grpc.ServerStreamingClient[DependencyServiceConnectResponse] +type DependencyService_ConnectClient interface { + Recv() (*DependencyServiceConnectResponse, error) + grpc.ClientStream +} + +type dependencyServiceConnectClient struct { + grpc.ClientStream +} + +func (x *dependencyServiceConnectClient) Recv() (*DependencyServiceConnectResponse, error) { + m := new(DependencyServiceConnectResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *dependencyServiceClient) Sync(ctx context.Context, in *DependencyServiceSyncRequest, opts ...grpc.CallOption) (*Response, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) @@ -72,18 +86,40 @@ func (c *dependencyServiceClient) Sync(ctx context.Context, in *DependencyServic return out, nil } -func (c *dependencyServiceClient) UpdateLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[DependencyServiceUpdateLogsRequest, Response], error) { +func (c *dependencyServiceClient) UpdateLogs(ctx context.Context, opts ...grpc.CallOption) (DependencyService_UpdateLogsClient, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &DependencyService_ServiceDesc.Streams[1], DependencyService_UpdateLogs_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[DependencyServiceUpdateLogsRequest, Response]{ClientStream: stream} + x := &dependencyServiceUpdateLogsClient{ClientStream: stream} return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DependencyService_UpdateLogsClient = grpc.ClientStreamingClient[DependencyServiceUpdateLogsRequest, Response] +type DependencyService_UpdateLogsClient interface { + Send(*DependencyServiceUpdateLogsRequest) error + CloseAndRecv() (*Response, error) + grpc.ClientStream +} + +type dependencyServiceUpdateLogsClient struct { + grpc.ClientStream +} + +func (x *dependencyServiceUpdateLogsClient) Send(m *DependencyServiceUpdateLogsRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *dependencyServiceUpdateLogsClient) CloseAndRecv() (*Response, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(Response) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *dependencyServiceClient) SyncConfigSetup(ctx context.Context, in *DependencyServiceSyncConfigSetupRequest, opts ...grpc.CallOption) (*Response, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) @@ -97,36 +133,32 @@ func (c *dependencyServiceClient) SyncConfigSetup(ctx context.Context, in *Depen // DependencyServiceServer is the server API for DependencyService service. // All implementations must embed UnimplementedDependencyServiceServer -// for forward compatibility. +// for forward compatibility type DependencyServiceServer interface { - Connect(*DependencyServiceConnectRequest, grpc.ServerStreamingServer[DependencyServiceConnectResponse]) error + Connect(*DependencyServiceConnectRequest, DependencyService_ConnectServer) error Sync(context.Context, *DependencyServiceSyncRequest) (*Response, error) - UpdateLogs(grpc.ClientStreamingServer[DependencyServiceUpdateLogsRequest, Response]) error + UpdateLogs(DependencyService_UpdateLogsServer) error SyncConfigSetup(context.Context, *DependencyServiceSyncConfigSetupRequest) (*Response, error) mustEmbedUnimplementedDependencyServiceServer() } -// UnimplementedDependencyServiceServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedDependencyServiceServer struct{} +// UnimplementedDependencyServiceServer must be embedded to have forward compatible implementations. +type UnimplementedDependencyServiceServer struct { +} -func (UnimplementedDependencyServiceServer) Connect(*DependencyServiceConnectRequest, grpc.ServerStreamingServer[DependencyServiceConnectResponse]) error { +func (UnimplementedDependencyServiceServer) Connect(*DependencyServiceConnectRequest, DependencyService_ConnectServer) error { return status.Errorf(codes.Unimplemented, "method Connect not implemented") } func (UnimplementedDependencyServiceServer) Sync(context.Context, *DependencyServiceSyncRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } -func (UnimplementedDependencyServiceServer) UpdateLogs(grpc.ClientStreamingServer[DependencyServiceUpdateLogsRequest, Response]) error { +func (UnimplementedDependencyServiceServer) UpdateLogs(DependencyService_UpdateLogsServer) error { return status.Errorf(codes.Unimplemented, "method UpdateLogs not implemented") } func (UnimplementedDependencyServiceServer) SyncConfigSetup(context.Context, *DependencyServiceSyncConfigSetupRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncConfigSetup not implemented") } func (UnimplementedDependencyServiceServer) mustEmbedUnimplementedDependencyServiceServer() {} -func (UnimplementedDependencyServiceServer) testEmbeddedByValue() {} // UnsafeDependencyServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DependencyServiceServer will @@ -136,13 +168,6 @@ type UnsafeDependencyServiceServer interface { } func RegisterDependencyServiceServer(s grpc.ServiceRegistrar, srv DependencyServiceServer) { - // If the following call pancis, it indicates UnimplementedDependencyServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&DependencyService_ServiceDesc, srv) } @@ -151,11 +176,21 @@ func _DependencyService_Connect_Handler(srv interface{}, stream grpc.ServerStrea if err := stream.RecvMsg(m); err != nil { return err } - return srv.(DependencyServiceServer).Connect(m, &grpc.GenericServerStream[DependencyServiceConnectRequest, DependencyServiceConnectResponse]{ServerStream: stream}) + return srv.(DependencyServiceServer).Connect(m, &dependencyServiceConnectServer{ServerStream: stream}) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DependencyService_ConnectServer = grpc.ServerStreamingServer[DependencyServiceConnectResponse] +type DependencyService_ConnectServer interface { + Send(*DependencyServiceConnectResponse) error + grpc.ServerStream +} + +type dependencyServiceConnectServer struct { + grpc.ServerStream +} + +func (x *dependencyServiceConnectServer) Send(m *DependencyServiceConnectResponse) error { + return x.ServerStream.SendMsg(m) +} func _DependencyService_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DependencyServiceSyncRequest) @@ -176,11 +211,30 @@ func _DependencyService_Sync_Handler(srv interface{}, ctx context.Context, dec f } func _DependencyService_UpdateLogs_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DependencyServiceServer).UpdateLogs(&grpc.GenericServerStream[DependencyServiceUpdateLogsRequest, Response]{ServerStream: stream}) + return srv.(DependencyServiceServer).UpdateLogs(&dependencyServiceUpdateLogsServer{ServerStream: stream}) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DependencyService_UpdateLogsServer = grpc.ClientStreamingServer[DependencyServiceUpdateLogsRequest, Response] +type DependencyService_UpdateLogsServer interface { + SendAndClose(*Response) error + Recv() (*DependencyServiceUpdateLogsRequest, error) + grpc.ServerStream +} + +type dependencyServiceUpdateLogsServer struct { + grpc.ServerStream +} + +func (x *dependencyServiceUpdateLogsServer) SendAndClose(m *Response) error { + return x.ServerStream.SendMsg(m) +} + +func (x *dependencyServiceUpdateLogsServer) Recv() (*DependencyServiceUpdateLogsRequest, error) { + m := new(DependencyServiceUpdateLogsRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func _DependencyService_SyncConfigSetup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DependencyServiceSyncConfigSetupRequest) diff --git a/grpc/metric_service.pb.go b/grpc/metric_service.pb.go index 8d8b9236..c70e6b50 100644 --- a/grpc/metric_service.pb.go +++ b/grpc/metric_service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 -// protoc v5.29.2 +// protoc-gen-go v1.34.2 +// protoc v5.27.2 // source: services/metric_service.proto package grpc @@ -21,33 +21,36 @@ const ( ) type MetricServiceSendRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - NodeKey string `protobuf:"bytes,2,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - CpuUsagePercent float32 `protobuf:"fixed32,4,opt,name=cpu_usage_percent,json=cpuUsagePercent,proto3" json:"cpu_usage_percent,omitempty"` - TotalMemory uint64 `protobuf:"varint,5,opt,name=total_memory,json=totalMemory,proto3" json:"total_memory,omitempty"` - AvailableMemory uint64 `protobuf:"varint,6,opt,name=available_memory,json=availableMemory,proto3" json:"available_memory,omitempty"` - UsedMemory uint64 `protobuf:"varint,7,opt,name=used_memory,json=usedMemory,proto3" json:"used_memory,omitempty"` - UsedMemoryPercent float32 `protobuf:"fixed32,8,opt,name=used_memory_percent,json=usedMemoryPercent,proto3" json:"used_memory_percent,omitempty"` - TotalDisk uint64 `protobuf:"varint,9,opt,name=total_disk,json=totalDisk,proto3" json:"total_disk,omitempty"` - AvailableDisk uint64 `protobuf:"varint,10,opt,name=available_disk,json=availableDisk,proto3" json:"available_disk,omitempty"` - UsedDisk uint64 `protobuf:"varint,11,opt,name=used_disk,json=usedDisk,proto3" json:"used_disk,omitempty"` - UsedDiskPercent float32 `protobuf:"fixed32,12,opt,name=used_disk_percent,json=usedDiskPercent,proto3" json:"used_disk_percent,omitempty"` - DiskReadBytesRate float32 `protobuf:"fixed32,15,opt,name=disk_read_bytes_rate,json=diskReadBytesRate,proto3" json:"disk_read_bytes_rate,omitempty"` - DiskWriteBytesRate float32 `protobuf:"fixed32,16,opt,name=disk_write_bytes_rate,json=diskWriteBytesRate,proto3" json:"disk_write_bytes_rate,omitempty"` - NetworkBytesSentRate float32 `protobuf:"fixed32,17,opt,name=network_bytes_sent_rate,json=networkBytesSentRate,proto3" json:"network_bytes_sent_rate,omitempty"` - NetworkBytesRecvRate float32 `protobuf:"fixed32,18,opt,name=network_bytes_recv_rate,json=networkBytesRecvRate,proto3" json:"network_bytes_recv_rate,omitempty"` - GoroutineCount int32 `protobuf:"varint,19,opt,name=goroutine_count,json=goroutineCount,proto3" json:"goroutine_count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + NodeKey string `protobuf:"bytes,2,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + CpuUsagePercent float32 `protobuf:"fixed32,4,opt,name=cpu_usage_percent,json=cpuUsagePercent,proto3" json:"cpu_usage_percent,omitempty"` + TotalMemory uint64 `protobuf:"varint,5,opt,name=total_memory,json=totalMemory,proto3" json:"total_memory,omitempty"` + AvailableMemory uint64 `protobuf:"varint,6,opt,name=available_memory,json=availableMemory,proto3" json:"available_memory,omitempty"` + UsedMemory uint64 `protobuf:"varint,7,opt,name=used_memory,json=usedMemory,proto3" json:"used_memory,omitempty"` + UsedMemoryPercent float32 `protobuf:"fixed32,8,opt,name=used_memory_percent,json=usedMemoryPercent,proto3" json:"used_memory_percent,omitempty"` + TotalDisk uint64 `protobuf:"varint,9,opt,name=total_disk,json=totalDisk,proto3" json:"total_disk,omitempty"` + AvailableDisk uint64 `protobuf:"varint,10,opt,name=available_disk,json=availableDisk,proto3" json:"available_disk,omitempty"` + UsedDisk uint64 `protobuf:"varint,11,opt,name=used_disk,json=usedDisk,proto3" json:"used_disk,omitempty"` + UsedDiskPercent float32 `protobuf:"fixed32,12,opt,name=used_disk_percent,json=usedDiskPercent,proto3" json:"used_disk_percent,omitempty"` + DiskReadBytesRate float32 `protobuf:"fixed32,15,opt,name=disk_read_bytes_rate,json=diskReadBytesRate,proto3" json:"disk_read_bytes_rate,omitempty"` + DiskWriteBytesRate float32 `protobuf:"fixed32,16,opt,name=disk_write_bytes_rate,json=diskWriteBytesRate,proto3" json:"disk_write_bytes_rate,omitempty"` + NetworkBytesSentRate float32 `protobuf:"fixed32,17,opt,name=network_bytes_sent_rate,json=networkBytesSentRate,proto3" json:"network_bytes_sent_rate,omitempty"` + NetworkBytesRecvRate float32 `protobuf:"fixed32,18,opt,name=network_bytes_recv_rate,json=networkBytesRecvRate,proto3" json:"network_bytes_recv_rate,omitempty"` + GoroutineCount int32 `protobuf:"varint,19,opt,name=goroutine_count,json=goroutineCount,proto3" json:"goroutine_count,omitempty"` } func (x *MetricServiceSendRequest) Reset() { *x = MetricServiceSendRequest{} - mi := &file_services_metric_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_metric_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MetricServiceSendRequest) String() string { @@ -58,7 +61,7 @@ func (*MetricServiceSendRequest) ProtoMessage() {} func (x *MetricServiceSendRequest) ProtoReflect() protoreflect.Message { mi := &file_services_metric_service_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,6 +287,20 @@ func file_services_metric_service_proto_init() { return } file_entity_response_proto_init() + if !protoimpl.UnsafeEnabled { + file_services_metric_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*MetricServiceSendRequest); 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{ diff --git a/grpc/metric_service_grpc.pb.go b/grpc/metric_service_grpc.pb.go index 42f352b3..43f4f71c 100644 --- a/grpc/metric_service_grpc.pb.go +++ b/grpc/metric_service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.2 +// - protoc-gen-go-grpc v1.4.0 +// - protoc v5.27.2 // source: services/metric_service.proto package grpc @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( MetricService_Send_FullMethodName = "/grpc.MetricService/Send" @@ -49,24 +49,20 @@ func (c *metricServiceClient) Send(ctx context.Context, in *MetricServiceSendReq // MetricServiceServer is the server API for MetricService service. // All implementations must embed UnimplementedMetricServiceServer -// for forward compatibility. +// for forward compatibility type MetricServiceServer interface { Send(context.Context, *MetricServiceSendRequest) (*Response, error) mustEmbedUnimplementedMetricServiceServer() } -// UnimplementedMetricServiceServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMetricServiceServer struct{} +// UnimplementedMetricServiceServer must be embedded to have forward compatible implementations. +type UnimplementedMetricServiceServer struct { +} func (UnimplementedMetricServiceServer) Send(context.Context, *MetricServiceSendRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") } func (UnimplementedMetricServiceServer) mustEmbedUnimplementedMetricServiceServer() {} -func (UnimplementedMetricServiceServer) testEmbeddedByValue() {} // UnsafeMetricServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MetricServiceServer will @@ -76,13 +72,6 @@ type UnsafeMetricServiceServer interface { } func RegisterMetricServiceServer(s grpc.ServiceRegistrar, srv MetricServiceServer) { - // If the following call pancis, it indicates UnimplementedMetricServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&MetricService_ServiceDesc, srv) } diff --git a/grpc/model_base_service.pb.go b/grpc/model_base_service.pb.go index 391fd327..b16cbe03 100644 --- a/grpc/model_base_service.pb.go +++ b/grpc/model_base_service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 -// protoc v5.29.2 +// protoc-gen-go v1.34.2 +// protoc v5.27.2 // source: services/model_base_service.proto package grpc diff --git a/grpc/model_base_service_grpc.pb.go b/grpc/model_base_service_grpc.pb.go index 579a40c2..14d6188d 100644 --- a/grpc/model_base_service_grpc.pb.go +++ b/grpc/model_base_service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.2 +// - protoc-gen-go-grpc v1.4.0 +// - protoc v5.27.2 // source: services/model_base_service.proto package grpc @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( ModelBaseService_GetById_FullMethodName = "/grpc.ModelBaseService/GetById" @@ -217,7 +217,7 @@ func (c *modelBaseServiceClient) Count(ctx context.Context, in *ModelServiceCoun // ModelBaseServiceServer is the server API for ModelBaseService service. // All implementations must embed UnimplementedModelBaseServiceServer -// for forward compatibility. +// for forward compatibility type ModelBaseServiceServer interface { GetById(context.Context, *ModelServiceGetByIdRequest) (*Response, error) GetOne(context.Context, *ModelServiceGetOneRequest) (*Response, error) @@ -237,12 +237,9 @@ type ModelBaseServiceServer interface { mustEmbedUnimplementedModelBaseServiceServer() } -// UnimplementedModelBaseServiceServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedModelBaseServiceServer struct{} +// UnimplementedModelBaseServiceServer must be embedded to have forward compatible implementations. +type UnimplementedModelBaseServiceServer struct { +} func (UnimplementedModelBaseServiceServer) GetById(context.Context, *ModelServiceGetByIdRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method GetById not implemented") @@ -290,7 +287,6 @@ func (UnimplementedModelBaseServiceServer) Count(context.Context, *ModelServiceC return nil, status.Errorf(codes.Unimplemented, "method Count not implemented") } func (UnimplementedModelBaseServiceServer) mustEmbedUnimplementedModelBaseServiceServer() {} -func (UnimplementedModelBaseServiceServer) testEmbeddedByValue() {} // UnsafeModelBaseServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ModelBaseServiceServer will @@ -300,13 +296,6 @@ type UnsafeModelBaseServiceServer interface { } func RegisterModelBaseServiceServer(s grpc.ServiceRegistrar, srv ModelBaseServiceServer) { - // If the following call pancis, it indicates UnimplementedModelBaseServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&ModelBaseService_ServiceDesc, srv) } diff --git a/grpc/model_service_request.pb.go b/grpc/model_service_request.pb.go index fe82b47b..626fe3ca 100644 --- a/grpc/model_service_request.pb.go +++ b/grpc/model_service_request.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 -// protoc v5.29.2 +// protoc-gen-go v1.34.2 +// protoc v5.27.2 // source: entity/model_service_request.proto package grpc @@ -21,19 +21,22 @@ const ( ) type ModelServiceGetByIdRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` } func (x *ModelServiceGetByIdRequest) Reset() { *x = ModelServiceGetByIdRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceGetByIdRequest) String() string { @@ -44,7 +47,7 @@ func (*ModelServiceGetByIdRequest) ProtoMessage() {} func (x *ModelServiceGetByIdRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81,20 +84,23 @@ func (x *ModelServiceGetByIdRequest) GetId() string { } type ModelServiceGetOneRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - FindOptions []byte `protobuf:"bytes,4,opt,name=find_options,json=findOptions,proto3" json:"find_options,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + FindOptions []byte `protobuf:"bytes,4,opt,name=find_options,json=findOptions,proto3" json:"find_options,omitempty"` } func (x *ModelServiceGetOneRequest) Reset() { *x = ModelServiceGetOneRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceGetOneRequest) String() string { @@ -105,7 +111,7 @@ func (*ModelServiceGetOneRequest) ProtoMessage() {} func (x *ModelServiceGetOneRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,20 +155,23 @@ func (x *ModelServiceGetOneRequest) GetFindOptions() []byte { } type ModelServiceGetManyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - FindOptions []byte `protobuf:"bytes,4,opt,name=find_options,json=findOptions,proto3" json:"find_options,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + FindOptions []byte `protobuf:"bytes,4,opt,name=find_options,json=findOptions,proto3" json:"find_options,omitempty"` } func (x *ModelServiceGetManyRequest) Reset() { *x = ModelServiceGetManyRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceGetManyRequest) String() string { @@ -173,7 +182,7 @@ func (*ModelServiceGetManyRequest) ProtoMessage() {} func (x *ModelServiceGetManyRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,19 +226,22 @@ func (x *ModelServiceGetManyRequest) GetFindOptions() []byte { } type ModelServiceDeleteByIdRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` } func (x *ModelServiceDeleteByIdRequest) Reset() { *x = ModelServiceDeleteByIdRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceDeleteByIdRequest) String() string { @@ -240,7 +252,7 @@ func (*ModelServiceDeleteByIdRequest) ProtoMessage() {} func (x *ModelServiceDeleteByIdRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,19 +289,22 @@ func (x *ModelServiceDeleteByIdRequest) GetId() string { } type ModelServiceDeleteOneRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` } func (x *ModelServiceDeleteOneRequest) Reset() { *x = ModelServiceDeleteOneRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceDeleteOneRequest) String() string { @@ -300,7 +315,7 @@ func (*ModelServiceDeleteOneRequest) ProtoMessage() {} func (x *ModelServiceDeleteOneRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -337,19 +352,22 @@ func (x *ModelServiceDeleteOneRequest) GetQuery() []byte { } type ModelServiceDeleteManyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` } func (x *ModelServiceDeleteManyRequest) Reset() { *x = ModelServiceDeleteManyRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceDeleteManyRequest) String() string { @@ -360,7 +378,7 @@ func (*ModelServiceDeleteManyRequest) ProtoMessage() {} func (x *ModelServiceDeleteManyRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -397,20 +415,23 @@ func (x *ModelServiceDeleteManyRequest) GetQuery() []byte { } type ModelServiceUpdateByIdRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` - Update []byte `protobuf:"bytes,4,opt,name=update,proto3" json:"update,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Update []byte `protobuf:"bytes,4,opt,name=update,proto3" json:"update,omitempty"` } func (x *ModelServiceUpdateByIdRequest) Reset() { *x = ModelServiceUpdateByIdRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceUpdateByIdRequest) String() string { @@ -421,7 +442,7 @@ func (*ModelServiceUpdateByIdRequest) ProtoMessage() {} func (x *ModelServiceUpdateByIdRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -465,20 +486,23 @@ func (x *ModelServiceUpdateByIdRequest) GetUpdate() []byte { } type ModelServiceUpdateOneRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - Update []byte `protobuf:"bytes,4,opt,name=update,proto3" json:"update,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + Update []byte `protobuf:"bytes,4,opt,name=update,proto3" json:"update,omitempty"` } func (x *ModelServiceUpdateOneRequest) Reset() { *x = ModelServiceUpdateOneRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceUpdateOneRequest) String() string { @@ -489,7 +513,7 @@ func (*ModelServiceUpdateOneRequest) ProtoMessage() {} func (x *ModelServiceUpdateOneRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,20 +557,23 @@ func (x *ModelServiceUpdateOneRequest) GetUpdate() []byte { } type ModelServiceUpdateManyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - Update []byte `protobuf:"bytes,4,opt,name=update,proto3" json:"update,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + Update []byte `protobuf:"bytes,4,opt,name=update,proto3" json:"update,omitempty"` } func (x *ModelServiceUpdateManyRequest) Reset() { *x = ModelServiceUpdateManyRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceUpdateManyRequest) String() string { @@ -557,7 +584,7 @@ func (*ModelServiceUpdateManyRequest) ProtoMessage() {} func (x *ModelServiceUpdateManyRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -601,20 +628,23 @@ func (x *ModelServiceUpdateManyRequest) GetUpdate() []byte { } type ModelServiceReplaceByIdRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` - Model []byte `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Model []byte `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` } func (x *ModelServiceReplaceByIdRequest) Reset() { *x = ModelServiceReplaceByIdRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceReplaceByIdRequest) String() string { @@ -625,7 +655,7 @@ func (*ModelServiceReplaceByIdRequest) ProtoMessage() {} func (x *ModelServiceReplaceByIdRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,20 +699,23 @@ func (x *ModelServiceReplaceByIdRequest) GetModel() []byte { } type ModelServiceReplaceOneRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - Model []byte `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + Model []byte `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` } func (x *ModelServiceReplaceOneRequest) Reset() { *x = ModelServiceReplaceOneRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceReplaceOneRequest) String() string { @@ -693,7 +726,7 @@ func (*ModelServiceReplaceOneRequest) ProtoMessage() {} func (x *ModelServiceReplaceOneRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,19 +770,22 @@ func (x *ModelServiceReplaceOneRequest) GetModel() []byte { } type ModelServiceInsertOneRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Model []byte `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Model []byte `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` } func (x *ModelServiceInsertOneRequest) Reset() { *x = ModelServiceInsertOneRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceInsertOneRequest) String() string { @@ -760,7 +796,7 @@ func (*ModelServiceInsertOneRequest) ProtoMessage() {} func (x *ModelServiceInsertOneRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,19 +833,22 @@ func (x *ModelServiceInsertOneRequest) GetModel() []byte { } type ModelServiceInsertManyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Models []byte `protobuf:"bytes,3,opt,name=models,proto3" json:"models,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Models []byte `protobuf:"bytes,3,opt,name=models,proto3" json:"models,omitempty"` } func (x *ModelServiceInsertManyRequest) Reset() { *x = ModelServiceInsertManyRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceInsertManyRequest) String() string { @@ -820,7 +859,7 @@ func (*ModelServiceInsertManyRequest) ProtoMessage() {} func (x *ModelServiceInsertManyRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -857,20 +896,23 @@ func (x *ModelServiceInsertManyRequest) GetModels() []byte { } type ModelServiceUpsertOneRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - Model []byte `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + Model []byte `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` } func (x *ModelServiceUpsertOneRequest) Reset() { *x = ModelServiceUpsertOneRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceUpsertOneRequest) String() string { @@ -881,7 +923,7 @@ func (*ModelServiceUpsertOneRequest) ProtoMessage() {} func (x *ModelServiceUpsertOneRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -925,19 +967,22 @@ func (x *ModelServiceUpsertOneRequest) GetModel() []byte { } type ModelServiceCountRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` - Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + Query []byte `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` } func (x *ModelServiceCountRequest) Reset() { *x = ModelServiceCountRequest{} - mi := &file_entity_model_service_request_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_model_service_request_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ModelServiceCountRequest) String() string { @@ -948,7 +993,7 @@ func (*ModelServiceCountRequest) ProtoMessage() {} func (x *ModelServiceCountRequest) ProtoReflect() protoreflect.Message { mi := &file_entity_model_service_request_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1153,6 +1198,188 @@ func file_entity_model_service_request_proto_init() { if File_entity_model_service_request_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_entity_model_service_request_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceGetByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceGetOneRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceGetManyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceDeleteByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceDeleteOneRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceDeleteManyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceUpdateByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceUpdateOneRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceUpdateManyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceReplaceByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceReplaceOneRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceInsertOneRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceInsertManyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceUpsertOneRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entity_model_service_request_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*ModelServiceCountRequest); 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{ diff --git a/grpc/node_service.pb.go b/grpc/node_service.pb.go index 0ca0dca4..e7f2aa87 100644 --- a/grpc/node_service.pb.go +++ b/grpc/node_service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 -// protoc v5.29.2 +// protoc-gen-go v1.34.2 +// protoc v5.27.2 // source: services/node_service.proto package grpc @@ -64,19 +64,22 @@ func (NodeServiceSubscribeCode) EnumDescriptor() ([]byte, []int) { } type NodeServiceRegisterRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` - MaxRunners int32 `protobuf:"varint,3,opt,name=max_runners,json=maxRunners,proto3" json:"max_runners,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` + MaxRunners int32 `protobuf:"varint,3,opt,name=max_runners,json=maxRunners,proto3" json:"max_runners,omitempty"` } func (x *NodeServiceRegisterRequest) Reset() { *x = NodeServiceRegisterRequest{} - mi := &file_services_node_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_node_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NodeServiceRegisterRequest) String() string { @@ -87,7 +90,7 @@ func (*NodeServiceRegisterRequest) ProtoMessage() {} func (x *NodeServiceRegisterRequest) ProtoReflect() protoreflect.Message { mi := &file_services_node_service_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124,17 +127,20 @@ func (x *NodeServiceRegisterRequest) GetMaxRunners() int32 { } type NodeServiceSendHeartbeatRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` } func (x *NodeServiceSendHeartbeatRequest) Reset() { *x = NodeServiceSendHeartbeatRequest{} - mi := &file_services_node_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_node_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NodeServiceSendHeartbeatRequest) String() string { @@ -145,7 +151,7 @@ func (*NodeServiceSendHeartbeatRequest) ProtoMessage() {} func (x *NodeServiceSendHeartbeatRequest) ProtoReflect() protoreflect.Message { mi := &file_services_node_service_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,17 +174,20 @@ func (x *NodeServiceSendHeartbeatRequest) GetNodeKey() string { } type NodeServiceSubscribeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` } func (x *NodeServiceSubscribeRequest) Reset() { *x = NodeServiceSubscribeRequest{} - mi := &file_services_node_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_node_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NodeServiceSubscribeRequest) String() string { @@ -189,7 +198,7 @@ func (*NodeServiceSubscribeRequest) ProtoMessage() {} func (x *NodeServiceSubscribeRequest) ProtoReflect() protoreflect.Message { mi := &file_services_node_service_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,17 +221,20 @@ func (x *NodeServiceSubscribeRequest) GetNodeKey() string { } type NodeServiceSubscribeResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code NodeServiceSubscribeCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.NodeServiceSubscribeCode" json:"code,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code NodeServiceSubscribeCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.NodeServiceSubscribeCode" json:"code,omitempty"` } func (x *NodeServiceSubscribeResponse) Reset() { *x = NodeServiceSubscribeResponse{} - mi := &file_services_node_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_node_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NodeServiceSubscribeResponse) String() string { @@ -233,7 +245,7 @@ func (*NodeServiceSubscribeResponse) ProtoMessage() {} func (x *NodeServiceSubscribeResponse) ProtoReflect() protoreflect.Message { mi := &file_services_node_service_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,6 +358,56 @@ func file_services_node_service_proto_init() { return } file_entity_response_proto_init() + if !protoimpl.UnsafeEnabled { + file_services_node_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*NodeServiceRegisterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_node_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*NodeServiceSendHeartbeatRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_node_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*NodeServiceSubscribeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_node_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*NodeServiceSubscribeResponse); 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{ diff --git a/grpc/node_service_grpc.pb.go b/grpc/node_service_grpc.pb.go index cbbd26e9..0b484cb6 100644 --- a/grpc/node_service_grpc.pb.go +++ b/grpc/node_service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.2 +// - protoc-gen-go-grpc v1.4.0 +// - protoc v5.27.2 // source: services/node_service.proto package grpc @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( NodeService_Register_FullMethodName = "/grpc.NodeService/Register" @@ -30,7 +30,7 @@ const ( type NodeServiceClient interface { Register(ctx context.Context, in *NodeServiceRegisterRequest, opts ...grpc.CallOption) (*Response, error) SendHeartbeat(ctx context.Context, in *NodeServiceSendHeartbeatRequest, opts ...grpc.CallOption) (*Response, error) - Subscribe(ctx context.Context, in *NodeServiceSubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NodeServiceSubscribeResponse], error) + Subscribe(ctx context.Context, in *NodeServiceSubscribeRequest, opts ...grpc.CallOption) (NodeService_SubscribeClient, error) } type nodeServiceClient struct { @@ -61,13 +61,13 @@ func (c *nodeServiceClient) SendHeartbeat(ctx context.Context, in *NodeServiceSe return out, nil } -func (c *nodeServiceClient) Subscribe(ctx context.Context, in *NodeServiceSubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NodeServiceSubscribeResponse], error) { +func (c *nodeServiceClient) Subscribe(ctx context.Context, in *NodeServiceSubscribeRequest, opts ...grpc.CallOption) (NodeService_SubscribeClient, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &NodeService_ServiceDesc.Streams[0], NodeService_Subscribe_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[NodeServiceSubscribeRequest, NodeServiceSubscribeResponse]{ClientStream: stream} + x := &nodeServiceSubscribeClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -77,25 +77,36 @@ func (c *nodeServiceClient) Subscribe(ctx context.Context, in *NodeServiceSubscr return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type NodeService_SubscribeClient = grpc.ServerStreamingClient[NodeServiceSubscribeResponse] +type NodeService_SubscribeClient interface { + Recv() (*NodeServiceSubscribeResponse, error) + grpc.ClientStream +} + +type nodeServiceSubscribeClient struct { + grpc.ClientStream +} + +func (x *nodeServiceSubscribeClient) Recv() (*NodeServiceSubscribeResponse, error) { + m := new(NodeServiceSubscribeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} // NodeServiceServer is the server API for NodeService service. // All implementations must embed UnimplementedNodeServiceServer -// for forward compatibility. +// for forward compatibility type NodeServiceServer interface { Register(context.Context, *NodeServiceRegisterRequest) (*Response, error) SendHeartbeat(context.Context, *NodeServiceSendHeartbeatRequest) (*Response, error) - Subscribe(*NodeServiceSubscribeRequest, grpc.ServerStreamingServer[NodeServiceSubscribeResponse]) error + Subscribe(*NodeServiceSubscribeRequest, NodeService_SubscribeServer) error mustEmbedUnimplementedNodeServiceServer() } -// UnimplementedNodeServiceServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedNodeServiceServer struct{} +// UnimplementedNodeServiceServer must be embedded to have forward compatible implementations. +type UnimplementedNodeServiceServer struct { +} func (UnimplementedNodeServiceServer) Register(context.Context, *NodeServiceRegisterRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") @@ -103,11 +114,10 @@ func (UnimplementedNodeServiceServer) Register(context.Context, *NodeServiceRegi func (UnimplementedNodeServiceServer) SendHeartbeat(context.Context, *NodeServiceSendHeartbeatRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method SendHeartbeat not implemented") } -func (UnimplementedNodeServiceServer) Subscribe(*NodeServiceSubscribeRequest, grpc.ServerStreamingServer[NodeServiceSubscribeResponse]) error { +func (UnimplementedNodeServiceServer) Subscribe(*NodeServiceSubscribeRequest, NodeService_SubscribeServer) error { return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } func (UnimplementedNodeServiceServer) mustEmbedUnimplementedNodeServiceServer() {} -func (UnimplementedNodeServiceServer) testEmbeddedByValue() {} // UnsafeNodeServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NodeServiceServer will @@ -117,13 +127,6 @@ type UnsafeNodeServiceServer interface { } func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer) { - // If the following call pancis, it indicates UnimplementedNodeServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&NodeService_ServiceDesc, srv) } @@ -168,11 +171,21 @@ func _NodeService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) e if err := stream.RecvMsg(m); err != nil { return err } - return srv.(NodeServiceServer).Subscribe(m, &grpc.GenericServerStream[NodeServiceSubscribeRequest, NodeServiceSubscribeResponse]{ServerStream: stream}) + return srv.(NodeServiceServer).Subscribe(m, &nodeServiceSubscribeServer{ServerStream: stream}) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type NodeService_SubscribeServer = grpc.ServerStreamingServer[NodeServiceSubscribeResponse] +type NodeService_SubscribeServer interface { + Send(*NodeServiceSubscribeResponse) error + grpc.ServerStream +} + +type nodeServiceSubscribeServer struct { + grpc.ServerStream +} + +func (x *nodeServiceSubscribeServer) Send(m *NodeServiceSubscribeResponse) error { + return x.ServerStream.SendMsg(m) +} // NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service. // It's only intended for direct use with grpc.RegisterService, diff --git a/grpc/proto/services/task_service.proto b/grpc/proto/services/task_service.proto index 2c077ed4..96b41ed7 100644 --- a/grpc/proto/services/task_service.proto +++ b/grpc/proto/services/task_service.proto @@ -1,7 +1,5 @@ syntax = "proto3"; -import "entity/response.proto"; - package grpc; option go_package = ".;grpc"; @@ -31,6 +29,19 @@ message TaskServiceConnectRequest { bytes data = 3; } +enum TaskServiceConnectResponseCode { + CONNECT_SUCCESS = 0; + CONNECT_ERROR = 1; + CONNECT_INVALID_REQUEST = 2; + CONNECT_TASK_NOT_FOUND = 3; +} + +message TaskServiceConnectResponse { + TaskServiceConnectResponseCode code = 1; + string message = 2; + string error = 3; +} + message TaskServiceFetchTaskRequest { string node_key = 1; } @@ -44,9 +55,44 @@ message TaskServiceSendNotificationRequest { string task_id = 2; } +enum TaskServiceSendNotificationResponseCode { + NOTIFICATION_SUCCESS = 0; + NOTIFICATION_ERROR = 1; + NOTIFICATION_DISABLED = 2; +} + +message TaskServiceSendNotificationResponse { + TaskServiceSendNotificationResponseCode code = 1; + string message = 2; + string error = 3; +} + +message TaskServiceCheckProcessRequest { + string task_id = 1; + int32 pid = 2; +} + +enum ProcessStatus { + PROCESS_UNKNOWN = 0; + PROCESS_RUNNING = 1; + PROCESS_FINISHED = 2; + PROCESS_ERROR = 3; + PROCESS_NOT_FOUND = 4; + PROCESS_ZOMBIE = 5; +} + +message TaskServiceCheckProcessResponse { + string task_id = 1; + int32 pid = 2; + ProcessStatus status = 3; + int32 exit_code = 4; + string error_message = 5; +} + service TaskService { rpc Subscribe(TaskServiceSubscribeRequest) returns (stream TaskServiceSubscribeResponse){}; - rpc Connect(stream TaskServiceConnectRequest) returns (Response){}; + rpc Connect(stream TaskServiceConnectRequest) returns (stream TaskServiceConnectResponse){}; rpc FetchTask(TaskServiceFetchTaskRequest) returns (TaskServiceFetchTaskResponse){}; - rpc SendNotification(TaskServiceSendNotificationRequest) returns (Response){}; + rpc SendNotification(TaskServiceSendNotificationRequest) returns (TaskServiceSendNotificationResponse){}; + rpc CheckProcess(TaskServiceCheckProcessRequest) returns (TaskServiceCheckProcessResponse){}; } diff --git a/grpc/response.pb.go b/grpc/response.pb.go index f52530c0..435e17c7 100644 --- a/grpc/response.pb.go +++ b/grpc/response.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 -// protoc v5.29.2 +// protoc-gen-go v1.34.2 +// protoc v5.27.2 // source: entity/response.proto package grpc @@ -67,21 +67,24 @@ func (ResponseCode) EnumDescriptor() ([]byte, []int) { } type Response struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.ResponseCode" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` - Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.ResponseCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` + Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"` } func (x *Response) Reset() { *x = Response{} - mi := &file_entity_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_entity_response_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Response) String() string { @@ -92,7 +95,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_entity_response_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,6 +197,20 @@ func file_entity_response_proto_init() { if File_entity_response_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_entity_response_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Response); 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{ diff --git a/grpc/task_service.pb.go b/grpc/task_service.pb.go index aab34908..f1bc8ec8 100644 --- a/grpc/task_service.pb.go +++ b/grpc/task_service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 -// protoc v5.29.2 +// protoc-gen-go v1.34.2 +// protoc v5.27.2 // source: services/task_service.proto package grpc @@ -112,18 +112,180 @@ func (TaskServiceConnectCode) EnumDescriptor() ([]byte, []int) { return file_services_task_service_proto_rawDescGZIP(), []int{1} } +type TaskServiceConnectResponseCode int32 + +const ( + TaskServiceConnectResponseCode_CONNECT_SUCCESS TaskServiceConnectResponseCode = 0 + TaskServiceConnectResponseCode_CONNECT_ERROR TaskServiceConnectResponseCode = 1 + TaskServiceConnectResponseCode_CONNECT_INVALID_REQUEST TaskServiceConnectResponseCode = 2 + TaskServiceConnectResponseCode_CONNECT_TASK_NOT_FOUND TaskServiceConnectResponseCode = 3 +) + +// Enum value maps for TaskServiceConnectResponseCode. +var ( + TaskServiceConnectResponseCode_name = map[int32]string{ + 0: "CONNECT_SUCCESS", + 1: "CONNECT_ERROR", + 2: "CONNECT_INVALID_REQUEST", + 3: "CONNECT_TASK_NOT_FOUND", + } + TaskServiceConnectResponseCode_value = map[string]int32{ + "CONNECT_SUCCESS": 0, + "CONNECT_ERROR": 1, + "CONNECT_INVALID_REQUEST": 2, + "CONNECT_TASK_NOT_FOUND": 3, + } +) + +func (x TaskServiceConnectResponseCode) Enum() *TaskServiceConnectResponseCode { + p := new(TaskServiceConnectResponseCode) + *p = x + return p +} + +func (x TaskServiceConnectResponseCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TaskServiceConnectResponseCode) Descriptor() protoreflect.EnumDescriptor { + return file_services_task_service_proto_enumTypes[2].Descriptor() +} + +func (TaskServiceConnectResponseCode) Type() protoreflect.EnumType { + return &file_services_task_service_proto_enumTypes[2] +} + +func (x TaskServiceConnectResponseCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TaskServiceConnectResponseCode.Descriptor instead. +func (TaskServiceConnectResponseCode) EnumDescriptor() ([]byte, []int) { + return file_services_task_service_proto_rawDescGZIP(), []int{2} +} + +type TaskServiceSendNotificationResponseCode int32 + +const ( + TaskServiceSendNotificationResponseCode_NOTIFICATION_SUCCESS TaskServiceSendNotificationResponseCode = 0 + TaskServiceSendNotificationResponseCode_NOTIFICATION_ERROR TaskServiceSendNotificationResponseCode = 1 + TaskServiceSendNotificationResponseCode_NOTIFICATION_DISABLED TaskServiceSendNotificationResponseCode = 2 +) + +// Enum value maps for TaskServiceSendNotificationResponseCode. +var ( + TaskServiceSendNotificationResponseCode_name = map[int32]string{ + 0: "NOTIFICATION_SUCCESS", + 1: "NOTIFICATION_ERROR", + 2: "NOTIFICATION_DISABLED", + } + TaskServiceSendNotificationResponseCode_value = map[string]int32{ + "NOTIFICATION_SUCCESS": 0, + "NOTIFICATION_ERROR": 1, + "NOTIFICATION_DISABLED": 2, + } +) + +func (x TaskServiceSendNotificationResponseCode) Enum() *TaskServiceSendNotificationResponseCode { + p := new(TaskServiceSendNotificationResponseCode) + *p = x + return p +} + +func (x TaskServiceSendNotificationResponseCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TaskServiceSendNotificationResponseCode) Descriptor() protoreflect.EnumDescriptor { + return file_services_task_service_proto_enumTypes[3].Descriptor() +} + +func (TaskServiceSendNotificationResponseCode) Type() protoreflect.EnumType { + return &file_services_task_service_proto_enumTypes[3] +} + +func (x TaskServiceSendNotificationResponseCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TaskServiceSendNotificationResponseCode.Descriptor instead. +func (TaskServiceSendNotificationResponseCode) EnumDescriptor() ([]byte, []int) { + return file_services_task_service_proto_rawDescGZIP(), []int{3} +} + +type ProcessStatus int32 + +const ( + ProcessStatus_PROCESS_UNKNOWN ProcessStatus = 0 + ProcessStatus_PROCESS_RUNNING ProcessStatus = 1 + ProcessStatus_PROCESS_FINISHED ProcessStatus = 2 + ProcessStatus_PROCESS_ERROR ProcessStatus = 3 + ProcessStatus_PROCESS_NOT_FOUND ProcessStatus = 4 + ProcessStatus_PROCESS_ZOMBIE ProcessStatus = 5 +) + +// Enum value maps for ProcessStatus. +var ( + ProcessStatus_name = map[int32]string{ + 0: "PROCESS_UNKNOWN", + 1: "PROCESS_RUNNING", + 2: "PROCESS_FINISHED", + 3: "PROCESS_ERROR", + 4: "PROCESS_NOT_FOUND", + 5: "PROCESS_ZOMBIE", + } + ProcessStatus_value = map[string]int32{ + "PROCESS_UNKNOWN": 0, + "PROCESS_RUNNING": 1, + "PROCESS_FINISHED": 2, + "PROCESS_ERROR": 3, + "PROCESS_NOT_FOUND": 4, + "PROCESS_ZOMBIE": 5, + } +) + +func (x ProcessStatus) Enum() *ProcessStatus { + p := new(ProcessStatus) + *p = x + return p +} + +func (x ProcessStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ProcessStatus) Descriptor() protoreflect.EnumDescriptor { + return file_services_task_service_proto_enumTypes[4].Descriptor() +} + +func (ProcessStatus) Type() protoreflect.EnumType { + return &file_services_task_service_proto_enumTypes[4] +} + +func (x ProcessStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ProcessStatus.Descriptor instead. +func (ProcessStatus) EnumDescriptor() ([]byte, []int) { + return file_services_task_service_proto_rawDescGZIP(), []int{4} +} + type TaskServiceSubscribeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` } func (x *TaskServiceSubscribeRequest) Reset() { *x = TaskServiceSubscribeRequest{} - mi := &file_services_task_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskServiceSubscribeRequest) String() string { @@ -134,7 +296,7 @@ func (*TaskServiceSubscribeRequest) ProtoMessage() {} func (x *TaskServiceSubscribeRequest) ProtoReflect() protoreflect.Message { mi := &file_services_task_service_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,19 +319,22 @@ func (x *TaskServiceSubscribeRequest) GetTaskId() string { } type TaskServiceSubscribeResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code TaskServiceSubscribeCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.TaskServiceSubscribeCode" json:"code,omitempty"` - TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code TaskServiceSubscribeCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.TaskServiceSubscribeCode" json:"code,omitempty"` + TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` } func (x *TaskServiceSubscribeResponse) Reset() { *x = TaskServiceSubscribeResponse{} - mi := &file_services_task_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskServiceSubscribeResponse) String() string { @@ -180,7 +345,7 @@ func (*TaskServiceSubscribeResponse) ProtoMessage() {} func (x *TaskServiceSubscribeResponse) ProtoReflect() protoreflect.Message { mi := &file_services_task_service_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,19 +382,22 @@ func (x *TaskServiceSubscribeResponse) GetForce() bool { } type TaskServiceConnectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code TaskServiceConnectCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.TaskServiceConnectCode" json:"code,omitempty"` - TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code TaskServiceConnectCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.TaskServiceConnectCode" json:"code,omitempty"` + TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` } func (x *TaskServiceConnectRequest) Reset() { *x = TaskServiceConnectRequest{} - mi := &file_services_task_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskServiceConnectRequest) String() string { @@ -240,7 +408,7 @@ func (*TaskServiceConnectRequest) ProtoMessage() {} func (x *TaskServiceConnectRequest) ProtoReflect() protoreflect.Message { mi := &file_services_task_service_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,18 +444,84 @@ func (x *TaskServiceConnectRequest) GetData() []byte { return nil } -type TaskServiceFetchTaskRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - unknownFields protoimpl.UnknownFields +type TaskServiceConnectResponse struct { + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code TaskServiceConnectResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.TaskServiceConnectResponseCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *TaskServiceConnectResponse) Reset() { + *x = TaskServiceConnectResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskServiceConnectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskServiceConnectResponse) ProtoMessage() {} + +func (x *TaskServiceConnectResponse) ProtoReflect() protoreflect.Message { + mi := &file_services_task_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskServiceConnectResponse.ProtoReflect.Descriptor instead. +func (*TaskServiceConnectResponse) Descriptor() ([]byte, []int) { + return file_services_task_service_proto_rawDescGZIP(), []int{3} +} + +func (x *TaskServiceConnectResponse) GetCode() TaskServiceConnectResponseCode { + if x != nil { + return x.Code + } + return TaskServiceConnectResponseCode_CONNECT_SUCCESS +} + +func (x *TaskServiceConnectResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *TaskServiceConnectResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type TaskServiceFetchTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` } func (x *TaskServiceFetchTaskRequest) Reset() { *x = TaskServiceFetchTaskRequest{} - mi := &file_services_task_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskServiceFetchTaskRequest) String() string { @@ -297,8 +531,8 @@ func (x *TaskServiceFetchTaskRequest) String() string { func (*TaskServiceFetchTaskRequest) ProtoMessage() {} func (x *TaskServiceFetchTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_services_task_service_proto_msgTypes[3] - if x != nil { + mi := &file_services_task_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,7 +544,7 @@ func (x *TaskServiceFetchTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskServiceFetchTaskRequest.ProtoReflect.Descriptor instead. func (*TaskServiceFetchTaskRequest) Descriptor() ([]byte, []int) { - return file_services_task_service_proto_rawDescGZIP(), []int{3} + return file_services_task_service_proto_rawDescGZIP(), []int{4} } func (x *TaskServiceFetchTaskRequest) GetNodeKey() string { @@ -321,17 +555,20 @@ func (x *TaskServiceFetchTaskRequest) GetNodeKey() string { } type TaskServiceFetchTaskResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` } func (x *TaskServiceFetchTaskResponse) Reset() { *x = TaskServiceFetchTaskResponse{} - mi := &file_services_task_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskServiceFetchTaskResponse) String() string { @@ -341,8 +578,8 @@ func (x *TaskServiceFetchTaskResponse) String() string { func (*TaskServiceFetchTaskResponse) ProtoMessage() {} func (x *TaskServiceFetchTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_services_task_service_proto_msgTypes[4] - if x != nil { + mi := &file_services_task_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,7 +591,7 @@ func (x *TaskServiceFetchTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskServiceFetchTaskResponse.ProtoReflect.Descriptor instead. func (*TaskServiceFetchTaskResponse) Descriptor() ([]byte, []int) { - return file_services_task_service_proto_rawDescGZIP(), []int{4} + return file_services_task_service_proto_rawDescGZIP(), []int{5} } func (x *TaskServiceFetchTaskResponse) GetTaskId() string { @@ -365,18 +602,21 @@ func (x *TaskServiceFetchTaskResponse) GetTaskId() string { } type TaskServiceSendNotificationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` - TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` + TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` } func (x *TaskServiceSendNotificationRequest) Reset() { *x = TaskServiceSendNotificationRequest{} - mi := &file_services_task_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskServiceSendNotificationRequest) String() string { @@ -386,8 +626,8 @@ func (x *TaskServiceSendNotificationRequest) String() string { func (*TaskServiceSendNotificationRequest) ProtoMessage() {} func (x *TaskServiceSendNotificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_services_task_service_proto_msgTypes[5] - if x != nil { + mi := &file_services_task_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -399,7 +639,7 @@ func (x *TaskServiceSendNotificationRequest) ProtoReflect() protoreflect.Message // Deprecated: Use TaskServiceSendNotificationRequest.ProtoReflect.Descriptor instead. func (*TaskServiceSendNotificationRequest) Descriptor() ([]byte, []int) { - return file_services_task_service_proto_rawDescGZIP(), []int{5} + return file_services_task_service_proto_rawDescGZIP(), []int{6} } func (x *TaskServiceSendNotificationRequest) GetNodeKey() string { @@ -416,74 +656,338 @@ func (x *TaskServiceSendNotificationRequest) GetTaskId() string { return "" } +type TaskServiceSendNotificationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code TaskServiceSendNotificationResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.TaskServiceSendNotificationResponseCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *TaskServiceSendNotificationResponse) Reset() { + *x = TaskServiceSendNotificationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskServiceSendNotificationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskServiceSendNotificationResponse) ProtoMessage() {} + +func (x *TaskServiceSendNotificationResponse) ProtoReflect() protoreflect.Message { + mi := &file_services_task_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskServiceSendNotificationResponse.ProtoReflect.Descriptor instead. +func (*TaskServiceSendNotificationResponse) Descriptor() ([]byte, []int) { + return file_services_task_service_proto_rawDescGZIP(), []int{7} +} + +func (x *TaskServiceSendNotificationResponse) GetCode() TaskServiceSendNotificationResponseCode { + if x != nil { + return x.Code + } + return TaskServiceSendNotificationResponseCode_NOTIFICATION_SUCCESS +} + +func (x *TaskServiceSendNotificationResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *TaskServiceSendNotificationResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type TaskServiceCheckProcessRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Pid int32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` +} + +func (x *TaskServiceCheckProcessRequest) Reset() { + *x = TaskServiceCheckProcessRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskServiceCheckProcessRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskServiceCheckProcessRequest) ProtoMessage() {} + +func (x *TaskServiceCheckProcessRequest) ProtoReflect() protoreflect.Message { + mi := &file_services_task_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskServiceCheckProcessRequest.ProtoReflect.Descriptor instead. +func (*TaskServiceCheckProcessRequest) Descriptor() ([]byte, []int) { + return file_services_task_service_proto_rawDescGZIP(), []int{8} +} + +func (x *TaskServiceCheckProcessRequest) GetTaskId() string { + if x != nil { + return x.TaskId + } + return "" +} + +func (x *TaskServiceCheckProcessRequest) GetPid() int32 { + if x != nil { + return x.Pid + } + return 0 +} + +type TaskServiceCheckProcessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Pid int32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` + Status ProcessStatus `protobuf:"varint,3,opt,name=status,proto3,enum=grpc.ProcessStatus" json:"status,omitempty"` + ExitCode int32 `protobuf:"varint,4,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` +} + +func (x *TaskServiceCheckProcessResponse) Reset() { + *x = TaskServiceCheckProcessResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_services_task_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskServiceCheckProcessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskServiceCheckProcessResponse) ProtoMessage() {} + +func (x *TaskServiceCheckProcessResponse) ProtoReflect() protoreflect.Message { + mi := &file_services_task_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskServiceCheckProcessResponse.ProtoReflect.Descriptor instead. +func (*TaskServiceCheckProcessResponse) Descriptor() ([]byte, []int) { + return file_services_task_service_proto_rawDescGZIP(), []int{9} +} + +func (x *TaskServiceCheckProcessResponse) GetTaskId() string { + if x != nil { + return x.TaskId + } + return "" +} + +func (x *TaskServiceCheckProcessResponse) GetPid() int32 { + if x != nil { + return x.Pid + } + return 0 +} + +func (x *TaskServiceCheckProcessResponse) GetStatus() ProcessStatus { + if x != nil { + return x.Status + } + return ProcessStatus_PROCESS_UNKNOWN +} + +func (x *TaskServiceCheckProcessResponse) GetExitCode() int32 { + if x != nil { + return x.ExitCode + } + return 0 +} + +func (x *TaskServiceCheckProcessResponse) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + var File_services_task_service_proto protoreflect.FileDescriptor var file_services_task_service_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, - 0x72, 0x70, 0x63, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x36, 0x0a, 0x1b, 0x54, 0x61, - 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, - 0x49, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x1c, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x7a, 0x0a, 0x19, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x38, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x37, 0x0a, 0x1c, - 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x22, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, - 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x2a, - 0x26, 0x0a, 0x18, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x43, - 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x00, 0x2a, 0x44, 0x0a, 0x16, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, - 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x5f, 0x4c, 0x4f, 0x47, - 0x53, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x32, 0xcb, 0x02, - 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, - 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x70, + 0x72, 0x70, 0x63, 0x22, 0x36, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x1c, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, + 0x7a, 0x0a, 0x19, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x17, + 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x86, 0x01, 0x0a, 0x1a, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x22, 0x38, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x37, + 0x0a, 0x1c, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, + 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x22, 0x54, 0x61, 0x73, 0x6b, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, + 0x64, 0x22, 0x98, 0x01, 0x0a, 0x23, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x4b, 0x0a, 0x1e, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, + 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0xbb, 0x01, 0x0a, 0x1f, 0x54, 0x61, + 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, + 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x26, 0x0a, 0x18, 0x54, 0x61, 0x73, 0x6b, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x00, 0x2a, + 0x44, 0x0a, 0x16, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x53, + 0x45, 0x52, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, + 0x53, 0x45, 0x52, 0x54, 0x5f, 0x4c, 0x4f, 0x47, 0x53, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x50, + 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x81, 0x01, 0x0a, 0x1e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4f, 0x4e, 0x4e, + 0x45, 0x43, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x11, 0x0a, + 0x0d, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, + 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x02, 0x12, 0x1a, 0x0a, + 0x16, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x4e, 0x4f, + 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x03, 0x2a, 0x76, 0x0a, 0x27, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x16, + 0x0a, 0x12, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, + 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, + 0x02, 0x2a, 0x8d, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x52, 0x4f, 0x43, + 0x45, 0x53, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, + 0x10, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, + 0x53, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x12, 0x0a, + 0x0e, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x5a, 0x4f, 0x4d, 0x42, 0x49, 0x45, 0x10, + 0x05, 0x32, 0xd9, 0x03, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x56, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x21, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x52, 0x0a, 0x07, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x54, 0x0a, + 0x09, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x10, 0x53, - 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x28, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, - 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, + 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, + 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -498,35 +1002,46 @@ func file_services_task_service_proto_rawDescGZIP() []byte { return file_services_task_service_proto_rawDescData } -var file_services_task_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_services_task_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_services_task_service_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_services_task_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_services_task_service_proto_goTypes = []any{ - (TaskServiceSubscribeCode)(0), // 0: grpc.TaskServiceSubscribeCode - (TaskServiceConnectCode)(0), // 1: grpc.TaskServiceConnectCode - (*TaskServiceSubscribeRequest)(nil), // 2: grpc.TaskServiceSubscribeRequest - (*TaskServiceSubscribeResponse)(nil), // 3: grpc.TaskServiceSubscribeResponse - (*TaskServiceConnectRequest)(nil), // 4: grpc.TaskServiceConnectRequest - (*TaskServiceFetchTaskRequest)(nil), // 5: grpc.TaskServiceFetchTaskRequest - (*TaskServiceFetchTaskResponse)(nil), // 6: grpc.TaskServiceFetchTaskResponse - (*TaskServiceSendNotificationRequest)(nil), // 7: grpc.TaskServiceSendNotificationRequest - (*Response)(nil), // 8: grpc.Response + (TaskServiceSubscribeCode)(0), // 0: grpc.TaskServiceSubscribeCode + (TaskServiceConnectCode)(0), // 1: grpc.TaskServiceConnectCode + (TaskServiceConnectResponseCode)(0), // 2: grpc.TaskServiceConnectResponseCode + (TaskServiceSendNotificationResponseCode)(0), // 3: grpc.TaskServiceSendNotificationResponseCode + (ProcessStatus)(0), // 4: grpc.ProcessStatus + (*TaskServiceSubscribeRequest)(nil), // 5: grpc.TaskServiceSubscribeRequest + (*TaskServiceSubscribeResponse)(nil), // 6: grpc.TaskServiceSubscribeResponse + (*TaskServiceConnectRequest)(nil), // 7: grpc.TaskServiceConnectRequest + (*TaskServiceConnectResponse)(nil), // 8: grpc.TaskServiceConnectResponse + (*TaskServiceFetchTaskRequest)(nil), // 9: grpc.TaskServiceFetchTaskRequest + (*TaskServiceFetchTaskResponse)(nil), // 10: grpc.TaskServiceFetchTaskResponse + (*TaskServiceSendNotificationRequest)(nil), // 11: grpc.TaskServiceSendNotificationRequest + (*TaskServiceSendNotificationResponse)(nil), // 12: grpc.TaskServiceSendNotificationResponse + (*TaskServiceCheckProcessRequest)(nil), // 13: grpc.TaskServiceCheckProcessRequest + (*TaskServiceCheckProcessResponse)(nil), // 14: grpc.TaskServiceCheckProcessResponse } var file_services_task_service_proto_depIdxs = []int32{ - 0, // 0: grpc.TaskServiceSubscribeResponse.code:type_name -> grpc.TaskServiceSubscribeCode - 1, // 1: grpc.TaskServiceConnectRequest.code:type_name -> grpc.TaskServiceConnectCode - 2, // 2: grpc.TaskService.Subscribe:input_type -> grpc.TaskServiceSubscribeRequest - 4, // 3: grpc.TaskService.Connect:input_type -> grpc.TaskServiceConnectRequest - 5, // 4: grpc.TaskService.FetchTask:input_type -> grpc.TaskServiceFetchTaskRequest - 7, // 5: grpc.TaskService.SendNotification:input_type -> grpc.TaskServiceSendNotificationRequest - 3, // 6: grpc.TaskService.Subscribe:output_type -> grpc.TaskServiceSubscribeResponse - 8, // 7: grpc.TaskService.Connect:output_type -> grpc.Response - 6, // 8: grpc.TaskService.FetchTask:output_type -> grpc.TaskServiceFetchTaskResponse - 8, // 9: grpc.TaskService.SendNotification:output_type -> grpc.Response - 6, // [6:10] is the sub-list for method output_type - 2, // [2:6] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 0, // 0: grpc.TaskServiceSubscribeResponse.code:type_name -> grpc.TaskServiceSubscribeCode + 1, // 1: grpc.TaskServiceConnectRequest.code:type_name -> grpc.TaskServiceConnectCode + 2, // 2: grpc.TaskServiceConnectResponse.code:type_name -> grpc.TaskServiceConnectResponseCode + 3, // 3: grpc.TaskServiceSendNotificationResponse.code:type_name -> grpc.TaskServiceSendNotificationResponseCode + 4, // 4: grpc.TaskServiceCheckProcessResponse.status:type_name -> grpc.ProcessStatus + 5, // 5: grpc.TaskService.Subscribe:input_type -> grpc.TaskServiceSubscribeRequest + 7, // 6: grpc.TaskService.Connect:input_type -> grpc.TaskServiceConnectRequest + 9, // 7: grpc.TaskService.FetchTask:input_type -> grpc.TaskServiceFetchTaskRequest + 11, // 8: grpc.TaskService.SendNotification:input_type -> grpc.TaskServiceSendNotificationRequest + 13, // 9: grpc.TaskService.CheckProcess:input_type -> grpc.TaskServiceCheckProcessRequest + 6, // 10: grpc.TaskService.Subscribe:output_type -> grpc.TaskServiceSubscribeResponse + 8, // 11: grpc.TaskService.Connect:output_type -> grpc.TaskServiceConnectResponse + 10, // 12: grpc.TaskService.FetchTask:output_type -> grpc.TaskServiceFetchTaskResponse + 12, // 13: grpc.TaskService.SendNotification:output_type -> grpc.TaskServiceSendNotificationResponse + 14, // 14: grpc.TaskService.CheckProcess:output_type -> grpc.TaskServiceCheckProcessResponse + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_services_task_service_proto_init() } @@ -534,14 +1049,135 @@ func file_services_task_service_proto_init() { if File_services_task_service_proto != nil { return } - file_entity_response_proto_init() + if !protoimpl.UnsafeEnabled { + file_services_task_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceSubscribeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_task_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceSubscribeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_task_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceConnectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_task_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceConnectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_task_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceFetchTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_task_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceFetchTaskResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_task_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceSendNotificationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_task_service_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceSendNotificationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_task_service_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceCheckProcessRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_task_service_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*TaskServiceCheckProcessResponse); 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_services_task_service_proto_rawDesc, - NumEnums: 2, - NumMessages: 6, + NumEnums: 5, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/grpc/task_service_grpc.pb.go b/grpc/task_service_grpc.pb.go index cdcb7c87..ed4e6553 100644 --- a/grpc/task_service_grpc.pb.go +++ b/grpc/task_service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.2 +// - protoc-gen-go-grpc v1.4.0 +// - protoc v5.27.2 // source: services/task_service.proto package grpc @@ -15,24 +15,26 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( TaskService_Subscribe_FullMethodName = "/grpc.TaskService/Subscribe" TaskService_Connect_FullMethodName = "/grpc.TaskService/Connect" TaskService_FetchTask_FullMethodName = "/grpc.TaskService/FetchTask" TaskService_SendNotification_FullMethodName = "/grpc.TaskService/SendNotification" + TaskService_CheckProcess_FullMethodName = "/grpc.TaskService/CheckProcess" ) // TaskServiceClient is the client API for TaskService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type TaskServiceClient interface { - Subscribe(ctx context.Context, in *TaskServiceSubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TaskServiceSubscribeResponse], error) - Connect(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[TaskServiceConnectRequest, Response], error) + Subscribe(ctx context.Context, in *TaskServiceSubscribeRequest, opts ...grpc.CallOption) (TaskService_SubscribeClient, error) + Connect(ctx context.Context, opts ...grpc.CallOption) (TaskService_ConnectClient, error) FetchTask(ctx context.Context, in *TaskServiceFetchTaskRequest, opts ...grpc.CallOption) (*TaskServiceFetchTaskResponse, error) - SendNotification(ctx context.Context, in *TaskServiceSendNotificationRequest, opts ...grpc.CallOption) (*Response, error) + SendNotification(ctx context.Context, in *TaskServiceSendNotificationRequest, opts ...grpc.CallOption) (*TaskServiceSendNotificationResponse, error) + CheckProcess(ctx context.Context, in *TaskServiceCheckProcessRequest, opts ...grpc.CallOption) (*TaskServiceCheckProcessResponse, error) } type taskServiceClient struct { @@ -43,13 +45,13 @@ func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient { return &taskServiceClient{cc} } -func (c *taskServiceClient) Subscribe(ctx context.Context, in *TaskServiceSubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TaskServiceSubscribeResponse], error) { +func (c *taskServiceClient) Subscribe(ctx context.Context, in *TaskServiceSubscribeRequest, opts ...grpc.CallOption) (TaskService_SubscribeClient, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &TaskService_ServiceDesc.Streams[0], TaskService_Subscribe_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[TaskServiceSubscribeRequest, TaskServiceSubscribeResponse]{ClientStream: stream} + x := &taskServiceSubscribeClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -59,21 +61,54 @@ func (c *taskServiceClient) Subscribe(ctx context.Context, in *TaskServiceSubscr return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type TaskService_SubscribeClient = grpc.ServerStreamingClient[TaskServiceSubscribeResponse] +type TaskService_SubscribeClient interface { + Recv() (*TaskServiceSubscribeResponse, error) + grpc.ClientStream +} -func (c *taskServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[TaskServiceConnectRequest, Response], error) { +type taskServiceSubscribeClient struct { + grpc.ClientStream +} + +func (x *taskServiceSubscribeClient) Recv() (*TaskServiceSubscribeResponse, error) { + m := new(TaskServiceSubscribeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *taskServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (TaskService_ConnectClient, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &TaskService_ServiceDesc.Streams[1], TaskService_Connect_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[TaskServiceConnectRequest, Response]{ClientStream: stream} + x := &taskServiceConnectClient{ClientStream: stream} return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type TaskService_ConnectClient = grpc.ClientStreamingClient[TaskServiceConnectRequest, Response] +type TaskService_ConnectClient interface { + Send(*TaskServiceConnectRequest) error + Recv() (*TaskServiceConnectResponse, error) + grpc.ClientStream +} + +type taskServiceConnectClient struct { + grpc.ClientStream +} + +func (x *taskServiceConnectClient) Send(m *TaskServiceConnectRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *taskServiceConnectClient) Recv() (*TaskServiceConnectResponse, error) { + m := new(TaskServiceConnectResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *taskServiceClient) FetchTask(ctx context.Context, in *TaskServiceFetchTaskRequest, opts ...grpc.CallOption) (*TaskServiceFetchTaskResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) @@ -85,9 +120,9 @@ func (c *taskServiceClient) FetchTask(ctx context.Context, in *TaskServiceFetchT return out, nil } -func (c *taskServiceClient) SendNotification(ctx context.Context, in *TaskServiceSendNotificationRequest, opts ...grpc.CallOption) (*Response, error) { +func (c *taskServiceClient) SendNotification(ctx context.Context, in *TaskServiceSendNotificationRequest, opts ...grpc.CallOption) (*TaskServiceSendNotificationResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(Response) + out := new(TaskServiceSendNotificationResponse) err := c.cc.Invoke(ctx, TaskService_SendNotification_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -95,38 +130,48 @@ func (c *taskServiceClient) SendNotification(ctx context.Context, in *TaskServic return out, nil } +func (c *taskServiceClient) CheckProcess(ctx context.Context, in *TaskServiceCheckProcessRequest, opts ...grpc.CallOption) (*TaskServiceCheckProcessResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TaskServiceCheckProcessResponse) + err := c.cc.Invoke(ctx, TaskService_CheckProcess_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // TaskServiceServer is the server API for TaskService service. // All implementations must embed UnimplementedTaskServiceServer -// for forward compatibility. +// for forward compatibility type TaskServiceServer interface { - Subscribe(*TaskServiceSubscribeRequest, grpc.ServerStreamingServer[TaskServiceSubscribeResponse]) error - Connect(grpc.ClientStreamingServer[TaskServiceConnectRequest, Response]) error + Subscribe(*TaskServiceSubscribeRequest, TaskService_SubscribeServer) error + Connect(TaskService_ConnectServer) error FetchTask(context.Context, *TaskServiceFetchTaskRequest) (*TaskServiceFetchTaskResponse, error) - SendNotification(context.Context, *TaskServiceSendNotificationRequest) (*Response, error) + SendNotification(context.Context, *TaskServiceSendNotificationRequest) (*TaskServiceSendNotificationResponse, error) + CheckProcess(context.Context, *TaskServiceCheckProcessRequest) (*TaskServiceCheckProcessResponse, error) mustEmbedUnimplementedTaskServiceServer() } -// UnimplementedTaskServiceServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedTaskServiceServer struct{} +// UnimplementedTaskServiceServer must be embedded to have forward compatible implementations. +type UnimplementedTaskServiceServer struct { +} -func (UnimplementedTaskServiceServer) Subscribe(*TaskServiceSubscribeRequest, grpc.ServerStreamingServer[TaskServiceSubscribeResponse]) error { +func (UnimplementedTaskServiceServer) Subscribe(*TaskServiceSubscribeRequest, TaskService_SubscribeServer) error { return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } -func (UnimplementedTaskServiceServer) Connect(grpc.ClientStreamingServer[TaskServiceConnectRequest, Response]) error { +func (UnimplementedTaskServiceServer) Connect(TaskService_ConnectServer) error { return status.Errorf(codes.Unimplemented, "method Connect not implemented") } func (UnimplementedTaskServiceServer) FetchTask(context.Context, *TaskServiceFetchTaskRequest) (*TaskServiceFetchTaskResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FetchTask not implemented") } -func (UnimplementedTaskServiceServer) SendNotification(context.Context, *TaskServiceSendNotificationRequest) (*Response, error) { +func (UnimplementedTaskServiceServer) SendNotification(context.Context, *TaskServiceSendNotificationRequest) (*TaskServiceSendNotificationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendNotification not implemented") } +func (UnimplementedTaskServiceServer) CheckProcess(context.Context, *TaskServiceCheckProcessRequest) (*TaskServiceCheckProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckProcess not implemented") +} func (UnimplementedTaskServiceServer) mustEmbedUnimplementedTaskServiceServer() {} -func (UnimplementedTaskServiceServer) testEmbeddedByValue() {} // UnsafeTaskServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TaskServiceServer will @@ -136,13 +181,6 @@ type UnsafeTaskServiceServer interface { } func RegisterTaskServiceServer(s grpc.ServiceRegistrar, srv TaskServiceServer) { - // If the following call pancis, it indicates UnimplementedTaskServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&TaskService_ServiceDesc, srv) } @@ -151,18 +189,47 @@ func _TaskService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) e if err := stream.RecvMsg(m); err != nil { return err } - return srv.(TaskServiceServer).Subscribe(m, &grpc.GenericServerStream[TaskServiceSubscribeRequest, TaskServiceSubscribeResponse]{ServerStream: stream}) + return srv.(TaskServiceServer).Subscribe(m, &taskServiceSubscribeServer{ServerStream: stream}) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type TaskService_SubscribeServer = grpc.ServerStreamingServer[TaskServiceSubscribeResponse] +type TaskService_SubscribeServer interface { + Send(*TaskServiceSubscribeResponse) error + grpc.ServerStream +} + +type taskServiceSubscribeServer struct { + grpc.ServerStream +} + +func (x *taskServiceSubscribeServer) Send(m *TaskServiceSubscribeResponse) error { + return x.ServerStream.SendMsg(m) +} func _TaskService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(TaskServiceServer).Connect(&grpc.GenericServerStream[TaskServiceConnectRequest, Response]{ServerStream: stream}) + return srv.(TaskServiceServer).Connect(&taskServiceConnectServer{ServerStream: stream}) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type TaskService_ConnectServer = grpc.ClientStreamingServer[TaskServiceConnectRequest, Response] +type TaskService_ConnectServer interface { + Send(*TaskServiceConnectResponse) error + Recv() (*TaskServiceConnectRequest, error) + grpc.ServerStream +} + +type taskServiceConnectServer struct { + grpc.ServerStream +} + +func (x *taskServiceConnectServer) Send(m *TaskServiceConnectResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *taskServiceConnectServer) Recv() (*TaskServiceConnectRequest, error) { + m := new(TaskServiceConnectRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func _TaskService_FetchTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TaskServiceFetchTaskRequest) @@ -200,6 +267,24 @@ func _TaskService_SendNotification_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _TaskService_CheckProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TaskServiceCheckProcessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).CheckProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_CheckProcess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).CheckProcess(ctx, req.(*TaskServiceCheckProcessRequest)) + } + return interceptor(ctx, in, info, handler) +} + // TaskService_ServiceDesc is the grpc.ServiceDesc for TaskService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -215,6 +300,10 @@ var TaskService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SendNotification", Handler: _TaskService_SendNotification_Handler, }, + { + MethodName: "CheckProcess", + Handler: _TaskService_CheckProcess_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -225,6 +314,7 @@ var TaskService_ServiceDesc = grpc.ServiceDesc{ { StreamName: "Connect", Handler: _TaskService_Connect_Handler, + ServerStreams: true, ClientStreams: true, }, },