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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user