예제 #1
0
func NewPrivateServer(l net.Listener, defaultTTL int) *PrivateServer {
	var p = new(PrivateServer)
	p.Listener = l
	p.Router = mux.NewRouter()
	p.registerControllers(defaultTTL)

	return p
}
예제 #2
0
func NewPublicServer(l net.Listener, loadBalancerFrontendAddress string, requestTimeout int) *PublicServer {
	var p = new(PublicServer)
	p.Listener = l
	p.loadBalancerFrontendAddress = loadBalancerFrontendAddress
	p.requestTimeout = requestTimeout
	p.Router = mux.NewRouter()
	p.registerControllers()

	return p
}