mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +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:
parent
fa32560169
commit
3b57181f8e
9 changed files with 43 additions and 6 deletions
|
@ -192,6 +192,9 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
|
|||
|
||||
S3Helper s3Helper;
|
||||
|
||||
S3BinaryCacheStoreImpl(const Params & params)
|
||||
: S3BinaryCacheStoreImpl("dummy-bucket", params) {}
|
||||
|
||||
S3BinaryCacheStoreImpl(
|
||||
const std::string & bucketName,
|
||||
const Params & params)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue