diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-04-29T14·26+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-04-29T14·26+0200 |
commit | 95d20dfde94fc715f39e2ffeadefc5b5bd5e570b (patch) | |
tree | a13f06fd7b0d28f2610eb87dcb4a52203742e51d /src/libstore/s3-binary-cache-store.cc | |
parent | aa3bc3d5dcff5ff6567a4e00320cb9caa28c5a93 (diff) |
Allow parameters in store URIs
This is to allow store-specific configuration, e.g. s3://my-cache?compression=bzip2&secret-key=/path/to/key.
Diffstat (limited to 'src/libstore/s3-binary-cache-store.cc')
-rw-r--r-- | src/libstore/s3-binary-cache-store.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc index 6fadf7be28c9..cd88a3271244 100644 --- a/src/libstore/s3-binary-cache-store.cc +++ b/src/libstore/s3-binary-cache-store.cc @@ -239,7 +239,10 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore }; -static RegisterStoreImplementation regStore([](const std::string & uri) -> std::shared_ptr<Store> { +static RegisterStoreImplementation regStore([]( + const std::string & uri, const StoreParams & params) + -> std::shared_ptr<Store> +{ if (std::string(uri, 0, 5) != "s3://") return 0; auto store = std::make_shared<S3BinaryCacheStoreImpl>(std::shared_ptr<Store>(0), settings.get("binary-cache-secret-key-file", string("")), |