refactor(engine): *http.Client -> model.HTTPClient (#836)

This diff makes the implementation of the engine package more
abstract by changing HTTPClient() to return a model.HTTPClient
as opposed to returning an *http.Client.

Part of https://github.com/ooni/probe/issues/2184
This commit is contained in:
Simone Basso
2022-07-08 11:08:10 +02:00
committed by GitHub
parent d419ed8ac8
commit 6019b25baf
5 changed files with 10 additions and 9 deletions
+1 -2
View File
@@ -2,7 +2,6 @@ package model
import (
"context"
"net/http"
)
//
@@ -13,7 +12,7 @@ import (
// ExperimentSession is the experiment's view of a session.
type ExperimentSession interface {
GetTestHelpersByName(name string) ([]OOAPIService, bool)
DefaultHTTPClient() *http.Client
DefaultHTTPClient() HTTPClient
FetchPsiphonConfig(ctx context.Context) ([]byte, error)
FetchTorTargets(ctx context.Context, cc string) (map[string]OOAPITorTarget, error)
FetchURLList(ctx context.Context, config OOAPIURLListConfig) ([]OOAPIURLInfo, error)