refactor(engine): more abstract Experiment{,Builder} (#838)
This diff modifies the engine package to make Experiment and
ExperimentBuilder interfaces rather than structs.
The previosuly existing structs are now named experiment{,Builder}.
This diff helps https://github.com/ooni/probe/issues/2184
because it allows us to write unit tests more easily.
There should be no functional change.
While there, I removed a bunch of deprecated functions, which were
unnecessarily complicate the implementation and could be easily
replaced by passing them a context.Context or context.Background().
This commit is contained in:
parent
5b27df1a37
commit
97864b324f
11 changed files with 325 additions and 283 deletions
|
|
@ -67,7 +67,7 @@ type experimentBuilder interface {
|
|||
|
||||
// experimentBuilderWrapper wraps *ExperimentBuilder
|
||||
type experimentBuilderWrapper struct {
|
||||
eb *engine.ExperimentBuilder
|
||||
eb engine.ExperimentBuilder
|
||||
}
|
||||
|
||||
// newExperiment implements experimentBuilder.newExperiment
|
||||
|
|
|
|||
Loading…
Reference in a new issue