ooni-probe-cli/internal/engine
Simone Basso ff1c170562
feat(engine): allow runner to return many measurements (#527)
This is required to implement websteps, which is currently tracked
by https://github.com/ooni/probe/issues/1733.

We introduce the concept of async runner. An async runner will
post measurements on a channel until it is done. When it is done,
it will close the channel to notify the reader about that.

This change causes sync experiments now to strictly return either
a non-nil measurement or a non-nil error.

While this is a pretty much obvious situation in golang, we had
some parts of the codebase that were not robust to this assumption
and attempted to submit a measurement after the measure call
returned an error.

Luckily, we had enough tests to catch this change in our assumption
and this is why there are extra docs and tests changes.
2021-09-30 00:54:52 +02:00
..
experiment refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
geolocate refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
httpheader Release 3.10.0 beta.3 (#345) 2021-05-13 08:16:28 +02:00
httpx refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
internal refactor: move bytecounter to internal (#391) 2021-06-22 13:00:29 +02:00
legacy refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
mockable feat: tutorial on how to write the torsf experiment (#390) 2021-06-22 00:12:03 +02:00
model feat(engine): allow runner to return many measurements (#527) 2021-09-30 00:54:52 +02:00
netx refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
probeservices refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
testdata fix: add missing files causing tests to fail (#202) 2021-02-02 14:18:22 +01:00
.gitignore feat: support embedding encrypted psiphon config (#285) 2021-04-02 17:36:06 +02:00
allexperiments.go cli: new testhelper and the websteps experiment prototype (#432) 2021-08-17 10:29:06 +02:00
doc.go feat(engine): allow runner to return many measurements (#527) 2021-09-30 00:54:52 +02:00
experiment_integration_test.go feat(engine): allow runner to return many measurements (#527) 2021-09-30 00:54:52 +02:00
experiment_internal_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experiment_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experiment.go feat(engine): allow runner to return many measurements (#527) 2021-09-30 00:54:52 +02:00
experimentbuilder_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experimentbuilder.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
inputloader_network_test.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
inputloader_test.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
inputloader.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
inputprocessor_test.go feat(engine): allow runner to return many measurements (#527) 2021-09-30 00:54:52 +02:00
inputprocessor.go feat(engine): allow runner to return many measurements (#527) 2021-09-30 00:54:52 +02:00
kvstore.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
saver_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
saver.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
session_integration_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
session_internal_test.go fix(session): make sure tunnel code is tested (#301) 2021-04-05 19:51:41 +02:00
session_nopsiphon_test.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
session_nopsiphon.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
session_psiphon_test.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
session_psiphon.go fix: allow to build miniooni for windows (#520) 2021-09-28 18:27:28 +02:00
session.go refactor: move bytecounter to internal (#391) 2021-06-22 13:00:29 +02:00
submitter_test.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
submitter.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00