cleanup: netx does not use netxlite legacy names (#801)

This diff refactors netx and netxlite to ensure we're not using
netxlite legacy names inside of netx.

To this end, we're cheating a bit. We're exposing a new factory to
get an unwrapped stdlib resolver rather than defining a legacy name
to export the private name of the same factory.

This is actually a fine place to stop, for now, the next and
netxlite refactoring at https://github.com/ooni/probe/issues/2121.
This commit is contained in:
Simone Basso 2022-06-06 14:46:44 +02:00 committed by GitHub
commit 2502a237fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 34 additions and 43 deletions

View file

@ -28,7 +28,7 @@ func WrapResolver(begin time.Time, db WritableDB, r model.Resolver) model.Resolv
// NewResolverSystem creates a system resolver and then wraps
// it using the WrapResolver function.
func (mx *Measurer) NewResolverSystem(db WritableDB, logger model.Logger) model.Resolver {
return mx.WrapResolver(db, netxlite.NewResolverStdlib(logger))
return mx.WrapResolver(db, netxlite.NewStdlibResolver(logger))
}
// NewResolverUDP is a convenience factory for creating a Resolver