refactor: pass experiment arguments using a struct (#983)

Closes https://github.com/ooni/probe/issues/2358.
This commit is contained in:
Simone Basso 2022-11-22 10:43:47 +01:00 committed by GitHub
commit a0dc65641d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
76 changed files with 824 additions and 481 deletions

View file

@ -78,12 +78,11 @@ var allMethods = []method{{
}}
// Run implements ExperimentMeasurer.Run.
func (m Measurer) Run(
ctx context.Context,
sess model.ExperimentSession,
measurement *model.Measurement,
callbacks model.ExperimentCallbacks,
) error {
func (m Measurer) Run(ctx context.Context, args *model.ExperimentArgs) error {
callbacks := args.Callbacks
measurement := args.Measurement
sess := args.Session
// TODO(bassosimone): wondering whether this experiment should
// actually be merged with sniblocking instead?
tk := new(TestKeys)