优化代码

This commit is contained in:
GoEdgeLab
2022-08-05 14:45:56 +08:00
parent 2050d2dbec
commit aada4774b1

View File

@@ -4,7 +4,6 @@ package nodes
import (
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services"
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services/nameservers"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"google.golang.org/grpc"
"reflect"
@@ -463,56 +462,6 @@ func (this *APINode) registerServices(server *grpc.Server) {
pb.RegisterHTTPFastcgiServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSClusterService{}).(*nameservers.NSClusterService)
pb.RegisterNSClusterServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSNodeService{}).(*nameservers.NSNodeService)
pb.RegisterNSNodeServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSDomainService{}).(*nameservers.NSDomainService)
pb.RegisterNSDomainServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSRecordService{}).(*nameservers.NSRecordService)
pb.RegisterNSRecordServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSRouteService{}).(*nameservers.NSRouteService)
pb.RegisterNSRouteServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSKeyService{}).(*nameservers.NSKeyService)
pb.RegisterNSKeyServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSAccessLogService{}).(*nameservers.NSAccessLogService)
pb.RegisterNSAccessLogServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSRecordHourlyStatService{}).(*nameservers.NSRecordHourlyStatService)
pb.RegisterNSRecordHourlyStatServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSQuestionOptionService{}).(*nameservers.NSQuestionOptionService)
pb.RegisterNSQuestionOptionServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&nameservers.NSService{}).(*nameservers.NSService)
pb.RegisterNSServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&services.HTTPAuthPolicyService{}).(*services.HTTPAuthPolicyService)
pb.RegisterHTTPAuthPolicyServiceServer(server, instance)