func fillSettings(settings map[string]interface{}, srvr *server.Server) map[string]interface{} { settings[_CPUPROFILE] = srvr.CpuProfile() settings[_MEMPROFILE] = srvr.MemProfile() settings[_SERVICERS] = srvr.Servicers() settings[_SCANCAP] = srvr.ScanCap() settings[_REQUESTSIZECAP] = srvr.RequestSizeCap() settings[_DEBUG] = srvr.Debug() settings[_PIPELINEBATCH] = srvr.PipelineBatch() settings[_PIPELINECAP] = srvr.PipelineCap() settings[_MAXPARALLELISM] = srvr.MaxParallelism() settings[_TIMEOUT] = srvr.Timeout() settings[_KEEPALIVELENGTH] = srvr.KeepAlive() settings[_LOGLEVEL] = srvr.LogLevel() return settings }
func NewServiceEndpoint(srv *server.Server, staticPath string, metrics bool, httpAddr, httpsAddr, certFile, keyFile string) *HttpEndpoint { rv := &HttpEndpoint{ server: srv, metrics: metrics, httpAddr: httpAddr, httpsAddr: httpsAddr, certFile: certFile, keyFile: keyFile, bufpool: NewSyncPool(srv.KeepAlive()), actives: NewActiveRequests(), } server.SetActives(rv.actives) rv.registerHandlers(staticPath) return rv }
func NewServiceEndpoint(server *server.Server, staticPath string, metrics bool, httpAddr, httpsAddr, certFile, keyFile string) *HttpEndpoint { rv := &HttpEndpoint{ server: server, metrics: metrics, httpAddr: httpAddr, httpsAddr: httpsAddr, certFile: certFile, keyFile: keyFile, bufpool: NewSyncPool(server.KeepAlive()), } rv.registerHandlers(staticPath) return rv }