Add flatfile DirMgr
This is a first shot at implementing the changes needed for #267 (closed).
-
Definition of a
DirProvider
trait, abstracting theDirMgr
. This is not complete, and in particular there is an issue with the client callingbootstrap()
: the call cannot be abstracted in the trait, becauseasync fn
's are not (yet) supported. -
Changes in
TorClient
to use aDirProvider
instead of aDirMgr
. Not complete, due to the above (currently has a nasty hack of keeping a reference to the actualDirMgr
). -
Implementation of a minimalist
DirProvider
calledFlatFileDirMgr
, that only loads the directory from cache files. Hidden behind alightarti
feature. -
Changes in
TorClient
to useFlatFileDirMgr
under alightarti
feature. -
Addition of a couple of methods to
UnvalidatedMdConsensus
, to help manipulating the relays inFlatFileDirMgr
. -
Addition of
FromStr
forAuthority
, to allow us to load an authority from a file. The use of it is actually outside of Arti, in our client code, feeding the authorities toTorClient
through configuration.
All comments and suggestions for improvements welcome.