refactor(oohelperd): better distinguish different helpers (#434)

Part of https://github.com/ooni/probe/issues/1733
This commit is contained in:
Simone Basso 2021-08-17 11:23:53 +02:00 committed by GitHub
commit ce854e8ae1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 48 additions and 45 deletions

View file

@ -9,8 +9,8 @@ import (
"time"
"github.com/apex/log"
"github.com/ooni/probe-cli/v3/internal/cmd/oohelperd/internal"
"github.com/ooni/probe-cli/v3/internal/cmd/oohelperd/internal/nwcth"
"github.com/ooni/probe-cli/v3/internal/cmd/oohelperd/internal/webconnectivity"
"github.com/ooni/probe-cli/v3/internal/cmd/oohelperd/internal/websteps"
"github.com/ooni/probe-cli/v3/internal/engine/netx"
)
@ -53,8 +53,8 @@ func main() {
func testableMain() {
mux := http.NewServeMux()
mux.Handle("/api/unstable/nwcth", nwcth.Handler{Config: &nwcth.Config{}})
mux.Handle("/", internal.Handler{
mux.Handle("/api/unstable/websteps", &websteps.Handler{Config: &websteps.Config{}})
mux.Handle("/", webconnectivity.Handler{
Client: httpx,
Dialer: dialer,
MaxAcceptableBody: maxAcceptableBody,