withRepository :: HttpLibImplementation of the HTTP protocol
-> [URI]"Out of band" list of mirrors
-> RepoOptsRepository options
-> CacheLocation of local cache
-> RepoLayoutRepository layout
-> IndexLayoutIndex layout
-> (LogMessage -> IO ())Logger
-> (Repository RemoteTemp -> IO a)Callback
-> IO a
Initialize the repository (and cleanup resources afterwards)
We allow to specify multiple mirrors to initialize the repository. These
are mirrors that can be found "out of band" (out of the scope of the TUF
protocol), for example in a cabal.config file. The TUF protocol itself
will specify that any of these mirrors can serve a mirrors.json file
that itself contains mirrors; we consider these as _additional_ mirrors
to the ones that are passed here.
NOTE: The list of mirrors should be non-empty (and should typically include the primary server).
TODO: In the future we could allow finer control over precisely which
mirrors we use (which combination of the mirrors that are passed as arguments
here and the mirrors that we get from mirrors.json) as well as indicating
mirror preferences.