Refactor local binary cache code into a subclass

This commit is contained in:
Eelco Dolstra
2016-02-18 14:06:17 +01:00
parent a992f688d1
commit 0e254ca66d
6 changed files with 111 additions and 36 deletions

View File

@ -7,7 +7,7 @@
#include "state.hh"
#include "build-result.hh"
#include "binary-cache-store.hh"
#include "local-binary-cache-store.hh"
#include "shared.hh"
#include "globals.hh"
@ -33,10 +33,12 @@ ref<Store> State::getLocalStore()
ref<Store> State::getDestStore()
{
return make_ref<BinaryCacheStore>(getLocalStore(),
auto store = make_ref<LocalBinaryCacheStore>(getLocalStore(),
"/tmp/binary-cache",
"/home/eelco/Misc/Keys/test.nixos.org/secret",
"/home/eelco/Misc/Keys/test.nixos.org/public");
store->init();
return store;
}