ooni-probe-cli/internal
Simone Basso 0a630c1716
refactor(measurex): allow to configure timeouts and max-snapshot-size (#645)
This diff lightly refactors the code in measurex to allow a user
to configure all possible timeouts and the max-snapshot-size.

There is currently a little bit of tension between setting timeouts
inside of measurex and the watchdog timeouts inside of netxlite.

This tension has been documented.

Let us repeat the issue also in this commit message. If you are
using a masurex.Measurer configured with very large timeouts and
the underlying netxlite implementation uses shorter whatchdog
timeouts, then you are going to see shorter than expected timeouts.

Ideally, we would like to have just a single timeout but there is
no way to ask the context "hey, can you tell me if you already have
a configured timeout?".

It may be that the right solution is to modify netxlite to have
some sort of root/library object with this configuration.

If that's the case, then a Measurer could be refactored as follows:

- create the underlying netxlite "library"

- initialize the timeouts desired by the Measurer

- create a Dialer, of whatever is needed

- use it

Now this is not possible because netxlite timeouts are internal
static settings rather than attributes of a structure.

Anyway, for now I'm happy with this just being documented.

(I suspect this issue will need to be addresses when we'll write
unit tests for measurex; at that time a proper solution should
come out naturally due to the unit tests constraints.)

I'm working on this refactoring, BTW, to facilitate rewriting `tor`
using measurex (see https://github.com/ooni/probe/issues/1688).
2022-01-04 13:20:48 +01:00
..
atomicx doc: cleanup and improve for recently moved pkgs (#354) 2021-06-04 11:39:00 +02:00
bytecounter refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
cmd refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
engine cleanup: remove redundant HTTPClient definition (#643) 2022-01-03 16:47:54 +01:00
fsx refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
humanize fix(all): introduce and use iox.CopyContext (#380) 2021-06-15 13:44:28 +02:00
kvstore refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
measurex refactor(measurex): allow to configure timeouts and max-snapshot-size (#645) 2022-01-04 13:20:48 +01:00
mlablocate cleanup: remove redundant HTTPClient definition (#643) 2022-01-03 16:47:54 +01:00
mlablocatev2 cleanup: remove redundant HTTPClient definition (#643) 2022-01-03 16:47:54 +01:00
model refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
multierror doc: cleanup and improve for recently moved pkgs (#354) 2021-06-04 11:39:00 +02:00
netxlite refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
ooapi cleanup: remove redundant HTTPClient definition (#643) 2022-01-03 16:47:54 +01:00
platform fix(internal/platform): support freebsd (#445) 2021-08-20 14:00:06 +02:00
ptx cleanup(ptx): remove redundant dialer definition (#644) 2022-01-04 12:46:55 +01:00
randx doc: improve and reference existing bug in the code (#356) 2021-06-04 12:50:23 +02:00
runtimex feat: run ~always netxlite integration tests (#522) 2021-09-29 16:04:26 +02:00
scrubber refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
shellx refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
stuninput refactor: create common package for holding STUN input (#631) 2021-12-03 14:45:25 +01:00
tunnel refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
tutorial refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00
version chore: set master's version to 3.14.0-alpha (#638) 2021-12-06 17:54:58 +01:00
README.md refactor: interfaces and data types into the model package (#642) 2022-01-03 13:53:23 +01:00

Directory github.com/ooni/probe-cli/internal

This directory contains private Go packages.

As a reminder, you can always check the Go documentation of a package by using

go doc -all ./internal/$package

where $package is the name of the package.

Some notable packages:

  • model contains the interfaces and data model shared by most packages inside this directory;

  • netxlite is the underlying networking library;

  • tutorial contains tutorials on writing new experiments, using measurements libraries, and networking code.