123456789101112131415161718192021222324252627282930313233343536 |
- package global
- import (
- "context"
- _ "unsafe"
- "github.com/robfig/cron/v3"
- )
- var webServer WebServer
- var subServer SubServer
- type WebServer interface {
- GetCron() *cron.Cron
- GetCtx() context.Context
- }
- type SubServer interface {
- GetCtx() context.Context
- }
- func SetWebServer(s WebServer) {
- webServer = s
- }
- func GetWebServer() WebServer {
- return webServer
- }
- func SetSubServer(s SubServer) {
- subServer = s
- }
- func GetSubServer() SubServer {
- return subServer
- }
|