diff --git a/pkg/rpc/pb/api_method_stat_service.pb.go b/pkg/rpc/pb/api_method_stat_service.pb.go new file mode 100644 index 0000000..9fc453d --- /dev/null +++ b/pkg/rpc/pb/api_method_stat_service.pb.go @@ -0,0 +1,430 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: api_method_stat_service.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 FindAPIMethodStatsWithDayRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Day string `protobuf:"bytes,1,opt,name=day,proto3" json:"day,omitempty"` // YYYYMMDD +} + +func (x *FindAPIMethodStatsWithDayRequest) Reset() { + *x = FindAPIMethodStatsWithDayRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_method_stat_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAPIMethodStatsWithDayRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAPIMethodStatsWithDayRequest) ProtoMessage() {} + +func (x *FindAPIMethodStatsWithDayRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_method_stat_service_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 FindAPIMethodStatsWithDayRequest.ProtoReflect.Descriptor instead. +func (*FindAPIMethodStatsWithDayRequest) Descriptor() ([]byte, []int) { + return file_api_method_stat_service_proto_rawDescGZIP(), []int{0} +} + +func (x *FindAPIMethodStatsWithDayRequest) GetDay() string { + if x != nil { + return x.Day + } + return "" +} + +type FindAPIMethodStatsWithDayResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiMethodStats []*APIMethodStat `protobuf:"bytes,1,rep,name=apiMethodStats,proto3" json:"apiMethodStats,omitempty"` +} + +func (x *FindAPIMethodStatsWithDayResponse) Reset() { + *x = FindAPIMethodStatsWithDayResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_method_stat_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAPIMethodStatsWithDayResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAPIMethodStatsWithDayResponse) ProtoMessage() {} + +func (x *FindAPIMethodStatsWithDayResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_method_stat_service_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 FindAPIMethodStatsWithDayResponse.ProtoReflect.Descriptor instead. +func (*FindAPIMethodStatsWithDayResponse) Descriptor() ([]byte, []int) { + return file_api_method_stat_service_proto_rawDescGZIP(), []int{1} +} + +func (x *FindAPIMethodStatsWithDayResponse) GetApiMethodStats() []*APIMethodStat { + if x != nil { + return x.ApiMethodStats + } + return nil +} + +// 检查是否有统计数据 +type CountAPIMethodStatsWithDayRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Day string `protobuf:"bytes,1,opt,name=day,proto3" json:"day,omitempty"` // YYYYMMDD +} + +func (x *CountAPIMethodStatsWithDayRequest) Reset() { + *x = CountAPIMethodStatsWithDayRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_method_stat_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAPIMethodStatsWithDayRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAPIMethodStatsWithDayRequest) ProtoMessage() {} + +func (x *CountAPIMethodStatsWithDayRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_method_stat_service_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 CountAPIMethodStatsWithDayRequest.ProtoReflect.Descriptor instead. +func (*CountAPIMethodStatsWithDayRequest) Descriptor() ([]byte, []int) { + return file_api_method_stat_service_proto_rawDescGZIP(), []int{2} +} + +func (x *CountAPIMethodStatsWithDayRequest) GetDay() string { + if x != nil { + return x.Day + } + return "" +} + +var File_api_method_stat_service_proto protoreflect.FileDescriptor + +var file_api_method_stat_service_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x61, 0x70, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x02, 0x70, 0x62, 0x1a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, + 0x74, 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, 0x34, 0x0a, 0x20, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, 0x61, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x61, 0x79, 0x22, 0x5e, 0x0a, 0x21, 0x46, 0x69, 0x6e, 0x64, + 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, + 0x74, 0x68, 0x44, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, + 0x0e, 0x61, 0x70, 0x69, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x50, 0x49, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0e, 0x61, 0x70, 0x69, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x35, 0x0a, 0x21, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, + 0x69, 0x74, 0x68, 0x44, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x64, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x61, 0x79, 0x32, + 0xdb, 0x01, 0x0a, 0x14, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, + 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, + 0x74, 0x68, 0x44, 0x61, 0x79, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, + 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, 0x74, + 0x68, 0x44, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, + 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x59, 0x0a, 0x1a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, 0x61, 0x79, + 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, 0x61, 0x79, + 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, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_method_stat_service_proto_rawDescOnce sync.Once + file_api_method_stat_service_proto_rawDescData = file_api_method_stat_service_proto_rawDesc +) + +func file_api_method_stat_service_proto_rawDescGZIP() []byte { + file_api_method_stat_service_proto_rawDescOnce.Do(func() { + file_api_method_stat_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_method_stat_service_proto_rawDescData) + }) + return file_api_method_stat_service_proto_rawDescData +} + +var file_api_method_stat_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_api_method_stat_service_proto_goTypes = []interface{}{ + (*FindAPIMethodStatsWithDayRequest)(nil), // 0: pb.FindAPIMethodStatsWithDayRequest + (*FindAPIMethodStatsWithDayResponse)(nil), // 1: pb.FindAPIMethodStatsWithDayResponse + (*CountAPIMethodStatsWithDayRequest)(nil), // 2: pb.CountAPIMethodStatsWithDayRequest + (*APIMethodStat)(nil), // 3: pb.APIMethodStat + (*RPCCountResponse)(nil), // 4: pb.RPCCountResponse +} +var file_api_method_stat_service_proto_depIdxs = []int32{ + 3, // 0: pb.FindAPIMethodStatsWithDayResponse.apiMethodStats:type_name -> pb.APIMethodStat + 0, // 1: pb.APIMethodStatService.findAPIMethodStatsWithDay:input_type -> pb.FindAPIMethodStatsWithDayRequest + 2, // 2: pb.APIMethodStatService.countAPIMethodStatsWithDay:input_type -> pb.CountAPIMethodStatsWithDayRequest + 1, // 3: pb.APIMethodStatService.findAPIMethodStatsWithDay:output_type -> pb.FindAPIMethodStatsWithDayResponse + 4, // 4: pb.APIMethodStatService.countAPIMethodStatsWithDay:output_type -> pb.RPCCountResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_api_method_stat_service_proto_init() } +func file_api_method_stat_service_proto_init() { + if File_api_method_stat_service_proto != nil { + return + } + file_models_model_api_method_stat_proto_init() + file_models_rpc_messages_proto_init() + if !protoimpl.UnsafeEnabled { + file_api_method_stat_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAPIMethodStatsWithDayRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_method_stat_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAPIMethodStatsWithDayResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_method_stat_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAPIMethodStatsWithDayRequest); 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_api_method_stat_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_api_method_stat_service_proto_goTypes, + DependencyIndexes: file_api_method_stat_service_proto_depIdxs, + MessageInfos: file_api_method_stat_service_proto_msgTypes, + }.Build() + File_api_method_stat_service_proto = out.File + file_api_method_stat_service_proto_rawDesc = nil + file_api_method_stat_service_proto_goTypes = nil + file_api_method_stat_service_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 + +// APIMethodStatServiceClient is the client API for APIMethodStatService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type APIMethodStatServiceClient interface { + // 查找某天的统计 + FindAPIMethodStatsWithDay(ctx context.Context, in *FindAPIMethodStatsWithDayRequest, opts ...grpc.CallOption) (*FindAPIMethodStatsWithDayResponse, error) + // 检查是否有统计数据 + CountAPIMethodStatsWithDay(ctx context.Context, in *CountAPIMethodStatsWithDayRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) +} + +type aPIMethodStatServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAPIMethodStatServiceClient(cc grpc.ClientConnInterface) APIMethodStatServiceClient { + return &aPIMethodStatServiceClient{cc} +} + +func (c *aPIMethodStatServiceClient) FindAPIMethodStatsWithDay(ctx context.Context, in *FindAPIMethodStatsWithDayRequest, opts ...grpc.CallOption) (*FindAPIMethodStatsWithDayResponse, error) { + out := new(FindAPIMethodStatsWithDayResponse) + err := c.cc.Invoke(ctx, "/pb.APIMethodStatService/findAPIMethodStatsWithDay", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aPIMethodStatServiceClient) CountAPIMethodStatsWithDay(ctx context.Context, in *CountAPIMethodStatsWithDayRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { + out := new(RPCCountResponse) + err := c.cc.Invoke(ctx, "/pb.APIMethodStatService/countAPIMethodStatsWithDay", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// APIMethodStatServiceServer is the server API for APIMethodStatService service. +type APIMethodStatServiceServer interface { + // 查找某天的统计 + FindAPIMethodStatsWithDay(context.Context, *FindAPIMethodStatsWithDayRequest) (*FindAPIMethodStatsWithDayResponse, error) + // 检查是否有统计数据 + CountAPIMethodStatsWithDay(context.Context, *CountAPIMethodStatsWithDayRequest) (*RPCCountResponse, error) +} + +// UnimplementedAPIMethodStatServiceServer can be embedded to have forward compatible implementations. +type UnimplementedAPIMethodStatServiceServer struct { +} + +func (*UnimplementedAPIMethodStatServiceServer) FindAPIMethodStatsWithDay(context.Context, *FindAPIMethodStatsWithDayRequest) (*FindAPIMethodStatsWithDayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAPIMethodStatsWithDay not implemented") +} +func (*UnimplementedAPIMethodStatServiceServer) CountAPIMethodStatsWithDay(context.Context, *CountAPIMethodStatsWithDayRequest) (*RPCCountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountAPIMethodStatsWithDay not implemented") +} + +func RegisterAPIMethodStatServiceServer(s *grpc.Server, srv APIMethodStatServiceServer) { + s.RegisterService(&_APIMethodStatService_serviceDesc, srv) +} + +func _APIMethodStatService_FindAPIMethodStatsWithDay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAPIMethodStatsWithDayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APIMethodStatServiceServer).FindAPIMethodStatsWithDay(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.APIMethodStatService/FindAPIMethodStatsWithDay", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APIMethodStatServiceServer).FindAPIMethodStatsWithDay(ctx, req.(*FindAPIMethodStatsWithDayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _APIMethodStatService_CountAPIMethodStatsWithDay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountAPIMethodStatsWithDayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APIMethodStatServiceServer).CountAPIMethodStatsWithDay(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.APIMethodStatService/CountAPIMethodStatsWithDay", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APIMethodStatServiceServer).CountAPIMethodStatsWithDay(ctx, req.(*CountAPIMethodStatsWithDayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _APIMethodStatService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.APIMethodStatService", + HandlerType: (*APIMethodStatServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "findAPIMethodStatsWithDay", + Handler: _APIMethodStatService_FindAPIMethodStatsWithDay_Handler, + }, + { + MethodName: "countAPIMethodStatsWithDay", + Handler: _APIMethodStatService_CountAPIMethodStatsWithDay_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api_method_stat_service.proto", +} diff --git a/pkg/rpc/pb/model_api_method_stat.pb.go b/pkg/rpc/pb/model_api_method_stat.pb.go new file mode 100644 index 0000000..ed43290 --- /dev/null +++ b/pkg/rpc/pb/model_api_method_stat.pb.go @@ -0,0 +1,220 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: models/model_api_method_stat.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 APIMethodStat struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + ApiNodeId int64 `protobuf:"varint,2,opt,name=apiNodeId,proto3" json:"apiNodeId,omitempty"` + Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` + Tag string `protobuf:"bytes,4,opt,name=tag,proto3" json:"tag,omitempty"` + CostMs float32 `protobuf:"fixed32,5,opt,name=costMs,proto3" json:"costMs,omitempty"` + PeekMs float32 `protobuf:"fixed32,6,opt,name=peekMs,proto3" json:"peekMs,omitempty"` + CountCalls int64 `protobuf:"varint,7,opt,name=countCalls,proto3" json:"countCalls,omitempty"` + ApiNode *APINode `protobuf:"bytes,30,opt,name=apiNode,proto3" json:"apiNode,omitempty"` +} + +func (x *APIMethodStat) Reset() { + *x = APIMethodStat{} + if protoimpl.UnsafeEnabled { + mi := &file_models_model_api_method_stat_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *APIMethodStat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*APIMethodStat) ProtoMessage() {} + +func (x *APIMethodStat) ProtoReflect() protoreflect.Message { + mi := &file_models_model_api_method_stat_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 APIMethodStat.ProtoReflect.Descriptor instead. +func (*APIMethodStat) Descriptor() ([]byte, []int) { + return file_models_model_api_method_stat_proto_rawDescGZIP(), []int{0} +} + +func (x *APIMethodStat) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *APIMethodStat) GetApiNodeId() int64 { + if x != nil { + return x.ApiNodeId + } + return 0 +} + +func (x *APIMethodStat) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *APIMethodStat) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +func (x *APIMethodStat) GetCostMs() float32 { + if x != nil { + return x.CostMs + } + return 0 +} + +func (x *APIMethodStat) GetPeekMs() float32 { + if x != nil { + return x.PeekMs + } + return 0 +} + +func (x *APIMethodStat) GetCountCalls() int64 { + if x != nil { + return x.CountCalls + } + return 0 +} + +func (x *APIMethodStat) GetApiNode() *APINode { + if x != nil { + return x.ApiNode + } + return nil +} + +var File_models_model_api_method_stat_proto protoreflect.FileDescriptor + +var file_models_model_api_method_stat_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, + 0x70, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, + 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x01, 0x0a, 0x0d, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70, 0x69, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x70, 0x69, 0x4e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, + 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x73, 0x74, 0x4d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x06, 0x63, 0x6f, 0x73, 0x74, 0x4d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x65, 0x6b, 0x4d, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x70, 0x65, 0x65, 0x6b, 0x4d, 0x73, 0x12, + 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, + 0x25, 0x0a, 0x07, 0x61, 0x70, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x61, + 0x70, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_models_model_api_method_stat_proto_rawDescOnce sync.Once + file_models_model_api_method_stat_proto_rawDescData = file_models_model_api_method_stat_proto_rawDesc +) + +func file_models_model_api_method_stat_proto_rawDescGZIP() []byte { + file_models_model_api_method_stat_proto_rawDescOnce.Do(func() { + file_models_model_api_method_stat_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_api_method_stat_proto_rawDescData) + }) + return file_models_model_api_method_stat_proto_rawDescData +} + +var file_models_model_api_method_stat_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_models_model_api_method_stat_proto_goTypes = []interface{}{ + (*APIMethodStat)(nil), // 0: pb.APIMethodStat + (*APINode)(nil), // 1: pb.APINode +} +var file_models_model_api_method_stat_proto_depIdxs = []int32{ + 1, // 0: pb.APIMethodStat.apiNode:type_name -> pb.APINode + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_models_model_api_method_stat_proto_init() } +func file_models_model_api_method_stat_proto_init() { + if File_models_model_api_method_stat_proto != nil { + return + } + file_models_model_api_node_proto_init() + if !protoimpl.UnsafeEnabled { + file_models_model_api_method_stat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*APIMethodStat); 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_api_method_stat_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_models_model_api_method_stat_proto_goTypes, + DependencyIndexes: file_models_model_api_method_stat_proto_depIdxs, + MessageInfos: file_models_model_api_method_stat_proto_msgTypes, + }.Build() + File_models_model_api_method_stat_proto = out.File + file_models_model_api_method_stat_proto_rawDesc = nil + file_models_model_api_method_stat_proto_goTypes = nil + file_models_model_api_method_stat_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/model_api_node.pb.go b/pkg/rpc/pb/model_api_node.pb.go index 47b6222..0621b6a 100644 --- a/pkg/rpc/pb/model_api_node.pb.go +++ b/pkg/rpc/pb/model_api_node.pb.go @@ -45,6 +45,7 @@ type APINode struct { AccessAddrsJSON []byte `protobuf:"bytes,10,opt,name=accessAddrsJSON,proto3" json:"accessAddrsJSON,omitempty"` AccessAddrs []string `protobuf:"bytes,11,rep,name=accessAddrs,proto3" json:"accessAddrs,omitempty"` StatusJSON []byte `protobuf:"bytes,12,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"` + Debug bool `protobuf:"varint,30,opt,name=debug,proto3" json:"debug,omitempty"` } func (x *APINode) Reset() { @@ -184,12 +185,19 @@ func (x *APINode) GetStatusJSON() []byte { return nil } +func (x *APINode) GetDebug() bool { + if x != nil { + return x.Debug + } + return false +} + var File_models_model_api_node_proto protoreflect.FileDescriptor var file_models_model_api_node_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, - 0x62, 0x22, 0xc9, 0x03, 0x0a, 0x07, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, + 0x62, 0x22, 0xdf, 0x03, 0x0a, 0x07, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, @@ -217,8 +225,10 @@ var file_models_model_api_node_proto_rawDesc = []byte{ 0x63, 0x63, 0x65, 0x73, 0x73, 0x41, 0x64, 0x64, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a, + 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/rpc/pb/service_api_node.pb.go b/pkg/rpc/pb/service_api_node.pb.go index 9e52e82..c501bf9 100644 --- a/pkg/rpc/pb/service_api_node.pb.go +++ b/pkg/rpc/pb/service_api_node.pb.go @@ -938,6 +938,54 @@ func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) GetSslCertId() int64 { return 0 } +// 修改调试模式状态 +type DebugAPINodeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Debug bool `protobuf:"varint,1,opt,name=debug,proto3" json:"debug,omitempty"` +} + +func (x *DebugAPINodeRequest) Reset() { + *x = DebugAPINodeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_api_node_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DebugAPINodeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DebugAPINodeRequest) ProtoMessage() {} + +func (x *DebugAPINodeRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_api_node_proto_msgTypes[17] + 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 DebugAPINodeRequest.ProtoReflect.Descriptor instead. +func (*DebugAPINodeRequest) Descriptor() ([]byte, []int) { + return file_service_api_node_proto_rawDescGZIP(), []int{17} +} + +func (x *DebugAPINodeRequest) GetDebug() bool { + if x != nil { + return x.Debug + } + return false +} + var File_service_api_node_proto protoreflect.FileDescriptor var file_service_api_node_proto_rawDesc = []byte{ @@ -1038,68 +1086,74 @@ var file_service_api_node_proto_rawDesc = []byte{ 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, - 0x49, 0x64, 0x32, 0xbc, 0x07, 0x0a, 0x0e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, - 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, - 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 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, 0x39, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x41, 0x50, 0x49, 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, 0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, + 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x44, 0x65, 0x62, 0x75, 0x67, 0x41, 0x50, 0x49, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, + 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x32, + 0xf5, 0x07, 0x0a, 0x0e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, + 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 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, 0x39, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x50, 0x49, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x41, 0x50, 0x49, 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, 0x5f, + 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, + 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, + 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, - 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, - 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x53, 0x0a, 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x2e, - 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x41, 0x50, 0x49, 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, 0x5d, 0x0a, 0x1c, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x41, - 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, - 0x6e, 0x41, 0x50, 0x49, 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, 0x56, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e, - 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, - 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, - 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, - 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, - 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, - 0x12, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x24, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74, - 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x70, 0x62, 0x2e, + 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x53, 0x0a, 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, - 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, - 0x72, 0x74, 0x49, 0x64, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x50, 0x49, 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, 0x5d, 0x0a, 0x1c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x41, 0x50, 0x49, 0x4e, + 0x6f, 0x64, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x41, 0x50, + 0x49, 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, 0x56, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, + 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, + 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, + 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, + 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, + 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6d, 0x0a, 0x24, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, + 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, + 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, + 0x64, 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, 0x37, + 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x41, 0x50, 0x49, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1114,7 +1168,7 @@ func file_service_api_node_proto_rawDescGZIP() []byte { return file_service_api_node_proto_rawDescData } -var file_service_api_node_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_service_api_node_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_service_api_node_proto_goTypes = []interface{}{ (*CreateAPINodeRequest)(nil), // 0: pb.CreateAPINodeRequest (*CreateAPINodeResponse)(nil), // 1: pb.CreateAPINodeResponse @@ -1133,15 +1187,16 @@ var file_service_api_node_proto_goTypes = []interface{}{ (*FindCurrentAPINodeRequest)(nil), // 14: pb.FindCurrentAPINodeRequest (*FindCurrentAPINodeResponse)(nil), // 15: pb.FindCurrentAPINodeResponse (*CountAllEnabledAPINodesWithSSLCertIdRequest)(nil), // 16: pb.CountAllEnabledAPINodesWithSSLCertIdRequest - (*APINode)(nil), // 17: pb.APINode - (*RPCSuccess)(nil), // 18: pb.RPCSuccess - (*RPCCountResponse)(nil), // 19: pb.RPCCountResponse + (*DebugAPINodeRequest)(nil), // 17: pb.DebugAPINodeRequest + (*APINode)(nil), // 18: pb.APINode + (*RPCSuccess)(nil), // 19: pb.RPCSuccess + (*RPCCountResponse)(nil), // 20: pb.RPCCountResponse } var file_service_api_node_proto_depIdxs = []int32{ - 17, // 0: pb.FindAllEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode - 17, // 1: pb.ListEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode - 17, // 2: pb.FindEnabledAPINodeResponse.apiNode:type_name -> pb.APINode - 17, // 3: pb.FindCurrentAPINodeResponse.apiNode:type_name -> pb.APINode + 18, // 0: pb.FindAllEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode + 18, // 1: pb.ListEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode + 18, // 2: pb.FindEnabledAPINodeResponse.apiNode:type_name -> pb.APINode + 18, // 3: pb.FindCurrentAPINodeResponse.apiNode:type_name -> pb.APINode 0, // 4: pb.APINodeService.createAPINode:input_type -> pb.CreateAPINodeRequest 2, // 5: pb.APINodeService.updateAPINode:input_type -> pb.UpdateAPINodeRequest 3, // 6: pb.APINodeService.deleteAPINode:input_type -> pb.DeleteAPINodeRequest @@ -1153,19 +1208,21 @@ var file_service_api_node_proto_depIdxs = []int32{ 12, // 12: pb.APINodeService.findCurrentAPINodeVersion:input_type -> pb.FindCurrentAPINodeVersionRequest 14, // 13: pb.APINodeService.findCurrentAPINode:input_type -> pb.FindCurrentAPINodeRequest 16, // 14: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:input_type -> pb.CountAllEnabledAPINodesWithSSLCertIdRequest - 1, // 15: pb.APINodeService.createAPINode:output_type -> pb.CreateAPINodeResponse - 18, // 16: pb.APINodeService.updateAPINode:output_type -> pb.RPCSuccess - 18, // 17: pb.APINodeService.deleteAPINode:output_type -> pb.RPCSuccess - 5, // 18: pb.APINodeService.findAllEnabledAPINodes:output_type -> pb.FindAllEnabledAPINodesResponse - 19, // 19: pb.APINodeService.countAllEnabledAPINodes:output_type -> pb.RPCCountResponse - 19, // 20: pb.APINodeService.countAllEnabledAndOnAPINodes:output_type -> pb.RPCCountResponse - 9, // 21: pb.APINodeService.listEnabledAPINodes:output_type -> pb.ListEnabledAPINodesResponse - 11, // 22: pb.APINodeService.findEnabledAPINode:output_type -> pb.FindEnabledAPINodeResponse - 13, // 23: pb.APINodeService.findCurrentAPINodeVersion:output_type -> pb.FindCurrentAPINodeVersionResponse - 15, // 24: pb.APINodeService.findCurrentAPINode:output_type -> pb.FindCurrentAPINodeResponse - 19, // 25: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:output_type -> pb.RPCCountResponse - 15, // [15:26] is the sub-list for method output_type - 4, // [4:15] is the sub-list for method input_type + 17, // 15: pb.APINodeService.debugAPINode:input_type -> pb.DebugAPINodeRequest + 1, // 16: pb.APINodeService.createAPINode:output_type -> pb.CreateAPINodeResponse + 19, // 17: pb.APINodeService.updateAPINode:output_type -> pb.RPCSuccess + 19, // 18: pb.APINodeService.deleteAPINode:output_type -> pb.RPCSuccess + 5, // 19: pb.APINodeService.findAllEnabledAPINodes:output_type -> pb.FindAllEnabledAPINodesResponse + 20, // 20: pb.APINodeService.countAllEnabledAPINodes:output_type -> pb.RPCCountResponse + 20, // 21: pb.APINodeService.countAllEnabledAndOnAPINodes:output_type -> pb.RPCCountResponse + 9, // 22: pb.APINodeService.listEnabledAPINodes:output_type -> pb.ListEnabledAPINodesResponse + 11, // 23: pb.APINodeService.findEnabledAPINode:output_type -> pb.FindEnabledAPINodeResponse + 13, // 24: pb.APINodeService.findCurrentAPINodeVersion:output_type -> pb.FindCurrentAPINodeVersionResponse + 15, // 25: pb.APINodeService.findCurrentAPINode:output_type -> pb.FindCurrentAPINodeResponse + 20, // 26: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:output_type -> pb.RPCCountResponse + 19, // 27: pb.APINodeService.debugAPINode:output_type -> pb.RPCSuccess + 16, // [16:28] is the sub-list for method output_type + 4, // [4:16] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name @@ -1383,6 +1440,18 @@ func file_service_api_node_proto_init() { return nil } } + file_service_api_node_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DebugAPINodeRequest); 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{ @@ -1390,7 +1459,7 @@ func file_service_api_node_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_api_node_proto_rawDesc, NumEnums: 0, - NumMessages: 17, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, @@ -1438,6 +1507,8 @@ type APINodeServiceClient interface { FindCurrentAPINode(ctx context.Context, in *FindCurrentAPINodeRequest, opts ...grpc.CallOption) (*FindCurrentAPINodeResponse, error) // 计算使用某个SSL证书的API节点数量 CountAllEnabledAPINodesWithSSLCertId(ctx context.Context, in *CountAllEnabledAPINodesWithSSLCertIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) + // 修改调试模式状态 + DebugAPINode(ctx context.Context, in *DebugAPINodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) } type aPINodeServiceClient struct { @@ -1547,6 +1618,15 @@ func (c *aPINodeServiceClient) CountAllEnabledAPINodesWithSSLCertId(ctx context. return out, nil } +func (c *aPINodeServiceClient) DebugAPINode(ctx context.Context, in *DebugAPINodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.APINodeService/debugAPINode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // APINodeServiceServer is the server API for APINodeService service. type APINodeServiceServer interface { // 创建API节点 @@ -1571,6 +1651,8 @@ type APINodeServiceServer interface { FindCurrentAPINode(context.Context, *FindCurrentAPINodeRequest) (*FindCurrentAPINodeResponse, error) // 计算使用某个SSL证书的API节点数量 CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error) + // 修改调试模式状态 + DebugAPINode(context.Context, *DebugAPINodeRequest) (*RPCSuccess, error) } // UnimplementedAPINodeServiceServer can be embedded to have forward compatible implementations. @@ -1610,6 +1692,9 @@ func (*UnimplementedAPINodeServiceServer) FindCurrentAPINode(context.Context, *F func (*UnimplementedAPINodeServiceServer) CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledAPINodesWithSSLCertId not implemented") } +func (*UnimplementedAPINodeServiceServer) DebugAPINode(context.Context, *DebugAPINodeRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method DebugAPINode not implemented") +} func RegisterAPINodeServiceServer(s *grpc.Server, srv APINodeServiceServer) { s.RegisterService(&_APINodeService_serviceDesc, srv) @@ -1813,6 +1898,24 @@ func _APINodeService_CountAllEnabledAPINodesWithSSLCertId_Handler(srv interface{ return interceptor(ctx, in, info, handler) } +func _APINodeService_DebugAPINode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DebugAPINodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APINodeServiceServer).DebugAPINode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.APINodeService/DebugAPINode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APINodeServiceServer).DebugAPINode(ctx, req.(*DebugAPINodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _APINodeService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.APINodeService", HandlerType: (*APINodeServiceServer)(nil), @@ -1861,6 +1964,10 @@ var _APINodeService_serviceDesc = grpc.ServiceDesc{ MethodName: "countAllEnabledAPINodesWithSSLCertId", Handler: _APINodeService_CountAllEnabledAPINodesWithSSLCertId_Handler, }, + { + MethodName: "debugAPINode", + Handler: _APINodeService_DebugAPINode_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_api_node.proto", diff --git a/pkg/rpc/protos/api_method_stat_service.proto b/pkg/rpc/protos/api_method_stat_service.proto new file mode 100644 index 0000000..1880ceb --- /dev/null +++ b/pkg/rpc/protos/api_method_stat_service.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "models/model_api_method_stat.proto"; +import "models/rpc_messages.proto"; + +// API方法统计服务 +service APIMethodStatService { + // 查找某天的统计 + rpc findAPIMethodStatsWithDay(FindAPIMethodStatsWithDayRequest) returns (FindAPIMethodStatsWithDayResponse); + + // 检查是否有统计数据 + rpc countAPIMethodStatsWithDay(CountAPIMethodStatsWithDayRequest) returns (RPCCountResponse); +} + +// 查找某天的统计 +message FindAPIMethodStatsWithDayRequest { + string day = 1; // YYYYMMDD +} + +message FindAPIMethodStatsWithDayResponse { + repeated APIMethodStat apiMethodStats = 1; +} + +// 检查是否有统计数据 +message CountAPIMethodStatsWithDayRequest { + string day = 1; // YYYYMMDD +} \ No newline at end of file diff --git a/pkg/rpc/protos/models/model_api_method_stat.proto b/pkg/rpc/protos/models/model_api_method_stat.proto new file mode 100644 index 0000000..ea4cf8b --- /dev/null +++ b/pkg/rpc/protos/models/model_api_method_stat.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "models/model_api_node.proto"; + +message APIMethodStat { + int64 id = 1; + int64 apiNodeId = 2; + string method = 3; + string tag = 4; + float costMs = 5; + float peekMs = 6; + int64 countCalls = 7; + + APINode apiNode = 30; +} \ No newline at end of file diff --git a/pkg/rpc/protos/models/model_api_node.proto b/pkg/rpc/protos/models/model_api_node.proto index e77498c..1199dc9 100644 --- a/pkg/rpc/protos/models/model_api_node.proto +++ b/pkg/rpc/protos/models/model_api_node.proto @@ -19,4 +19,6 @@ message APINode { bytes accessAddrsJSON = 10; repeated string accessAddrs = 11; bytes statusJSON = 12; + + bool debug = 30; } \ No newline at end of file diff --git a/pkg/rpc/protos/service_api_node.proto b/pkg/rpc/protos/service_api_node.proto index 6e5d999..2bdeb57 100644 --- a/pkg/rpc/protos/service_api_node.proto +++ b/pkg/rpc/protos/service_api_node.proto @@ -38,6 +38,9 @@ service APINodeService { // 计算使用某个SSL证书的API节点数量 rpc countAllEnabledAPINodesWithSSLCertId (CountAllEnabledAPINodesWithSSLCertIdRequest) returns (RPCCountResponse); + + // 修改调试模式状态 + rpc debugAPINode(DebugAPINodeRequest) returns (RPCSuccess); } // 创建API节点 @@ -135,3 +138,8 @@ message FindCurrentAPINodeResponse { message CountAllEnabledAPINodesWithSSLCertIdRequest { int64 sslCertId = 1; } + +// 修改调试模式状态 +message DebugAPINodeRequest { + bool debug = 1; +} \ No newline at end of file