mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31: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:
parent
fa32560169
commit
3b57181f8e
9 changed files with 43 additions and 6 deletions
|
@ -17,6 +17,12 @@ public:
|
|||
const Setting<Path> remoteProgram{(Store*) this, "nix-daemon", "remote-program", "path to the nix-daemon executable on the remote system"};
|
||||
const Setting<std::string> remoteStore{(Store*) this, "", "remote-store", "URI of the store on the remote system"};
|
||||
|
||||
SSHStore(
|
||||
const Params & params)
|
||||
: SSHStore("dummy", params)
|
||||
{
|
||||
}
|
||||
|
||||
SSHStore(const std::string & host, const Params & params)
|
||||
: Store(params)
|
||||
, RemoteStore(params)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue