1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

Separate the instantiation and initialisation of the stores

Add a new `init()` method to the `Store` class that is supposed to
handle all the effectful initialisation needed to set-up the store.
The constructor should remain side-effect free and just initialize the
c++ data structure.

The goal behind that is that we can create “dummy” instances of each
store to query static properties about it (the parameters it accepts for
example)
This commit is contained in:
regnat 2020-09-09 11:29:17 +02:00
parent fa32560169
commit 3b57181f8e
9 changed files with 43 additions and 6 deletions

View file

@ -23,6 +23,12 @@ private:
public:
HttpBinaryCacheStore(
const Params & params)
: HttpBinaryCacheStore("dummy", params)
{
}
HttpBinaryCacheStore(
const Path & _cacheUri,
const Params & params)