ooni-probe-cli/internal/engine
Simone Basso 8a0beee808
refactor: start pivoting netx (#396)
What do I mean by pivoting? Netx is currently organized by row:

```
               | dialer | quicdialer | resolver | ...
 saving        |        |            |          | ...
 errorwrapping |        |            |          | ...
 logging       |        |            |          | ...
 mocking/sys   |        |            |          | ...
```

Every row needs to implement saving, errorwrapping, logging, mocking (or
adapting to the system or to some underlying library).

This causes cross package dependencies and, in turn, complexity. For
example, we need the `trace` package for supporting saving.

And `dialer`, `quickdialer`, et al. need to depend on such a package.

The same goes for errorwrapping.

This arrangement further complicates testing. For example, I am
currently working on https://github.com/ooni/probe/issues/1505 and
I realize it need to repeat integration tests in multiple places.

Let's say instead we pivot the above matrix as follows:

```
             | saving | errorwrapping | logging | ...
 dialer      |        |               |         | ...
 quicdialer  |        |               |         | ...
 logging     |        |               |         | ...
 mocking/sys |        |               |         | ...
 ...
```

In this way, now every row contains everything related to a specific
action to perform. We can now share code without relying on extra
support packages. What's more, we can write tests and, judding from
the way in which things are made, it seems we only need integration
testing in `errorwrapping` because it's where data quality matters
whereas, in all other cases, unit testing is fine.

I am going, therefore, to proceed with these changes and "pivot"
`netx`. Hopefully, it won't be too painful.
2021-06-23 15:53:12 +02:00
..
experiment refactor: start pivoting netx (#396) 2021-06-23 15:53:12 +02:00
geolocate cleanup(all): stop using deprecated ioutil functions (#381) 2021-06-15 14:01:45 +02:00
httpheader Release 3.10.0 beta.3 (#345) 2021-05-13 08:16:28 +02:00
httpx fix(all): introduce and use iox.ReadAllContext (#379) 2021-06-15 11:57:40 +02:00
internal refactor: move bytecounter to internal (#391) 2021-06-22 13:00:29 +02:00
legacy refactor: start pivoting netx (#396) 2021-06-23 15:53:12 +02:00
mockable feat: tutorial on how to write the torsf experiment (#390) 2021-06-22 00:12:03 +02:00
model refactor: move scrubbingLogger to the scrubber pkg (#394) 2021-06-22 14:43:58 +02:00
netx refactor: start pivoting netx (#396) 2021-06-23 15:53:12 +02:00
probeservices feat: tutorial on how to write the torsf experiment (#390) 2021-06-22 00:12:03 +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 feat(torsf): experiment that bootstraps tor using snowflake (#387) 2021-06-18 13:51:18 +02:00
experiment_integration_test.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01: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 refactor: move bytecounter to internal (#391) 2021-06-22 13:00:29 +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 refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
inputprocessor.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +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 cleanup(all): stop using deprecated ioutil functions (#381) 2021-06-15 14:01:45 +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 fix(session): make sure tunnel code is tested (#301) 2021-04-05 19:51:41 +02:00
session_nopsiphon.go fix(session): make sure tunnel code is tested (#301) 2021-04-05 19:51:41 +02:00
session_psiphon_test.go feat: support embedding encrypted psiphon config (#285) 2021-04-02 17:36:06 +02:00
session_psiphon.go fix(all): introduce and use iox.ReadAllContext (#379) 2021-06-15 11:57:40 +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