mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 17:50:12 +00:00
feat: server transfer rotation
This commit is contained in:
@@ -34,6 +34,10 @@ var (
|
||||
NotificationShared *NotificationClass
|
||||
NATShared *NATClass
|
||||
CronShared *CronClass
|
||||
// ServerTransferShared is initialized in LoadSingleton AFTER ServerShared
|
||||
// (so the in-memory pending index can write back into ServerShared.UserID
|
||||
// on transitions) and AFTER initUser (so PushIfOnline can read secrets
|
||||
// from UserInfoMap).
|
||||
)
|
||||
|
||||
//go:embed frontend-templates.yaml
|
||||
@@ -59,6 +63,7 @@ func LoadSingleton(bus chan<- *model.Service) (err error) {
|
||||
NotificationShared = NewNotificationClass()
|
||||
ServerShared = NewServerClass()
|
||||
CronShared = NewCronClass()
|
||||
ServerTransferShared = NewServerTransferClass()
|
||||
// 最后初始化 ServiceSentinel
|
||||
ServiceSentinelShared, err = NewServiceSentinel(bus)
|
||||
return
|
||||
@@ -89,7 +94,7 @@ func InitDBFromPath(path string) error {
|
||||
model.Notification{}, model.AlertRule{}, model.Service{}, model.NotificationGroupNotification{},
|
||||
model.Cron{}, model.Transfer{}, model.ServerGroupServer{},
|
||||
model.NAT{}, model.DDNSProfile{}, model.NotificationGroupNotification{},
|
||||
model.WAF{}, model.Oauth2Bind{})
|
||||
model.WAF{}, model.Oauth2Bind{}, model.ServerTransfer{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user