mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-18 17:37:04 +01:00
26 lines
401 B
Go
26 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
|
|
}
|