[优化] 代码优化

This commit is contained in:
ryan
2026-05-31 20:21:46 +08:00
parent ceae693a20
commit 97c10b8d0b
10 changed files with 37 additions and 91 deletions
+2
View File
@@ -49,6 +49,7 @@ var AgentDiscoveryToken = ""
var NodeOfflineThreshold = 2 * time.Minute
// V3 operational settings (hot-reloadable via Option table)
var AgentHeartbeatInterval = 10000 // milliseconds
var AgentWebsocketUpgradeEnabled = true
var AgentUpdateRepo = "Rain-kl/OpenFlare"
@@ -57,6 +58,7 @@ var DatabaseAutoCleanupEnabled = false
var DatabaseAutoCleanupRetentionDays = 30
// V5 OpenResty performance settings (hot-reloadable via Option table)
var OpenRestyWorkerProcesses = "auto"
var OpenRestyWorkerConnections = 4096
var OpenRestyWorkerRlimitNofile = 65535
+2 -1
View File
@@ -3,7 +3,6 @@ package common
import (
"context"
"fmt"
"github.com/gin-gonic/gin"
"io"
"log/slog"
"os"
@@ -11,6 +10,8 @@ import (
"runtime"
"slices"
"strings"
"github.com/gin-gonic/gin"
)
type logLevel int
+2 -1
View File
@@ -2,10 +2,11 @@ package common
import (
"context"
"github.com/go-redis/redis/v8"
"log/slog"
"os"
"time"
"github.com/go-redis/redis/v8"
)
var RDB *redis.Client