管理端全部功能跑通

This commit is contained in:
robin
2026-02-27 10:35:22 +08:00
parent 4d275c921d
commit 150799f41d
263 changed files with 22664 additions and 4053 deletions

View File

@@ -0,0 +1,39 @@
package nodes
import (
"log"
"time"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeHttpDNS/internal/rpc"
)
func reportRuntimeLog(level string, logType string, module string, description string, requestID string) {
rpcClient, err := rpc.SharedRPC()
if err != nil {
log.Println("[HTTPDNS_NODE][runtime-log]", err.Error())
return
}
nodeID := int64(0)
now := time.Now()
_, err = rpcClient.HTTPDNSRuntimeLogRPC.CreateHTTPDNSRuntimeLogs(rpcClient.Context(), &pb.CreateHTTPDNSRuntimeLogsRequest{
Logs: []*pb.HTTPDNSRuntimeLog{
{
NodeId: nodeID,
Level: level,
Type: logType,
Module: module,
Description: description,
Count: 1,
RequestId: requestID,
CreatedAt: now.Unix(),
Day: now.Format("20060102"),
},
},
})
if err != nil {
log.Println("[HTTPDNS_NODE][runtime-log]", err.Error())
}
}