mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-17 04:34:40 +03:00
3x-ui
This commit is contained in:
22
web/global/global.go
Normal file
22
web/global/global.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package global
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/robfig/cron/v3"
|
||||
_ "unsafe"
|
||||
)
|
||||
|
||||
var webServer WebServer
|
||||
|
||||
type WebServer interface {
|
||||
GetCron() *cron.Cron
|
||||
GetCtx() context.Context
|
||||
}
|
||||
|
||||
func SetWebServer(s WebServer) {
|
||||
webServer = s
|
||||
}
|
||||
|
||||
func GetWebServer() WebServer {
|
||||
return webServer
|
||||
}
|
||||
Reference in New Issue
Block a user