diff --git a/pkg/reporterconfigs/global_setting.go b/pkg/reporterconfigs/global_setting.go index a5c2b37..a97b3cf 100644 --- a/pkg/reporterconfigs/global_setting.go +++ b/pkg/reporterconfigs/global_setting.go @@ -4,5 +4,12 @@ package reporterconfigs // GlobalSetting 全局设置 type GlobalSetting struct { - + MinNotifyConnectivity float64 `json:"minNotifyConnectivity"` // 需要通知的最小连通值 + NotifyWebHookURL string `json:"notifyWebHookURL"` // WebHook通知地址 +} + +func DefaultGlobalSetting() *GlobalSetting { + return &GlobalSetting{ + MinNotifyConnectivity: 100, + } } diff --git a/pkg/rpc/pb/service_report_node.pb.go b/pkg/rpc/pb/service_report_node.pb.go index d76e985..f0c33e4 100644 --- a/pkg/rpc/pb/service_report_node.pb.go +++ b/pkg/rpc/pb/service_report_node.pb.go @@ -1163,6 +1163,140 @@ func (x *ListReportNodeTasksResponse) GetIpAddrReportTasks() []*IPAddrReportTask return nil } +// 修改全局设置 +type UpdateReportNodeGlobalSetting struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SettingJSON []byte `protobuf:"bytes,1,opt,name=settingJSON,proto3" json:"settingJSON,omitempty"` +} + +func (x *UpdateReportNodeGlobalSetting) Reset() { + *x = UpdateReportNodeGlobalSetting{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReportNodeGlobalSetting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReportNodeGlobalSetting) ProtoMessage() {} + +func (x *UpdateReportNodeGlobalSetting) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateReportNodeGlobalSetting.ProtoReflect.Descriptor instead. +func (*UpdateReportNodeGlobalSetting) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{20} +} + +func (x *UpdateReportNodeGlobalSetting) GetSettingJSON() []byte { + if x != nil { + return x.SettingJSON + } + return nil +} + +// 读取全局设置 +type ReadReportNodeGlobalSettingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReadReportNodeGlobalSettingRequest) Reset() { + *x = ReadReportNodeGlobalSettingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadReportNodeGlobalSettingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadReportNodeGlobalSettingRequest) ProtoMessage() {} + +func (x *ReadReportNodeGlobalSettingRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[21] + 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 ReadReportNodeGlobalSettingRequest.ProtoReflect.Descriptor instead. +func (*ReadReportNodeGlobalSettingRequest) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{21} +} + +type ReadReportNodeGlobalSettingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SettingJSON []byte `protobuf:"bytes,1,opt,name=settingJSON,proto3" json:"settingJSON,omitempty"` +} + +func (x *ReadReportNodeGlobalSettingResponse) Reset() { + *x = ReadReportNodeGlobalSettingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadReportNodeGlobalSettingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadReportNodeGlobalSettingResponse) ProtoMessage() {} + +func (x *ReadReportNodeGlobalSettingResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[22] + 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 ReadReportNodeGlobalSettingResponse.ProtoReflect.Descriptor instead. +func (*ReadReportNodeGlobalSettingResponse) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{22} +} + +func (x *ReadReportNodeGlobalSettingResponse) GetSettingJSON() []byte { + if x != nil { + return x.SettingJSON + } + return nil +} + var File_service_report_node_proto protoreflect.FileDescriptor var file_service_report_node_proto_rawDesc = []byte{ @@ -1298,80 +1432,103 @@ var file_service_report_node_proto_rawDesc = []byte{ 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x11, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x32, 0x82, 0x09, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, - 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1b, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, - 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, - 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x1a, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 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, 0x5f, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x41, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x24, 0x0a, 0x22, 0x52, 0x65, 0x61, 0x64, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x47, + 0x0a, 0x23, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x32, 0xc6, 0x0a, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, + 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3f, 0x0a, + 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, + 0x0a, 0x1a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x70, + 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 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, 0x5f, 0x0a, 0x16, 0x6c, 0x69, 0x73, + 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x66, 0x69, + 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 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, 0x6e, 0x0a, 0x1b, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, - 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1e, 0x2e, 0x70, - 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, - 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, - 0x1b, 0x66, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x70, - 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, - 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x54, 0x61, 0x73, 0x6b, 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, 0x56, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1b, 0x2e, 0x70, + 0x62, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x16, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 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, 0x6e, 0x0a, 0x1b, 0x66, 0x69, 0x6e, 0x64, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x64, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1e, + 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6e, 0x0a, 0x1b, 0x66, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, + 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, + 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x53, 0x0a, 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 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, 0x56, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x1d, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, + 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x6e, 0x0a, 0x1b, 0x72, 0x65, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, + 0x26, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1386,7 +1543,7 @@ func file_service_report_node_proto_rawDescGZIP() []byte { return file_service_report_node_proto_rawDescData } -var file_service_report_node_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_service_report_node_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_service_report_node_proto_goTypes = []interface{}{ (*CreateReportNodeRequest)(nil), // 0: pb.CreateReportNodeRequest (*CreateReportNodeResponse)(nil), // 1: pb.CreateReportNodeResponse @@ -1408,15 +1565,18 @@ var file_service_report_node_proto_goTypes = []interface{}{ (*CountAllReportNodeTasksRequest)(nil), // 17: pb.CountAllReportNodeTasksRequest (*ListReportNodeTasksRequest)(nil), // 18: pb.ListReportNodeTasksRequest (*ListReportNodeTasksResponse)(nil), // 19: pb.ListReportNodeTasksResponse - (*ReportNode)(nil), // 20: pb.ReportNode - (*IPAddrReportTask)(nil), // 21: pb.IPAddrReportTask - (*RPCSuccess)(nil), // 22: pb.RPCSuccess - (*RPCCountResponse)(nil), // 23: pb.RPCCountResponse + (*UpdateReportNodeGlobalSetting)(nil), // 20: pb.UpdateReportNodeGlobalSetting + (*ReadReportNodeGlobalSettingRequest)(nil), // 21: pb.ReadReportNodeGlobalSettingRequest + (*ReadReportNodeGlobalSettingResponse)(nil), // 22: pb.ReadReportNodeGlobalSettingResponse + (*ReportNode)(nil), // 23: pb.ReportNode + (*IPAddrReportTask)(nil), // 24: pb.IPAddrReportTask + (*RPCSuccess)(nil), // 25: pb.RPCSuccess + (*RPCCountResponse)(nil), // 26: pb.RPCCountResponse } var file_service_report_node_proto_depIdxs = []int32{ - 20, // 0: pb.ListEnabledReportNodesResponse.reportNodes:type_name -> pb.ReportNode - 20, // 1: pb.FindEnabledReportNodeResponse.reportNode:type_name -> pb.ReportNode - 21, // 2: pb.ListReportNodeTasksResponse.ipAddrReportTasks:type_name -> pb.IPAddrReportTask + 23, // 0: pb.ListEnabledReportNodesResponse.reportNodes:type_name -> pb.ReportNode + 23, // 1: pb.FindEnabledReportNodeResponse.reportNode:type_name -> pb.ReportNode + 24, // 2: pb.ListReportNodeTasksResponse.ipAddrReportTasks:type_name -> pb.IPAddrReportTask 0, // 3: pb.ReportNodeService.createReportNode:input_type -> pb.CreateReportNodeRequest 2, // 4: pb.ReportNodeService.deleteReportNode:input_type -> pb.DeleteReportNodeRequest 3, // 5: pb.ReportNodeService.updateReportNode:input_type -> pb.UpdateReportNodeRequest @@ -1430,21 +1590,25 @@ var file_service_report_node_proto_depIdxs = []int32{ 15, // 13: pb.ReportNodeService.findLatestReportNodeVersion:input_type -> pb.FindLatestReportNodeVersionRequest 17, // 14: pb.ReportNodeService.countAllReportNodeTasks:input_type -> pb.CountAllReportNodeTasksRequest 18, // 15: pb.ReportNodeService.listReportNodeTasks:input_type -> pb.ListReportNodeTasksRequest - 1, // 16: pb.ReportNodeService.createReportNode:output_type -> pb.CreateReportNodeResponse - 22, // 17: pb.ReportNodeService.deleteReportNode:output_type -> pb.RPCSuccess - 22, // 18: pb.ReportNodeService.updateReportNode:output_type -> pb.RPCSuccess - 23, // 19: pb.ReportNodeService.countAllEnabledReportNodes:output_type -> pb.RPCCountResponse - 6, // 20: pb.ReportNodeService.listEnabledReportNodes:output_type -> pb.ListEnabledReportNodesResponse - 8, // 21: pb.ReportNodeService.findEnabledReportNode:output_type -> pb.FindEnabledReportNodeResponse - 9, // 22: pb.ReportNodeService.reportNodeStream:output_type -> pb.ReportNodeStreamMessage - 22, // 23: pb.ReportNodeService.updateReportNodeStatus:output_type -> pb.RPCSuccess - 12, // 24: pb.ReportNodeService.findCurrentReportNodeConfig:output_type -> pb.FindCurrentReportNodeConfigResponse - 14, // 25: pb.ReportNodeService.findReportNodeTasks:output_type -> pb.FindReportNodeTasksResponse - 16, // 26: pb.ReportNodeService.findLatestReportNodeVersion:output_type -> pb.FindLatestReportNodeVersionResponse - 23, // 27: pb.ReportNodeService.countAllReportNodeTasks:output_type -> pb.RPCCountResponse - 19, // 28: pb.ReportNodeService.listReportNodeTasks:output_type -> pb.ListReportNodeTasksResponse - 16, // [16:29] is the sub-list for method output_type - 3, // [3:16] is the sub-list for method input_type + 20, // 16: pb.ReportNodeService.updateReportNodeGlobalSetting:input_type -> pb.UpdateReportNodeGlobalSetting + 21, // 17: pb.ReportNodeService.readReportNodeGlobalSetting:input_type -> pb.ReadReportNodeGlobalSettingRequest + 1, // 18: pb.ReportNodeService.createReportNode:output_type -> pb.CreateReportNodeResponse + 25, // 19: pb.ReportNodeService.deleteReportNode:output_type -> pb.RPCSuccess + 25, // 20: pb.ReportNodeService.updateReportNode:output_type -> pb.RPCSuccess + 26, // 21: pb.ReportNodeService.countAllEnabledReportNodes:output_type -> pb.RPCCountResponse + 6, // 22: pb.ReportNodeService.listEnabledReportNodes:output_type -> pb.ListEnabledReportNodesResponse + 8, // 23: pb.ReportNodeService.findEnabledReportNode:output_type -> pb.FindEnabledReportNodeResponse + 9, // 24: pb.ReportNodeService.reportNodeStream:output_type -> pb.ReportNodeStreamMessage + 25, // 25: pb.ReportNodeService.updateReportNodeStatus:output_type -> pb.RPCSuccess + 12, // 26: pb.ReportNodeService.findCurrentReportNodeConfig:output_type -> pb.FindCurrentReportNodeConfigResponse + 14, // 27: pb.ReportNodeService.findReportNodeTasks:output_type -> pb.FindReportNodeTasksResponse + 16, // 28: pb.ReportNodeService.findLatestReportNodeVersion:output_type -> pb.FindLatestReportNodeVersionResponse + 26, // 29: pb.ReportNodeService.countAllReportNodeTasks:output_type -> pb.RPCCountResponse + 19, // 30: pb.ReportNodeService.listReportNodeTasks:output_type -> pb.ListReportNodeTasksResponse + 25, // 31: pb.ReportNodeService.updateReportNodeGlobalSetting:output_type -> pb.RPCSuccess + 22, // 32: pb.ReportNodeService.readReportNodeGlobalSetting:output_type -> pb.ReadReportNodeGlobalSettingResponse + 18, // [18:33] is the sub-list for method output_type + 3, // [3:18] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name @@ -1699,6 +1863,42 @@ func file_service_report_node_proto_init() { return nil } } + file_service_report_node_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReportNodeGlobalSetting); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_report_node_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadReportNodeGlobalSettingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_report_node_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadReportNodeGlobalSettingResponse); 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{ @@ -1706,7 +1906,7 @@ func file_service_report_node_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_report_node_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 23, NumExtensions: 0, NumServices: 1, }, @@ -1758,6 +1958,10 @@ type ReportNodeServiceClient interface { CountAllReportNodeTasks(ctx context.Context, in *CountAllReportNodeTasksRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) // 列出单页任务 ListReportNodeTasks(ctx context.Context, in *ListReportNodeTasksRequest, opts ...grpc.CallOption) (*ListReportNodeTasksResponse, error) + // 修改全局设置 + UpdateReportNodeGlobalSetting(ctx context.Context, in *UpdateReportNodeGlobalSetting, opts ...grpc.CallOption) (*RPCSuccess, error) + // 读取全局设置 + ReadReportNodeGlobalSetting(ctx context.Context, in *ReadReportNodeGlobalSettingRequest, opts ...grpc.CallOption) (*ReadReportNodeGlobalSettingResponse, error) } type reportNodeServiceClient struct { @@ -1907,6 +2111,24 @@ func (c *reportNodeServiceClient) ListReportNodeTasks(ctx context.Context, in *L return out, nil } +func (c *reportNodeServiceClient) UpdateReportNodeGlobalSetting(ctx context.Context, in *UpdateReportNodeGlobalSetting, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/updateReportNodeGlobalSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportNodeServiceClient) ReadReportNodeGlobalSetting(ctx context.Context, in *ReadReportNodeGlobalSettingRequest, opts ...grpc.CallOption) (*ReadReportNodeGlobalSettingResponse, error) { + out := new(ReadReportNodeGlobalSettingResponse) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/readReportNodeGlobalSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ReportNodeServiceServer is the server API for ReportNodeService service. type ReportNodeServiceServer interface { // 添加终端 @@ -1935,6 +2157,10 @@ type ReportNodeServiceServer interface { CountAllReportNodeTasks(context.Context, *CountAllReportNodeTasksRequest) (*RPCCountResponse, error) // 列出单页任务 ListReportNodeTasks(context.Context, *ListReportNodeTasksRequest) (*ListReportNodeTasksResponse, error) + // 修改全局设置 + UpdateReportNodeGlobalSetting(context.Context, *UpdateReportNodeGlobalSetting) (*RPCSuccess, error) + // 读取全局设置 + ReadReportNodeGlobalSetting(context.Context, *ReadReportNodeGlobalSettingRequest) (*ReadReportNodeGlobalSettingResponse, error) } // UnimplementedReportNodeServiceServer can be embedded to have forward compatible implementations. @@ -1980,6 +2206,12 @@ func (*UnimplementedReportNodeServiceServer) CountAllReportNodeTasks(context.Con func (*UnimplementedReportNodeServiceServer) ListReportNodeTasks(context.Context, *ListReportNodeTasksRequest) (*ListReportNodeTasksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListReportNodeTasks not implemented") } +func (*UnimplementedReportNodeServiceServer) UpdateReportNodeGlobalSetting(context.Context, *UpdateReportNodeGlobalSetting) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateReportNodeGlobalSetting not implemented") +} +func (*UnimplementedReportNodeServiceServer) ReadReportNodeGlobalSetting(context.Context, *ReadReportNodeGlobalSettingRequest) (*ReadReportNodeGlobalSettingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadReportNodeGlobalSetting not implemented") +} func RegisterReportNodeServiceServer(s *grpc.Server, srv ReportNodeServiceServer) { s.RegisterService(&_ReportNodeService_serviceDesc, srv) @@ -2227,6 +2459,42 @@ func _ReportNodeService_ListReportNodeTasks_Handler(srv interface{}, ctx context return interceptor(ctx, in, info, handler) } +func _ReportNodeService_UpdateReportNodeGlobalSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReportNodeGlobalSetting) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).UpdateReportNodeGlobalSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/UpdateReportNodeGlobalSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).UpdateReportNodeGlobalSetting(ctx, req.(*UpdateReportNodeGlobalSetting)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportNodeService_ReadReportNodeGlobalSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadReportNodeGlobalSettingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).ReadReportNodeGlobalSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/ReadReportNodeGlobalSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).ReadReportNodeGlobalSetting(ctx, req.(*ReadReportNodeGlobalSettingRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _ReportNodeService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.ReportNodeService", HandlerType: (*ReportNodeServiceServer)(nil), @@ -2279,6 +2547,14 @@ var _ReportNodeService_serviceDesc = grpc.ServiceDesc{ MethodName: "listReportNodeTasks", Handler: _ReportNodeService_ListReportNodeTasks_Handler, }, + { + MethodName: "updateReportNodeGlobalSetting", + Handler: _ReportNodeService_UpdateReportNodeGlobalSetting_Handler, + }, + { + MethodName: "readReportNodeGlobalSetting", + Handler: _ReportNodeService_ReadReportNodeGlobalSetting_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/pkg/rpc/protos/service_report_node.proto b/pkg/rpc/protos/service_report_node.proto index 426ea56..e989763 100644 --- a/pkg/rpc/protos/service_report_node.proto +++ b/pkg/rpc/protos/service_report_node.proto @@ -47,6 +47,12 @@ service ReportNodeService { // 列出单页任务 rpc listReportNodeTasks(ListReportNodeTasksRequest) returns (ListReportNodeTasksResponse); + + // 修改全局设置 + rpc updateReportNodeGlobalSetting(UpdateReportNodeGlobalSetting) returns (RPCSuccess); + + // 读取全局设置 + rpc readReportNodeGlobalSetting(ReadReportNodeGlobalSettingRequest) returns (ReadReportNodeGlobalSettingResponse); } // 添加终端 @@ -167,4 +173,17 @@ message ListReportNodeTasksRequest { message ListReportNodeTasksResponse { repeated IPAddrReportTask ipAddrReportTasks = 1; +} + +// 修改全局设置 +message UpdateReportNodeGlobalSetting { + bytes settingJSON = 1; +} + +// 读取全局设置 +message ReadReportNodeGlobalSettingRequest { +} + +message ReadReportNodeGlobalSettingResponse { + bytes settingJSON = 1; } \ No newline at end of file diff --git a/pkg/systemconfigs/admin_ui_config.go b/pkg/systemconfigs/admin_ui_config.go index 6c0bf84..a281968 100644 --- a/pkg/systemconfigs/admin_ui_config.go +++ b/pkg/systemconfigs/admin_ui_config.go @@ -1,6 +1,6 @@ package systemconfigs -// 管理员界面相关配置 +// AdminUIConfig 管理员界面相关配置 type AdminUIConfig struct { ProductName string `json:"productName"` // 产品名 AdminSystemName string `json:"adminSystemName"` // 管理员系统名称 diff --git a/pkg/systemconfigs/consts.go b/pkg/systemconfigs/consts.go index b79348f..1da6fa9 100644 --- a/pkg/systemconfigs/consts.go +++ b/pkg/systemconfigs/consts.go @@ -12,4 +12,6 @@ const ( SettingCodeNSAccessLogSetting SettingCode = "nsAccessLogSetting" // NS相关全局配置 SettingCodeNSNodeMonitor SettingCode = "nsNodeMonitor" // 监控NS节点状态 + + SettingCodeReportNodeGlobalSetting SettingCode = "reportNodeGlobalSetting" // 区域监控节点全局配置 )