diff --git a/pkg/rpc/pb/service_node_log.pb.go b/pkg/rpc/pb/service_node_log.pb.go index da80be6..a54d634 100644 --- a/pkg/rpc/pb/service_node_log.pb.go +++ b/pkg/rpc/pb/service_node_log.pb.go @@ -132,6 +132,8 @@ type CountNodeLogsRequest struct { OriginId int64 `protobuf:"varint,8,opt,name=originId,proto3" json:"originId,omitempty"` IsUnread bool `protobuf:"varint,9,opt,name=isUnread,proto3" json:"isUnread,omitempty"` Tag string `protobuf:"bytes,10,opt,name=tag,proto3" json:"tag,omitempty"` + FixedState int32 `protobuf:"varint,12,opt,name=fixedState,proto3" json:"fixedState,omitempty"` + AllServers bool `protobuf:"varint,13,opt,name=allServers,proto3" json:"allServers,omitempty"` // 是否获取所有服务相关的日志 } func (x *CountNodeLogsRequest) Reset() { @@ -243,6 +245,20 @@ func (x *CountNodeLogsRequest) GetTag() string { return "" } +func (x *CountNodeLogsRequest) GetFixedState() int32 { + if x != nil { + return x.FixedState + } + return 0 +} + +func (x *CountNodeLogsRequest) GetAllServers() bool { + if x != nil { + return x.AllServers + } + return false +} + // 列出单页日志 type ListNodeLogsRequest struct { state protoimpl.MessageState @@ -498,6 +514,45 @@ func (x *FixNodeLogsRequest) GetNodeLogIds() []int64 { return nil } +// 设置所有日志为已修复 +type FixAllNodeLogsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FixAllNodeLogsRequest) Reset() { + *x = FixAllNodeLogsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_log_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FixAllNodeLogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FixAllNodeLogsRequest) ProtoMessage() {} + +func (x *FixAllNodeLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_node_log_proto_msgTypes[6] + 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 FixAllNodeLogsRequest.ProtoReflect.Descriptor instead. +func (*FixAllNodeLogsRequest) Descriptor() ([]byte, []int) { + return file_service_node_log_proto_rawDescGZIP(), []int{6} +} + // 计算未读的日志数量 type CountAllUnreadNodeLogsRequest struct { state protoimpl.MessageState @@ -508,7 +563,7 @@ type CountAllUnreadNodeLogsRequest struct { func (x *CountAllUnreadNodeLogsRequest) Reset() { *x = CountAllUnreadNodeLogsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_node_log_proto_msgTypes[6] + mi := &file_service_node_log_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -521,7 +576,7 @@ func (x *CountAllUnreadNodeLogsRequest) String() string { func (*CountAllUnreadNodeLogsRequest) ProtoMessage() {} func (x *CountAllUnreadNodeLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_node_log_proto_msgTypes[6] + mi := &file_service_node_log_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -534,7 +589,7 @@ func (x *CountAllUnreadNodeLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CountAllUnreadNodeLogsRequest.ProtoReflect.Descriptor instead. func (*CountAllUnreadNodeLogsRequest) Descriptor() ([]byte, []int) { - return file_service_node_log_proto_rawDescGZIP(), []int{6} + return file_service_node_log_proto_rawDescGZIP(), []int{7} } // 设置日志为已读 @@ -549,7 +604,7 @@ type UpdateNodeLogsReadRequest struct { func (x *UpdateNodeLogsReadRequest) Reset() { *x = UpdateNodeLogsReadRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_node_log_proto_msgTypes[7] + mi := &file_service_node_log_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -562,7 +617,7 @@ func (x *UpdateNodeLogsReadRequest) String() string { func (*UpdateNodeLogsReadRequest) ProtoMessage() {} func (x *UpdateNodeLogsReadRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_node_log_proto_msgTypes[7] + mi := &file_service_node_log_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -575,7 +630,7 @@ func (x *UpdateNodeLogsReadRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateNodeLogsReadRequest.ProtoReflect.Descriptor instead. func (*UpdateNodeLogsReadRequest) Descriptor() ([]byte, []int) { - return file_service_node_log_proto_rawDescGZIP(), []int{7} + return file_service_node_log_proto_rawDescGZIP(), []int{8} } func (x *UpdateNodeLogsReadRequest) GetNodeLogIds() []int64 { @@ -595,7 +650,7 @@ type UpdateAllNodeLogsReadRequest struct { func (x *UpdateAllNodeLogsReadRequest) Reset() { *x = UpdateAllNodeLogsReadRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_node_log_proto_msgTypes[8] + mi := &file_service_node_log_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -608,7 +663,7 @@ func (x *UpdateAllNodeLogsReadRequest) String() string { func (*UpdateAllNodeLogsReadRequest) ProtoMessage() {} func (x *UpdateAllNodeLogsReadRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_node_log_proto_msgTypes[8] + mi := &file_service_node_log_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -621,7 +676,7 @@ func (x *UpdateAllNodeLogsReadRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateAllNodeLogsReadRequest.ProtoReflect.Descriptor instead. func (*UpdateAllNodeLogsReadRequest) Descriptor() ([]byte, []int) { - return file_service_node_log_proto_rawDescGZIP(), []int{8} + return file_service_node_log_proto_rawDescGZIP(), []int{9} } var File_service_node_log_proto protoreflect.FileDescriptor @@ -638,7 +693,7 @@ var file_service_node_log_proto_rawDesc = []byte{ 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xae, 0x02, 0x0a, 0x14, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, + 0x22, 0xee, 0x02, 0x0a, 0x14, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, @@ -657,7 +712,11 @@ var file_service_node_log_proto_rawDesc = []byte{ 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, - 0x67, 0x22, 0x99, 0x03, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, + 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x73, 0x22, 0x99, 0x03, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, @@ -690,47 +749,53 @@ var file_service_node_log_proto_rawDesc = []byte{ 0x0a, 0x12, 0x46, 0x69, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, - 0x67, 0x49, 0x64, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, - 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x67, 0x49, 0x64, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x46, 0x69, 0x78, 0x41, 0x6c, 0x6c, 0x4e, 0x6f, + 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1f, 0x0a, + 0x1d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4e, + 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, + 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, + 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, + 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0xb4, 0x04, 0x0a, 0x0e, + 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, + 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, + 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x6c, 0x69, 0x73, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x66, + 0x69, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, + 0x46, 0x69, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x3b, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x41, 0x6c, 0x6c, 0x4e, 0x6f, 0x64, 0x65, + 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x78, 0x41, 0x6c, 0x6c, + 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x51, 0x0a, 0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x6e, 0x72, 0x65, 0x61, + 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, + 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, + 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x43, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x61, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x41, 0x6c, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x61, 0x64, + 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x49, - 0x64, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x4e, - 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x32, 0xf7, 0x03, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, - 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, - 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, - 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, - 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, - 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x41, 0x0a, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, - 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, - 0x73, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, - 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a, 0x16, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x4c, - 0x6f, 0x67, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, - 0x6c, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x12, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, - 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x49, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x4e, 0x6f, - 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, - 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, - 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -745,7 +810,7 @@ func file_service_node_log_proto_rawDescGZIP() []byte { return file_service_node_log_proto_rawDescData } -var file_service_node_log_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_service_node_log_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_service_node_log_proto_goTypes = []interface{}{ (*CreateNodeLogsRequest)(nil), // 0: pb.CreateNodeLogsRequest (*CreateNodeLogsResponse)(nil), // 1: pb.CreateNodeLogsResponse @@ -753,32 +818,35 @@ var file_service_node_log_proto_goTypes = []interface{}{ (*ListNodeLogsRequest)(nil), // 3: pb.ListNodeLogsRequest (*ListNodeLogsResponse)(nil), // 4: pb.ListNodeLogsResponse (*FixNodeLogsRequest)(nil), // 5: pb.FixNodeLogsRequest - (*CountAllUnreadNodeLogsRequest)(nil), // 6: pb.CountAllUnreadNodeLogsRequest - (*UpdateNodeLogsReadRequest)(nil), // 7: pb.UpdateNodeLogsReadRequest - (*UpdateAllNodeLogsReadRequest)(nil), // 8: pb.UpdateAllNodeLogsReadRequest - (*NodeLog)(nil), // 9: pb.NodeLog - (*RPCCountResponse)(nil), // 10: pb.RPCCountResponse - (*RPCSuccess)(nil), // 11: pb.RPCSuccess + (*FixAllNodeLogsRequest)(nil), // 6: pb.FixAllNodeLogsRequest + (*CountAllUnreadNodeLogsRequest)(nil), // 7: pb.CountAllUnreadNodeLogsRequest + (*UpdateNodeLogsReadRequest)(nil), // 8: pb.UpdateNodeLogsReadRequest + (*UpdateAllNodeLogsReadRequest)(nil), // 9: pb.UpdateAllNodeLogsReadRequest + (*NodeLog)(nil), // 10: pb.NodeLog + (*RPCCountResponse)(nil), // 11: pb.RPCCountResponse + (*RPCSuccess)(nil), // 12: pb.RPCSuccess } var file_service_node_log_proto_depIdxs = []int32{ - 9, // 0: pb.CreateNodeLogsRequest.nodeLogs:type_name -> pb.NodeLog - 9, // 1: pb.ListNodeLogsResponse.nodeLogs:type_name -> pb.NodeLog + 10, // 0: pb.CreateNodeLogsRequest.nodeLogs:type_name -> pb.NodeLog + 10, // 1: pb.ListNodeLogsResponse.nodeLogs:type_name -> pb.NodeLog 0, // 2: pb.NodeLogService.createNodeLogs:input_type -> pb.CreateNodeLogsRequest 2, // 3: pb.NodeLogService.countNodeLogs:input_type -> pb.CountNodeLogsRequest 3, // 4: pb.NodeLogService.listNodeLogs:input_type -> pb.ListNodeLogsRequest 5, // 5: pb.NodeLogService.fixNodeLogs:input_type -> pb.FixNodeLogsRequest - 6, // 6: pb.NodeLogService.countAllUnreadNodeLogs:input_type -> pb.CountAllUnreadNodeLogsRequest - 7, // 7: pb.NodeLogService.updateNodeLogsRead:input_type -> pb.UpdateNodeLogsReadRequest - 8, // 8: pb.NodeLogService.updateAllNodeLogsRead:input_type -> pb.UpdateAllNodeLogsReadRequest - 1, // 9: pb.NodeLogService.createNodeLogs:output_type -> pb.CreateNodeLogsResponse - 10, // 10: pb.NodeLogService.countNodeLogs:output_type -> pb.RPCCountResponse - 4, // 11: pb.NodeLogService.listNodeLogs:output_type -> pb.ListNodeLogsResponse - 11, // 12: pb.NodeLogService.fixNodeLogs:output_type -> pb.RPCSuccess - 10, // 13: pb.NodeLogService.countAllUnreadNodeLogs:output_type -> pb.RPCCountResponse - 11, // 14: pb.NodeLogService.updateNodeLogsRead:output_type -> pb.RPCSuccess - 11, // 15: pb.NodeLogService.updateAllNodeLogsRead:output_type -> pb.RPCSuccess - 9, // [9:16] is the sub-list for method output_type - 2, // [2:9] is the sub-list for method input_type + 6, // 6: pb.NodeLogService.fixAllNodeLogs:input_type -> pb.FixAllNodeLogsRequest + 7, // 7: pb.NodeLogService.countAllUnreadNodeLogs:input_type -> pb.CountAllUnreadNodeLogsRequest + 8, // 8: pb.NodeLogService.updateNodeLogsRead:input_type -> pb.UpdateNodeLogsReadRequest + 9, // 9: pb.NodeLogService.updateAllNodeLogsRead:input_type -> pb.UpdateAllNodeLogsReadRequest + 1, // 10: pb.NodeLogService.createNodeLogs:output_type -> pb.CreateNodeLogsResponse + 11, // 11: pb.NodeLogService.countNodeLogs:output_type -> pb.RPCCountResponse + 4, // 12: pb.NodeLogService.listNodeLogs:output_type -> pb.ListNodeLogsResponse + 12, // 13: pb.NodeLogService.fixNodeLogs:output_type -> pb.RPCSuccess + 12, // 14: pb.NodeLogService.fixAllNodeLogs:output_type -> pb.RPCSuccess + 11, // 15: pb.NodeLogService.countAllUnreadNodeLogs:output_type -> pb.RPCCountResponse + 12, // 16: pb.NodeLogService.updateNodeLogsRead:output_type -> pb.RPCSuccess + 12, // 17: pb.NodeLogService.updateAllNodeLogsRead:output_type -> pb.RPCSuccess + 10, // [10:18] is the sub-list for method output_type + 2, // [2:10] 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 @@ -865,7 +933,7 @@ func file_service_node_log_proto_init() { } } file_service_node_log_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CountAllUnreadNodeLogsRequest); i { + switch v := v.(*FixAllNodeLogsRequest); i { case 0: return &v.state case 1: @@ -877,7 +945,7 @@ func file_service_node_log_proto_init() { } } file_service_node_log_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateNodeLogsReadRequest); i { + switch v := v.(*CountAllUnreadNodeLogsRequest); i { case 0: return &v.state case 1: @@ -889,6 +957,18 @@ func file_service_node_log_proto_init() { } } file_service_node_log_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNodeLogsReadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_log_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateAllNodeLogsReadRequest); i { case 0: return &v.state @@ -907,7 +987,7 @@ func file_service_node_log_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_node_log_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, @@ -941,6 +1021,8 @@ type NodeLogServiceClient interface { ListNodeLogs(ctx context.Context, in *ListNodeLogsRequest, opts ...grpc.CallOption) (*ListNodeLogsResponse, error) // 设置日志为已修复 FixNodeLogs(ctx context.Context, in *FixNodeLogsRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 设置所有日志为已修复 + FixAllNodeLogs(ctx context.Context, in *FixAllNodeLogsRequest, opts ...grpc.CallOption) (*RPCSuccess, error) // 计算未读的日志数量 CountAllUnreadNodeLogs(ctx context.Context, in *CountAllUnreadNodeLogsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) // 设置日志为已读 @@ -993,6 +1075,15 @@ func (c *nodeLogServiceClient) FixNodeLogs(ctx context.Context, in *FixNodeLogsR return out, nil } +func (c *nodeLogServiceClient) FixAllNodeLogs(ctx context.Context, in *FixAllNodeLogsRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.NodeLogService/fixAllNodeLogs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *nodeLogServiceClient) CountAllUnreadNodeLogs(ctx context.Context, in *CountAllUnreadNodeLogsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { out := new(RPCCountResponse) err := c.cc.Invoke(ctx, "/pb.NodeLogService/countAllUnreadNodeLogs", in, out, opts...) @@ -1030,6 +1121,8 @@ type NodeLogServiceServer interface { ListNodeLogs(context.Context, *ListNodeLogsRequest) (*ListNodeLogsResponse, error) // 设置日志为已修复 FixNodeLogs(context.Context, *FixNodeLogsRequest) (*RPCSuccess, error) + // 设置所有日志为已修复 + FixAllNodeLogs(context.Context, *FixAllNodeLogsRequest) (*RPCSuccess, error) // 计算未读的日志数量 CountAllUnreadNodeLogs(context.Context, *CountAllUnreadNodeLogsRequest) (*RPCCountResponse, error) // 设置日志为已读 @@ -1054,6 +1147,9 @@ func (*UnimplementedNodeLogServiceServer) ListNodeLogs(context.Context, *ListNod func (*UnimplementedNodeLogServiceServer) FixNodeLogs(context.Context, *FixNodeLogsRequest) (*RPCSuccess, error) { return nil, status.Errorf(codes.Unimplemented, "method FixNodeLogs not implemented") } +func (*UnimplementedNodeLogServiceServer) FixAllNodeLogs(context.Context, *FixAllNodeLogsRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method FixAllNodeLogs not implemented") +} func (*UnimplementedNodeLogServiceServer) CountAllUnreadNodeLogs(context.Context, *CountAllUnreadNodeLogsRequest) (*RPCCountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CountAllUnreadNodeLogs not implemented") } @@ -1140,6 +1236,24 @@ func _NodeLogService_FixNodeLogs_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _NodeLogService_FixAllNodeLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FixAllNodeLogsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeLogServiceServer).FixAllNodeLogs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NodeLogService/FixAllNodeLogs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeLogServiceServer).FixAllNodeLogs(ctx, req.(*FixAllNodeLogsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _NodeLogService_CountAllUnreadNodeLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CountAllUnreadNodeLogsRequest) if err := dec(in); err != nil { @@ -1214,6 +1328,10 @@ var _NodeLogService_serviceDesc = grpc.ServiceDesc{ MethodName: "fixNodeLogs", Handler: _NodeLogService_FixNodeLogs_Handler, }, + { + MethodName: "fixAllNodeLogs", + Handler: _NodeLogService_FixAllNodeLogs_Handler, + }, { MethodName: "countAllUnreadNodeLogs", Handler: _NodeLogService_CountAllUnreadNodeLogs_Handler, diff --git a/pkg/rpc/protos/service_node_log.proto b/pkg/rpc/protos/service_node_log.proto index da1b98a..049fbaf 100644 --- a/pkg/rpc/protos/service_node_log.proto +++ b/pkg/rpc/protos/service_node_log.proto @@ -20,6 +20,9 @@ service NodeLogService { // 设置日志为已修复 rpc fixNodeLogs (FixNodeLogsRequest) returns (RPCSuccess); + // 设置所有日志为已修复 + rpc fixAllNodeLogs (FixAllNodeLogsRequest) returns (RPCSuccess); + // 计算未读的日志数量 rpc countAllUnreadNodeLogs(CountAllUnreadNodeLogsRequest) returns (RPCCountResponse); @@ -52,6 +55,8 @@ message CountNodeLogsRequest { int64 originId = 8; bool isUnread = 9; string tag = 10; + int32 fixedState = 12; + bool allServers = 13; // 是否获取所有服务相关的日志 } // 列出单页日志 @@ -83,6 +88,11 @@ message FixNodeLogsRequest { repeated int64 nodeLogIds = 1; } +// 设置所有日志为已修复 +message FixAllNodeLogsRequest { + +} + // 计算未读的日志数量 message CountAllUnreadNodeLogsRequest { }