mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 20:52:33 +02:00
25 lines
401 B
Go
25 lines
401 B
Go
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
|
|
}
|