mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-30 13:51:52 +02:00
restructured the project to comply community guideline, for others check release note
This commit is contained in:
25
internal/server/instance.go
Normal file
25
internal/server/instance.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package server
|
||||
|
||||
var proxyServer, apiServer *server
|
||||
|
||||
func InitProxyServer(opt Options) *server {
|
||||
if proxyServer == nil {
|
||||
proxyServer = NewServer(opt)
|
||||
}
|
||||
return proxyServer
|
||||
}
|
||||
|
||||
func InitAPIServer(opt Options) *server {
|
||||
if apiServer == nil {
|
||||
apiServer = NewServer(opt)
|
||||
}
|
||||
return apiServer
|
||||
}
|
||||
|
||||
func GetProxyServer() *server {
|
||||
return proxyServer
|
||||
}
|
||||
|
||||
func GetAPIServer() *server {
|
||||
return apiServer
|
||||
}
|
||||
Reference in New Issue
Block a user