管理端全部功能跑通
This commit is contained in:
@@ -144,6 +144,17 @@ func (this *APINode) Start() {
|
||||
this.processTableNames()
|
||||
dbs.NotifyReady()
|
||||
|
||||
// 自动确保 ClickHouse 日志表存在(不阻断主流程)
|
||||
this.setProgress("CLICKHOUSE", "正在检查 ClickHouse 日志表")
|
||||
logs.Println("[API_NODE]ensuring clickhouse tables ...")
|
||||
err = setup.EnsureClickHouseTables()
|
||||
if err != nil {
|
||||
logs.Println("[API_NODE]WARNING: ensure clickhouse tables failed: " + err.Error())
|
||||
remotelogs.Error("API_NODE", "ensure clickhouse tables failed: "+err.Error())
|
||||
} else {
|
||||
logs.Println("[API_NODE]ensure clickhouse tables done")
|
||||
}
|
||||
|
||||
// 设置时区
|
||||
this.setProgress("TIMEZONE", "正在设置时区")
|
||||
this.setupTimeZone()
|
||||
|
||||
@@ -5,6 +5,7 @@ package nodes
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services"
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services/clients"
|
||||
httpdnsservices "github.com/TeaOSLab/EdgeAPI/internal/rpc/services/httpdns"
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services/users"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"google.golang.org/grpc"
|
||||
@@ -425,6 +426,46 @@ func (this *APINode) registerServices(server *grpc.Server) {
|
||||
pb.RegisterDNSTaskServiceServer(server, instance)
|
||||
this.rest(instance)
|
||||
}
|
||||
{
|
||||
var instance = this.serviceInstance(&httpdnsservices.HTTPDNSClusterService{}).(*httpdnsservices.HTTPDNSClusterService)
|
||||
pb.RegisterHTTPDNSClusterServiceServer(server, instance)
|
||||
this.rest(instance)
|
||||
}
|
||||
{
|
||||
var instance = this.serviceInstance(&httpdnsservices.HTTPDNSNodeService{}).(*httpdnsservices.HTTPDNSNodeService)
|
||||
pb.RegisterHTTPDNSNodeServiceServer(server, instance)
|
||||
this.rest(instance)
|
||||
}
|
||||
{
|
||||
var instance = this.serviceInstance(&httpdnsservices.HTTPDNSAppService{}).(*httpdnsservices.HTTPDNSAppService)
|
||||
pb.RegisterHTTPDNSAppServiceServer(server, instance)
|
||||
this.rest(instance)
|
||||
}
|
||||
{
|
||||
var instance = this.serviceInstance(&httpdnsservices.HTTPDNSDomainService{}).(*httpdnsservices.HTTPDNSDomainService)
|
||||
pb.RegisterHTTPDNSDomainServiceServer(server, instance)
|
||||
this.rest(instance)
|
||||
}
|
||||
{
|
||||
var instance = this.serviceInstance(&httpdnsservices.HTTPDNSRuleService{}).(*httpdnsservices.HTTPDNSRuleService)
|
||||
pb.RegisterHTTPDNSRuleServiceServer(server, instance)
|
||||
this.rest(instance)
|
||||
}
|
||||
{
|
||||
var instance = this.serviceInstance(&httpdnsservices.HTTPDNSAccessLogService{}).(*httpdnsservices.HTTPDNSAccessLogService)
|
||||
pb.RegisterHTTPDNSAccessLogServiceServer(server, instance)
|
||||
this.rest(instance)
|
||||
}
|
||||
{
|
||||
var instance = this.serviceInstance(&httpdnsservices.HTTPDNSRuntimeLogService{}).(*httpdnsservices.HTTPDNSRuntimeLogService)
|
||||
pb.RegisterHTTPDNSRuntimeLogServiceServer(server, instance)
|
||||
this.rest(instance)
|
||||
}
|
||||
{
|
||||
var instance = this.serviceInstance(&httpdnsservices.HTTPDNSSandboxService{}).(*httpdnsservices.HTTPDNSSandboxService)
|
||||
pb.RegisterHTTPDNSSandboxServiceServer(server, instance)
|
||||
this.rest(instance)
|
||||
}
|
||||
{
|
||||
var instance = this.serviceInstance(&services.NodeClusterFirewallActionService{}).(*services.NodeClusterFirewallActionService)
|
||||
pb.RegisterNodeClusterFirewallActionServiceServer(server, instance)
|
||||
|
||||
Reference in New Issue
Block a user