From 921493f49b7279c714a9f5fd9a3a59374cdc7385 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 5 Sep 2021 11:11:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=9F=BA=E6=9C=AC=E7=9A=84?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E7=9B=91=E6=8E=A7=E7=BB=88=E7=AB=AF=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/messageconfigs/ns_messages.go | 2 +- pkg/nodeconfigs/node_roles.go | 1 + pkg/reporterconfigs/messages.go | 23 + pkg/reporterconfigs/node_config.go | 11 + pkg/reporterconfigs/status.go | 16 + pkg/rpc/pb/model_report_node.pb.go | 233 +++ pkg/rpc/pb/service_ns_node.pb.go | 2 +- pkg/rpc/pb/service_report_node.pb.go | 1570 +++++++++++++++++ pkg/rpc/protos/models/model_report_node.proto | 17 + pkg/rpc/protos/service_ns_node.proto | 2 +- pkg/rpc/protos/service_report_node.proto | 115 ++ 11 files changed, 1989 insertions(+), 3 deletions(-) create mode 100644 pkg/reporterconfigs/messages.go create mode 100644 pkg/reporterconfigs/node_config.go create mode 100644 pkg/reporterconfigs/status.go create mode 100644 pkg/rpc/pb/model_report_node.pb.go create mode 100644 pkg/rpc/pb/service_report_node.pb.go create mode 100644 pkg/rpc/protos/models/model_report_node.proto create mode 100644 pkg/rpc/protos/service_report_node.proto diff --git a/pkg/messageconfigs/ns_messages.go b/pkg/messageconfigs/ns_messages.go index 3338388..75c610f 100644 --- a/pkg/messageconfigs/ns_messages.go +++ b/pkg/messageconfigs/ns_messages.go @@ -6,7 +6,7 @@ type NSMessageCode = string const ( NSMessageCodeConnectedAPINode NSMessageCode = "connectedAPINode" // NS节点连接API节点成功 NSMessageCodeCheckSystemdService NSMessageCode = "checkSystemdService" // 检查Systemd服务 - NSMessageCodeNewNodeTask MessageCode = "newNodeTask" // 有新的节点任务产生 + NSMessageCodeNewNodeTask NSMessageCode = "newNodeTask" // 有新的节点任务产生 ) // NSConnectedAPINodeMessage 连接API节点成功 diff --git a/pkg/nodeconfigs/node_roles.go b/pkg/nodeconfigs/node_roles.go index 0792428..fab0553 100644 --- a/pkg/nodeconfigs/node_roles.go +++ b/pkg/nodeconfigs/node_roles.go @@ -14,4 +14,5 @@ const ( NodeRoleNode NodeRole = "node" NodeRoleCluster NodeRole = "cluster" NodeRoleAuthority NodeRole = "authority" + NodeRoleReport NodeRole = "report" ) diff --git a/pkg/reporterconfigs/messages.go b/pkg/reporterconfigs/messages.go new file mode 100644 index 0000000..8c4ed88 --- /dev/null +++ b/pkg/reporterconfigs/messages.go @@ -0,0 +1,23 @@ +package reporterconfigs + +type MessageCode = string + +// 节点相关消息 +const ( + MessageCodeConnectedAPINode MessageCode = "connectedAPINode" // 节点连接API节点成功 + MessageCodeCheckSystemdService MessageCode = "checkSystemdService" // 检查Systemd服务 + MessageCodeNewNodeTask MessageCode = "newNodeTask" // 有新的节点任务产生 +) + +// ConnectedAPINodeMessage 连接API节点成功 +type ConnectedAPINodeMessage struct { + APINodeId int64 `json:"apiNodeId"` +} + +// CheckSystemdServiceMessage Systemd服务 +type CheckSystemdServiceMessage struct { +} + +// NewNodeTaskMessage 有新的节点任务 +type NewNodeTaskMessage struct { +} diff --git a/pkg/reporterconfigs/node_config.go b/pkg/reporterconfigs/node_config.go new file mode 100644 index 0000000..f302279 --- /dev/null +++ b/pkg/reporterconfigs/node_config.go @@ -0,0 +1,11 @@ +// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. + +package reporterconfigs + +type NodeConfig struct { + Id int64 `json:"id"` +} + +func (this *NodeConfig) Init() error { + return nil +} diff --git a/pkg/reporterconfigs/status.go b/pkg/reporterconfigs/status.go new file mode 100644 index 0000000..7cf3e8f --- /dev/null +++ b/pkg/reporterconfigs/status.go @@ -0,0 +1,16 @@ +// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. + +package reporterconfigs + +type Status struct { + IP string `json:"ip"` + OS string `json:"os"` + OSName string `json:"osName"` + Username string `json:"username"` + BuildVersion string `json:"buildVersion"` // 编译版本 + BuildVersionCode uint32 `json:"buildVersionCode"` // 版本数字 + UpdatedAt int64 `json:"updatedAt"` // 更新时间 + + Location string `json:"location"` // 从IP查询到的Location + ISP string `json:"isp"` // 从IP查询到的ISP +} diff --git a/pkg/rpc/pb/model_report_node.pb.go b/pkg/rpc/pb/model_report_node.pb.go new file mode 100644 index 0000000..7316e64 --- /dev/null +++ b/pkg/rpc/pb/model_report_node.pb.go @@ -0,0 +1,233 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: models/model_report_node.proto + +package pb + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ReportNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + UniqueId string `protobuf:"bytes,2,opt,name=uniqueId,proto3" json:"uniqueId,omitempty"` + Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` + IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Location string `protobuf:"bytes,6,opt,name=location,proto3" json:"location,omitempty"` + Isp string `protobuf:"bytes,7,opt,name=isp,proto3" json:"isp,omitempty"` + IsActive bool `protobuf:"varint,8,opt,name=isActive,proto3" json:"isActive,omitempty"` + StatusJSON []byte `protobuf:"bytes,9,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"` + AllowIPs []string `protobuf:"bytes,10,rep,name=allowIPs,proto3" json:"allowIPs,omitempty"` +} + +func (x *ReportNode) Reset() { + *x = ReportNode{} + if protoimpl.UnsafeEnabled { + mi := &file_models_model_report_node_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReportNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportNode) ProtoMessage() {} + +func (x *ReportNode) ProtoReflect() protoreflect.Message { + mi := &file_models_model_report_node_proto_msgTypes[0] + 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 ReportNode.ProtoReflect.Descriptor instead. +func (*ReportNode) Descriptor() ([]byte, []int) { + return file_models_model_report_node_proto_rawDescGZIP(), []int{0} +} + +func (x *ReportNode) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ReportNode) GetUniqueId() string { + if x != nil { + return x.UniqueId + } + return "" +} + +func (x *ReportNode) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +func (x *ReportNode) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +func (x *ReportNode) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ReportNode) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *ReportNode) GetIsp() string { + if x != nil { + return x.Isp + } + return "" +} + +func (x *ReportNode) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *ReportNode) GetStatusJSON() []byte { + if x != nil { + return x.StatusJSON + } + return nil +} + +func (x *ReportNode) GetAllowIPs() []string { + if x != nil { + return x.AllowIPs + } + return nil +} + +var File_models_model_report_node_proto protoreflect.FileDescriptor + +var file_models_model_report_node_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x02, 0x70, 0x62, 0x22, 0xfe, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, + 0x73, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x73, 0x70, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x49, 0x50, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x49, 0x50, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_models_model_report_node_proto_rawDescOnce sync.Once + file_models_model_report_node_proto_rawDescData = file_models_model_report_node_proto_rawDesc +) + +func file_models_model_report_node_proto_rawDescGZIP() []byte { + file_models_model_report_node_proto_rawDescOnce.Do(func() { + file_models_model_report_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_report_node_proto_rawDescData) + }) + return file_models_model_report_node_proto_rawDescData +} + +var file_models_model_report_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_models_model_report_node_proto_goTypes = []interface{}{ + (*ReportNode)(nil), // 0: pb.ReportNode +} +var file_models_model_report_node_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_models_model_report_node_proto_init() } +func file_models_model_report_node_proto_init() { + if File_models_model_report_node_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_models_model_report_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReportNode); 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_models_model_report_node_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_models_model_report_node_proto_goTypes, + DependencyIndexes: file_models_model_report_node_proto_depIdxs, + MessageInfos: file_models_model_report_node_proto_msgTypes, + }.Build() + File_models_model_report_node_proto = out.File + file_models_model_report_node_proto_rawDesc = nil + file_models_model_report_node_proto_goTypes = nil + file_models_model_report_node_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/service_ns_node.pb.go b/pkg/rpc/pb/service_ns_node.pb.go index 5c731cf..8487958 100644 --- a/pkg/rpc/pb/service_ns_node.pb.go +++ b/pkg/rpc/pb/service_ns_node.pb.go @@ -989,7 +989,7 @@ func (x *UpdateNSNodeIsInstalledRequest) GetIsInstalled() bool { return false } -// 更新认证状态 +// 更新节点状态 type UpdateNSNodeStatusRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/pkg/rpc/pb/service_report_node.pb.go b/pkg/rpc/pb/service_report_node.pb.go new file mode 100644 index 0000000..067bef2 --- /dev/null +++ b/pkg/rpc/pb/service_report_node.pb.go @@ -0,0 +1,1570 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: service_report_node.proto + +package pb + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// 添加终端 +type CreateReportNodeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` + Isp string `protobuf:"bytes,3,opt,name=isp,proto3" json:"isp,omitempty"` + AllowIPs []string `protobuf:"bytes,4,rep,name=allowIPs,proto3" json:"allowIPs,omitempty"` +} + +func (x *CreateReportNodeRequest) Reset() { + *x = CreateReportNodeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateReportNodeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateReportNodeRequest) ProtoMessage() {} + +func (x *CreateReportNodeRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[0] + 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 CreateReportNodeRequest.ProtoReflect.Descriptor instead. +func (*CreateReportNodeRequest) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateReportNodeRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateReportNodeRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *CreateReportNodeRequest) GetIsp() string { + if x != nil { + return x.Isp + } + return "" +} + +func (x *CreateReportNodeRequest) GetAllowIPs() []string { + if x != nil { + return x.AllowIPs + } + return nil +} + +type CreateReportNodeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReportNodeId int64 `protobuf:"varint,1,opt,name=reportNodeId,proto3" json:"reportNodeId,omitempty"` +} + +func (x *CreateReportNodeResponse) Reset() { + *x = CreateReportNodeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateReportNodeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateReportNodeResponse) ProtoMessage() {} + +func (x *CreateReportNodeResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateReportNodeResponse.ProtoReflect.Descriptor instead. +func (*CreateReportNodeResponse) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateReportNodeResponse) GetReportNodeId() int64 { + if x != nil { + return x.ReportNodeId + } + return 0 +} + +// 删除终端 +type DeleteReportNodeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReportNodeId int64 `protobuf:"varint,1,opt,name=reportNodeId,proto3" json:"reportNodeId,omitempty"` +} + +func (x *DeleteReportNodeRequest) Reset() { + *x = DeleteReportNodeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteReportNodeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteReportNodeRequest) ProtoMessage() {} + +func (x *DeleteReportNodeRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[2] + 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 DeleteReportNodeRequest.ProtoReflect.Descriptor instead. +func (*DeleteReportNodeRequest) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{2} +} + +func (x *DeleteReportNodeRequest) GetReportNodeId() int64 { + if x != nil { + return x.ReportNodeId + } + return 0 +} + +// 修改终端 +type UpdateReportNodeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReportNodeId int64 `protobuf:"varint,1,opt,name=reportNodeId,proto3" json:"reportNodeId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` + Isp string `protobuf:"bytes,4,opt,name=isp,proto3" json:"isp,omitempty"` + AllowIPs []string `protobuf:"bytes,5,rep,name=allowIPs,proto3" json:"allowIPs,omitempty"` + IsOn bool `protobuf:"varint,6,opt,name=isOn,proto3" json:"isOn,omitempty"` +} + +func (x *UpdateReportNodeRequest) Reset() { + *x = UpdateReportNodeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReportNodeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReportNodeRequest) ProtoMessage() {} + +func (x *UpdateReportNodeRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_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 UpdateReportNodeRequest.ProtoReflect.Descriptor instead. +func (*UpdateReportNodeRequest) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateReportNodeRequest) GetReportNodeId() int64 { + if x != nil { + return x.ReportNodeId + } + return 0 +} + +func (x *UpdateReportNodeRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateReportNodeRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *UpdateReportNodeRequest) GetIsp() string { + if x != nil { + return x.Isp + } + return "" +} + +func (x *UpdateReportNodeRequest) GetAllowIPs() []string { + if x != nil { + return x.AllowIPs + } + return nil +} + +func (x *UpdateReportNodeRequest) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +// 计算终端数量 +type CountAllEnabledReportNodesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` +} + +func (x *CountAllEnabledReportNodesRequest) Reset() { + *x = CountAllEnabledReportNodesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAllEnabledReportNodesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAllEnabledReportNodesRequest) ProtoMessage() {} + +func (x *CountAllEnabledReportNodesRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[4] + 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 CountAllEnabledReportNodesRequest.ProtoReflect.Descriptor instead. +func (*CountAllEnabledReportNodesRequest) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{4} +} + +func (x *CountAllEnabledReportNodesRequest) GetKeyword() string { + if x != nil { + return x.Keyword + } + return "" +} + +// 列出单页终端 +type ListEnabledReportNodesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` + Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` + Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *ListEnabledReportNodesRequest) Reset() { + *x = ListEnabledReportNodesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnabledReportNodesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnabledReportNodesRequest) ProtoMessage() {} + +func (x *ListEnabledReportNodesRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[5] + 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 ListEnabledReportNodesRequest.ProtoReflect.Descriptor instead. +func (*ListEnabledReportNodesRequest) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{5} +} + +func (x *ListEnabledReportNodesRequest) GetKeyword() string { + if x != nil { + return x.Keyword + } + return "" +} + +func (x *ListEnabledReportNodesRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ListEnabledReportNodesRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +type ListEnabledReportNodesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReportNodes []*ReportNode `protobuf:"bytes,1,rep,name=reportNodes,proto3" json:"reportNodes,omitempty"` +} + +func (x *ListEnabledReportNodesResponse) Reset() { + *x = ListEnabledReportNodesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnabledReportNodesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnabledReportNodesResponse) ProtoMessage() {} + +func (x *ListEnabledReportNodesResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_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 ListEnabledReportNodesResponse.ProtoReflect.Descriptor instead. +func (*ListEnabledReportNodesResponse) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{6} +} + +func (x *ListEnabledReportNodesResponse) GetReportNodes() []*ReportNode { + if x != nil { + return x.ReportNodes + } + return nil +} + +// 查找单个终端 +type FindEnabledReportNodeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReportNodeId int64 `protobuf:"varint,1,opt,name=reportNodeId,proto3" json:"reportNodeId,omitempty"` +} + +func (x *FindEnabledReportNodeRequest) Reset() { + *x = FindEnabledReportNodeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledReportNodeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledReportNodeRequest) ProtoMessage() {} + +func (x *FindEnabledReportNodeRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_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 FindEnabledReportNodeRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledReportNodeRequest) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{7} +} + +func (x *FindEnabledReportNodeRequest) GetReportNodeId() int64 { + if x != nil { + return x.ReportNodeId + } + return 0 +} + +type FindEnabledReportNodeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReportNode *ReportNode `protobuf:"bytes,1,opt,name=reportNode,proto3" json:"reportNode,omitempty"` +} + +func (x *FindEnabledReportNodeResponse) Reset() { + *x = FindEnabledReportNodeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledReportNodeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledReportNodeResponse) ProtoMessage() {} + +func (x *FindEnabledReportNodeResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_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 FindEnabledReportNodeResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledReportNodeResponse) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{8} +} + +func (x *FindEnabledReportNodeResponse) GetReportNode() *ReportNode { + if x != nil { + return x.ReportNode + } + return nil +} + +// 终端stream +type ReportNodeStreamMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReportNodeId int64 `protobuf:"varint,1,opt,name=reportNodeId,proto3" json:"reportNodeId,omitempty"` + RequestId int64 `protobuf:"varint,2,opt,name=requestId,proto3" json:"requestId,omitempty"` + TimeoutSeconds int32 `protobuf:"varint,3,opt,name=timeoutSeconds,proto3" json:"timeoutSeconds,omitempty"` + Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` + DataJSON []byte `protobuf:"bytes,5,opt,name=dataJSON,proto3" json:"dataJSON,omitempty"` + IsOk bool `protobuf:"varint,6,opt,name=isOk,proto3" json:"isOk,omitempty"` + Message string `protobuf:"bytes,7,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ReportNodeStreamMessage) Reset() { + *x = ReportNodeStreamMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReportNodeStreamMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportNodeStreamMessage) ProtoMessage() {} + +func (x *ReportNodeStreamMessage) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_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 ReportNodeStreamMessage.ProtoReflect.Descriptor instead. +func (*ReportNodeStreamMessage) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{9} +} + +func (x *ReportNodeStreamMessage) GetReportNodeId() int64 { + if x != nil { + return x.ReportNodeId + } + return 0 +} + +func (x *ReportNodeStreamMessage) GetRequestId() int64 { + if x != nil { + return x.RequestId + } + return 0 +} + +func (x *ReportNodeStreamMessage) GetTimeoutSeconds() int32 { + if x != nil { + return x.TimeoutSeconds + } + return 0 +} + +func (x *ReportNodeStreamMessage) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *ReportNodeStreamMessage) GetDataJSON() []byte { + if x != nil { + return x.DataJSON + } + return nil +} + +func (x *ReportNodeStreamMessage) GetIsOk() bool { + if x != nil { + return x.IsOk + } + return false +} + +func (x *ReportNodeStreamMessage) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// 更新节点状态 +type UpdateReportNodeStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StatusJSON []byte `protobuf:"bytes,1,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"` +} + +func (x *UpdateReportNodeStatusRequest) Reset() { + *x = UpdateReportNodeStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReportNodeStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReportNodeStatusRequest) ProtoMessage() {} + +func (x *UpdateReportNodeStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[10] + 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 UpdateReportNodeStatusRequest.ProtoReflect.Descriptor instead. +func (*UpdateReportNodeStatusRequest) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateReportNodeStatusRequest) GetStatusJSON() []byte { + if x != nil { + return x.StatusJSON + } + return nil +} + +// 获取当前节点信息 +type FindCurrentReportNodeConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FindCurrentReportNodeConfigRequest) Reset() { + *x = FindCurrentReportNodeConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindCurrentReportNodeConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindCurrentReportNodeConfigRequest) ProtoMessage() {} + +func (x *FindCurrentReportNodeConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[11] + 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 FindCurrentReportNodeConfigRequest.ProtoReflect.Descriptor instead. +func (*FindCurrentReportNodeConfigRequest) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{11} +} + +type FindCurrentReportNodeConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReportNodeJSON []byte `protobuf:"bytes,1,opt,name=reportNodeJSON,proto3" json:"reportNodeJSON,omitempty"` +} + +func (x *FindCurrentReportNodeConfigResponse) Reset() { + *x = FindCurrentReportNodeConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_report_node_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindCurrentReportNodeConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindCurrentReportNodeConfigResponse) ProtoMessage() {} + +func (x *FindCurrentReportNodeConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_report_node_proto_msgTypes[12] + 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 FindCurrentReportNodeConfigResponse.ProtoReflect.Descriptor instead. +func (*FindCurrentReportNodeConfigResponse) Descriptor() ([]byte, []int) { + return file_service_report_node_proto_rawDescGZIP(), []int{12} +} + +func (x *FindCurrentReportNodeConfigResponse) GetReportNodeJSON() []byte { + if x != nil { + return x.ReportNodeJSON + } + return nil +} + +var File_service_report_node_proto protoreflect.FileDescriptor + +var file_service_report_node_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, + 0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x17, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x73, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x69, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x49, 0x50, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x49, 0x50, 0x73, 0x22, 0x3e, 0x0a, 0x18, 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, + 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x73, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x69, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x50, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x50, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x69, 0x73, 0x4f, 0x6e, 0x22, 0x3d, 0x0a, 0x21, 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, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, + 0x6f, 0x72, 0x64, 0x22, 0x65, 0x0a, 0x1d, 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, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x52, 0x0a, 0x1e, 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, 0x30, 0x0a, 0x0b, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x42, + 0x0a, 0x1c, 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, 0x12, 0x22, + 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x1d, 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, 0x2e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, + 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3f, 0x0a, 0x1d, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x24, 0x0a, 0x22, 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, 0x22, 0x4d, + 0x0a, 0x23, 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, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x32, 0x8d, 0x06, + 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, 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, 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, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_report_node_proto_rawDescOnce sync.Once + file_service_report_node_proto_rawDescData = file_service_report_node_proto_rawDesc +) + +func file_service_report_node_proto_rawDescGZIP() []byte { + file_service_report_node_proto_rawDescOnce.Do(func() { + file_service_report_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_report_node_proto_rawDescData) + }) + return file_service_report_node_proto_rawDescData +} + +var file_service_report_node_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_service_report_node_proto_goTypes = []interface{}{ + (*CreateReportNodeRequest)(nil), // 0: pb.CreateReportNodeRequest + (*CreateReportNodeResponse)(nil), // 1: pb.CreateReportNodeResponse + (*DeleteReportNodeRequest)(nil), // 2: pb.DeleteReportNodeRequest + (*UpdateReportNodeRequest)(nil), // 3: pb.UpdateReportNodeRequest + (*CountAllEnabledReportNodesRequest)(nil), // 4: pb.CountAllEnabledReportNodesRequest + (*ListEnabledReportNodesRequest)(nil), // 5: pb.ListEnabledReportNodesRequest + (*ListEnabledReportNodesResponse)(nil), // 6: pb.ListEnabledReportNodesResponse + (*FindEnabledReportNodeRequest)(nil), // 7: pb.FindEnabledReportNodeRequest + (*FindEnabledReportNodeResponse)(nil), // 8: pb.FindEnabledReportNodeResponse + (*ReportNodeStreamMessage)(nil), // 9: pb.ReportNodeStreamMessage + (*UpdateReportNodeStatusRequest)(nil), // 10: pb.UpdateReportNodeStatusRequest + (*FindCurrentReportNodeConfigRequest)(nil), // 11: pb.FindCurrentReportNodeConfigRequest + (*FindCurrentReportNodeConfigResponse)(nil), // 12: pb.FindCurrentReportNodeConfigResponse + (*ReportNode)(nil), // 13: pb.ReportNode + (*RPCSuccess)(nil), // 14: pb.RPCSuccess + (*RPCCountResponse)(nil), // 15: pb.RPCCountResponse +} +var file_service_report_node_proto_depIdxs = []int32{ + 13, // 0: pb.ListEnabledReportNodesResponse.reportNodes:type_name -> pb.ReportNode + 13, // 1: pb.FindEnabledReportNodeResponse.reportNode:type_name -> pb.ReportNode + 0, // 2: pb.ReportNodeService.createReportNode:input_type -> pb.CreateReportNodeRequest + 2, // 3: pb.ReportNodeService.deleteReportNode:input_type -> pb.DeleteReportNodeRequest + 3, // 4: pb.ReportNodeService.updateReportNode:input_type -> pb.UpdateReportNodeRequest + 4, // 5: pb.ReportNodeService.countAllEnabledReportNodes:input_type -> pb.CountAllEnabledReportNodesRequest + 5, // 6: pb.ReportNodeService.listEnabledReportNodes:input_type -> pb.ListEnabledReportNodesRequest + 7, // 7: pb.ReportNodeService.findEnabledReportNode:input_type -> pb.FindEnabledReportNodeRequest + 9, // 8: pb.ReportNodeService.reportNodeStream:input_type -> pb.ReportNodeStreamMessage + 10, // 9: pb.ReportNodeService.updateReportNodeStatus:input_type -> pb.UpdateReportNodeStatusRequest + 11, // 10: pb.ReportNodeService.findCurrentReportNodeConfig:input_type -> pb.FindCurrentReportNodeConfigRequest + 1, // 11: pb.ReportNodeService.createReportNode:output_type -> pb.CreateReportNodeResponse + 14, // 12: pb.ReportNodeService.deleteReportNode:output_type -> pb.RPCSuccess + 14, // 13: pb.ReportNodeService.updateReportNode:output_type -> pb.RPCSuccess + 15, // 14: pb.ReportNodeService.countAllEnabledReportNodes:output_type -> pb.RPCCountResponse + 6, // 15: pb.ReportNodeService.listEnabledReportNodes:output_type -> pb.ListEnabledReportNodesResponse + 8, // 16: pb.ReportNodeService.findEnabledReportNode:output_type -> pb.FindEnabledReportNodeResponse + 9, // 17: pb.ReportNodeService.reportNodeStream:output_type -> pb.ReportNodeStreamMessage + 14, // 18: pb.ReportNodeService.updateReportNodeStatus:output_type -> pb.RPCSuccess + 12, // 19: pb.ReportNodeService.findCurrentReportNodeConfig:output_type -> pb.FindCurrentReportNodeConfigResponse + 11, // [11:20] is the sub-list for method output_type + 2, // [2:11] 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 +} + +func init() { file_service_report_node_proto_init() } +func file_service_report_node_proto_init() { + if File_service_report_node_proto != nil { + return + } + file_models_model_report_node_proto_init() + file_models_rpc_messages_proto_init() + if !protoimpl.UnsafeEnabled { + file_service_report_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateReportNodeRequest); 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[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateReportNodeResponse); 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[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteReportNodeRequest); 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[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReportNodeRequest); 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[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllEnabledReportNodesRequest); 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[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledReportNodesRequest); 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[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledReportNodesResponse); 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[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledReportNodeRequest); 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[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledReportNodeResponse); 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[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReportNodeStreamMessage); 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[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReportNodeStatusRequest); 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[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindCurrentReportNodeConfigRequest); 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[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindCurrentReportNodeConfigResponse); 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_service_report_node_proto_rawDesc, + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_report_node_proto_goTypes, + DependencyIndexes: file_service_report_node_proto_depIdxs, + MessageInfos: file_service_report_node_proto_msgTypes, + }.Build() + File_service_report_node_proto = out.File + file_service_report_node_proto_rawDesc = nil + file_service_report_node_proto_goTypes = nil + file_service_report_node_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ReportNodeServiceClient is the client API for ReportNodeService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ReportNodeServiceClient interface { + // 添加终端 + CreateReportNode(ctx context.Context, in *CreateReportNodeRequest, opts ...grpc.CallOption) (*CreateReportNodeResponse, error) + // 删除终端 + DeleteReportNode(ctx context.Context, in *DeleteReportNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 修改终端 + UpdateReportNode(ctx context.Context, in *UpdateReportNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 计算终端数量 + CountAllEnabledReportNodes(ctx context.Context, in *CountAllEnabledReportNodesRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) + // 列出单页终端 + ListEnabledReportNodes(ctx context.Context, in *ListEnabledReportNodesRequest, opts ...grpc.CallOption) (*ListEnabledReportNodesResponse, error) + // 查找单个终端 + FindEnabledReportNode(ctx context.Context, in *FindEnabledReportNodeRequest, opts ...grpc.CallOption) (*FindEnabledReportNodeResponse, error) + // 终端stream + ReportNodeStream(ctx context.Context, opts ...grpc.CallOption) (ReportNodeService_ReportNodeStreamClient, error) + // 更新节点状态 + UpdateReportNodeStatus(ctx context.Context, in *UpdateReportNodeStatusRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 获取当前节点信息 + FindCurrentReportNodeConfig(ctx context.Context, in *FindCurrentReportNodeConfigRequest, opts ...grpc.CallOption) (*FindCurrentReportNodeConfigResponse, error) +} + +type reportNodeServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewReportNodeServiceClient(cc grpc.ClientConnInterface) ReportNodeServiceClient { + return &reportNodeServiceClient{cc} +} + +func (c *reportNodeServiceClient) CreateReportNode(ctx context.Context, in *CreateReportNodeRequest, opts ...grpc.CallOption) (*CreateReportNodeResponse, error) { + out := new(CreateReportNodeResponse) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/createReportNode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportNodeServiceClient) DeleteReportNode(ctx context.Context, in *DeleteReportNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/deleteReportNode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportNodeServiceClient) UpdateReportNode(ctx context.Context, in *UpdateReportNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/updateReportNode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportNodeServiceClient) CountAllEnabledReportNodes(ctx context.Context, in *CountAllEnabledReportNodesRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { + out := new(RPCCountResponse) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/countAllEnabledReportNodes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportNodeServiceClient) ListEnabledReportNodes(ctx context.Context, in *ListEnabledReportNodesRequest, opts ...grpc.CallOption) (*ListEnabledReportNodesResponse, error) { + out := new(ListEnabledReportNodesResponse) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/listEnabledReportNodes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportNodeServiceClient) FindEnabledReportNode(ctx context.Context, in *FindEnabledReportNodeRequest, opts ...grpc.CallOption) (*FindEnabledReportNodeResponse, error) { + out := new(FindEnabledReportNodeResponse) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/findEnabledReportNode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportNodeServiceClient) ReportNodeStream(ctx context.Context, opts ...grpc.CallOption) (ReportNodeService_ReportNodeStreamClient, error) { + stream, err := c.cc.NewStream(ctx, &_ReportNodeService_serviceDesc.Streams[0], "/pb.ReportNodeService/reportNodeStream", opts...) + if err != nil { + return nil, err + } + x := &reportNodeServiceReportNodeStreamClient{stream} + return x, nil +} + +type ReportNodeService_ReportNodeStreamClient interface { + Send(*ReportNodeStreamMessage) error + Recv() (*ReportNodeStreamMessage, error) + grpc.ClientStream +} + +type reportNodeServiceReportNodeStreamClient struct { + grpc.ClientStream +} + +func (x *reportNodeServiceReportNodeStreamClient) Send(m *ReportNodeStreamMessage) error { + return x.ClientStream.SendMsg(m) +} + +func (x *reportNodeServiceReportNodeStreamClient) Recv() (*ReportNodeStreamMessage, error) { + m := new(ReportNodeStreamMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *reportNodeServiceClient) UpdateReportNodeStatus(ctx context.Context, in *UpdateReportNodeStatusRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/updateReportNodeStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportNodeServiceClient) FindCurrentReportNodeConfig(ctx context.Context, in *FindCurrentReportNodeConfigRequest, opts ...grpc.CallOption) (*FindCurrentReportNodeConfigResponse, error) { + out := new(FindCurrentReportNodeConfigResponse) + err := c.cc.Invoke(ctx, "/pb.ReportNodeService/findCurrentReportNodeConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReportNodeServiceServer is the server API for ReportNodeService service. +type ReportNodeServiceServer interface { + // 添加终端 + CreateReportNode(context.Context, *CreateReportNodeRequest) (*CreateReportNodeResponse, error) + // 删除终端 + DeleteReportNode(context.Context, *DeleteReportNodeRequest) (*RPCSuccess, error) + // 修改终端 + UpdateReportNode(context.Context, *UpdateReportNodeRequest) (*RPCSuccess, error) + // 计算终端数量 + CountAllEnabledReportNodes(context.Context, *CountAllEnabledReportNodesRequest) (*RPCCountResponse, error) + // 列出单页终端 + ListEnabledReportNodes(context.Context, *ListEnabledReportNodesRequest) (*ListEnabledReportNodesResponse, error) + // 查找单个终端 + FindEnabledReportNode(context.Context, *FindEnabledReportNodeRequest) (*FindEnabledReportNodeResponse, error) + // 终端stream + ReportNodeStream(ReportNodeService_ReportNodeStreamServer) error + // 更新节点状态 + UpdateReportNodeStatus(context.Context, *UpdateReportNodeStatusRequest) (*RPCSuccess, error) + // 获取当前节点信息 + FindCurrentReportNodeConfig(context.Context, *FindCurrentReportNodeConfigRequest) (*FindCurrentReportNodeConfigResponse, error) +} + +// UnimplementedReportNodeServiceServer can be embedded to have forward compatible implementations. +type UnimplementedReportNodeServiceServer struct { +} + +func (*UnimplementedReportNodeServiceServer) CreateReportNode(context.Context, *CreateReportNodeRequest) (*CreateReportNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateReportNode not implemented") +} +func (*UnimplementedReportNodeServiceServer) DeleteReportNode(context.Context, *DeleteReportNodeRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteReportNode not implemented") +} +func (*UnimplementedReportNodeServiceServer) UpdateReportNode(context.Context, *UpdateReportNodeRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateReportNode not implemented") +} +func (*UnimplementedReportNodeServiceServer) CountAllEnabledReportNodes(context.Context, *CountAllEnabledReportNodesRequest) (*RPCCountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledReportNodes not implemented") +} +func (*UnimplementedReportNodeServiceServer) ListEnabledReportNodes(context.Context, *ListEnabledReportNodesRequest) (*ListEnabledReportNodesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEnabledReportNodes not implemented") +} +func (*UnimplementedReportNodeServiceServer) FindEnabledReportNode(context.Context, *FindEnabledReportNodeRequest) (*FindEnabledReportNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledReportNode not implemented") +} +func (*UnimplementedReportNodeServiceServer) ReportNodeStream(ReportNodeService_ReportNodeStreamServer) error { + return status.Errorf(codes.Unimplemented, "method ReportNodeStream not implemented") +} +func (*UnimplementedReportNodeServiceServer) UpdateReportNodeStatus(context.Context, *UpdateReportNodeStatusRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateReportNodeStatus not implemented") +} +func (*UnimplementedReportNodeServiceServer) FindCurrentReportNodeConfig(context.Context, *FindCurrentReportNodeConfigRequest) (*FindCurrentReportNodeConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindCurrentReportNodeConfig not implemented") +} + +func RegisterReportNodeServiceServer(s *grpc.Server, srv ReportNodeServiceServer) { + s.RegisterService(&_ReportNodeService_serviceDesc, srv) +} + +func _ReportNodeService_CreateReportNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateReportNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).CreateReportNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/CreateReportNode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).CreateReportNode(ctx, req.(*CreateReportNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportNodeService_DeleteReportNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteReportNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).DeleteReportNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/DeleteReportNode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).DeleteReportNode(ctx, req.(*DeleteReportNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportNodeService_UpdateReportNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReportNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).UpdateReportNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/UpdateReportNode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).UpdateReportNode(ctx, req.(*UpdateReportNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportNodeService_CountAllEnabledReportNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountAllEnabledReportNodesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).CountAllEnabledReportNodes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/CountAllEnabledReportNodes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).CountAllEnabledReportNodes(ctx, req.(*CountAllEnabledReportNodesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportNodeService_ListEnabledReportNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEnabledReportNodesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).ListEnabledReportNodes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/ListEnabledReportNodes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).ListEnabledReportNodes(ctx, req.(*ListEnabledReportNodesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportNodeService_FindEnabledReportNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledReportNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).FindEnabledReportNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/FindEnabledReportNode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).FindEnabledReportNode(ctx, req.(*FindEnabledReportNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportNodeService_ReportNodeStream_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ReportNodeServiceServer).ReportNodeStream(&reportNodeServiceReportNodeStreamServer{stream}) +} + +type ReportNodeService_ReportNodeStreamServer interface { + Send(*ReportNodeStreamMessage) error + Recv() (*ReportNodeStreamMessage, error) + grpc.ServerStream +} + +type reportNodeServiceReportNodeStreamServer struct { + grpc.ServerStream +} + +func (x *reportNodeServiceReportNodeStreamServer) Send(m *ReportNodeStreamMessage) error { + return x.ServerStream.SendMsg(m) +} + +func (x *reportNodeServiceReportNodeStreamServer) Recv() (*ReportNodeStreamMessage, error) { + m := new(ReportNodeStreamMessage) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _ReportNodeService_UpdateReportNodeStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReportNodeStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).UpdateReportNodeStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/UpdateReportNodeStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).UpdateReportNodeStatus(ctx, req.(*UpdateReportNodeStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportNodeService_FindCurrentReportNodeConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindCurrentReportNodeConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportNodeServiceServer).FindCurrentReportNodeConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReportNodeService/FindCurrentReportNodeConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportNodeServiceServer).FindCurrentReportNodeConfig(ctx, req.(*FindCurrentReportNodeConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ReportNodeService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.ReportNodeService", + HandlerType: (*ReportNodeServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "createReportNode", + Handler: _ReportNodeService_CreateReportNode_Handler, + }, + { + MethodName: "deleteReportNode", + Handler: _ReportNodeService_DeleteReportNode_Handler, + }, + { + MethodName: "updateReportNode", + Handler: _ReportNodeService_UpdateReportNode_Handler, + }, + { + MethodName: "countAllEnabledReportNodes", + Handler: _ReportNodeService_CountAllEnabledReportNodes_Handler, + }, + { + MethodName: "listEnabledReportNodes", + Handler: _ReportNodeService_ListEnabledReportNodes_Handler, + }, + { + MethodName: "findEnabledReportNode", + Handler: _ReportNodeService_FindEnabledReportNode_Handler, + }, + { + MethodName: "updateReportNodeStatus", + Handler: _ReportNodeService_UpdateReportNodeStatus_Handler, + }, + { + MethodName: "findCurrentReportNodeConfig", + Handler: _ReportNodeService_FindCurrentReportNodeConfig_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "reportNodeStream", + Handler: _ReportNodeService_ReportNodeStream_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "service_report_node.proto", +} diff --git a/pkg/rpc/protos/models/model_report_node.proto b/pkg/rpc/protos/models/model_report_node.proto new file mode 100644 index 0000000..2570f09 --- /dev/null +++ b/pkg/rpc/protos/models/model_report_node.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +message ReportNode { + int64 id = 1; + string uniqueId = 2; + string secret = 3; + bool isOn = 4; + string name = 5; + string location = 6; + string isp = 7; + bool isActive = 8; + bytes statusJSON = 9; + repeated string allowIPs = 10; +} diff --git a/pkg/rpc/protos/service_ns_node.proto b/pkg/rpc/protos/service_ns_node.proto index 754b23e..3adcf21 100644 --- a/pkg/rpc/protos/service_ns_node.proto +++ b/pkg/rpc/protos/service_ns_node.proto @@ -180,7 +180,7 @@ message UpdateNSNodeIsInstalledRequest { bool isInstalled = 2; } -// 更新认证状态 +// 更新节点状态 message UpdateNSNodeStatusRequest { int64 nodeId = 1; bytes statusJSON = 2; diff --git a/pkg/rpc/protos/service_report_node.proto b/pkg/rpc/protos/service_report_node.proto new file mode 100644 index 0000000..70d82fd --- /dev/null +++ b/pkg/rpc/protos/service_report_node.proto @@ -0,0 +1,115 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "models/model_report_node.proto"; +import "models/rpc_messages.proto"; + +// 监控终端服务 +service ReportNodeService { + // 添加终端 + rpc createReportNode(CreateReportNodeRequest) returns (CreateReportNodeResponse); + + // 删除终端 + rpc deleteReportNode(DeleteReportNodeRequest) returns (RPCSuccess); + + // 修改终端 + rpc updateReportNode(UpdateReportNodeRequest) returns (RPCSuccess); + + // 计算终端数量 + rpc countAllEnabledReportNodes(CountAllEnabledReportNodesRequest) returns (RPCCountResponse); + + // 列出单页终端 + rpc listEnabledReportNodes(ListEnabledReportNodesRequest) returns (ListEnabledReportNodesResponse); + + // 查找单个终端 + rpc findEnabledReportNode(FindEnabledReportNodeRequest) returns (FindEnabledReportNodeResponse); + + // 终端stream + rpc reportNodeStream (stream ReportNodeStreamMessage) returns (stream ReportNodeStreamMessage); + + // 更新节点状态 + rpc updateReportNodeStatus (UpdateReportNodeStatusRequest) returns (RPCSuccess); + + // 获取当前节点信息 + rpc findCurrentReportNodeConfig (FindCurrentReportNodeConfigRequest) returns (FindCurrentReportNodeConfigResponse); +} + +// 添加终端 +message CreateReportNodeRequest { + string name = 1; + string location = 2; + string isp = 3; + repeated string allowIPs = 4; +} + +message CreateReportNodeResponse { + int64 reportNodeId = 1; +} + +// 删除终端 +message DeleteReportNodeRequest { + int64 reportNodeId = 1; +} + +// 修改终端 +message UpdateReportNodeRequest{ + int64 reportNodeId = 1; + string name = 2; + string location = 3; + string isp = 4; + repeated string allowIPs = 5; + bool isOn = 6; +} + +// 计算终端数量 +message CountAllEnabledReportNodesRequest { + string keyword = 1; +} + +// 列出单页终端 +message ListEnabledReportNodesRequest { + string keyword = 1; + int64 offset = 2; + int64 size = 3; +} + +message ListEnabledReportNodesResponse { + repeated ReportNode reportNodes = 1; +} + +// 查找单个终端 +message FindEnabledReportNodeRequest{ + int64 reportNodeId = 1; +} + +message FindEnabledReportNodeResponse { + ReportNode reportNode = 1; +} + +// 终端stream +message ReportNodeStreamMessage { + int64 reportNodeId = 1; + int64 requestId = 2; + int32 timeoutSeconds = 3; + string code = 4; + bytes dataJSON = 5; + bool isOk = 6; + string message = 7; +} + +// 更新节点状态 +message UpdateReportNodeStatusRequest { + bytes statusJSON = 1; +} + + +// 获取当前节点信息 +message FindCurrentReportNodeConfigRequest { + +} + +message FindCurrentReportNodeConfigResponse { + bytes reportNodeJSON = 1; +} \ No newline at end of file