Hold Go's server privately in waf.Server and rproxy.Server (closes #437)
check / check (push) Waiting to run
check / check (push) Waiting to run
Neither Server embeds *http.Server any more. Each holds it as a private field, is its handler, and has Serve, Shutdown, Close and ServeHTTP. sww's serve hook takes the new daemonServer interface of those first three, and fx provides each Server as it. Model: opus-5-5
This commit is contained in:
1 parent
cc77435f2a
commit
ad7ea4608b
15 files changed
+134
-54
No files matched your search
@@ -1,6 +1,14 @@
|
||||
package rproxy
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// HTTPServer is Go's server s holds, for tests that read its settings.
|
||||
func (s *Server) HTTPServer() *http.Server {
|
||||
return s.httpServer
|
||||
}
|
||||
|
||||
// StopBreakerClock has the circuit breaker of s read at as the time, so that how
|
||||
// long requests take cannot matter to it. It is called before s serves.
|
||||
|
||||
Reference in new issue
Block a user