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
|
|
}
|