0a630c1716
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). |
||
---|---|---|
.. | ||
atomicx | ||
bytecounter | ||
cmd | ||
engine | ||
fsx | ||
humanize | ||
kvstore | ||
measurex | ||
mlablocate | ||
mlablocatev2 | ||
model | ||
multierror | ||
netxlite | ||
ooapi | ||
platform | ||
ptx | ||
randx | ||
runtimex | ||
scrubber | ||
shellx | ||
stuninput | ||
tunnel | ||
tutorial | ||
version | ||
README.md |
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: