about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-29T14·26+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-29T14·26+0200
commit95d20dfde94fc715f39e2ffeadefc5b5bd5e570b (patch)
treea13f06fd7b0d28f2610eb87dcb4a52203742e51d /src/libstore/store-api.hh
parentaa3bc3d5dcff5ff6567a4e00320cb9caa28c5a93 (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/store-api.hh')
-rw-r--r--src/libstore/store-api.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 87b8e884759c..cdde0be7b91c 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -192,7 +192,7 @@ public:
 
     virtual ~Store() { }
 
-    virtual std::string getUri();
+    virtual std::string getUri() = 0;
 
     /* Check whether a path is valid. */
     bool isValidPath(const Path & path);
@@ -540,7 +540,10 @@ std::list<ref<Store>> getDefaultSubstituters();
 
 
 /* Store implementation registration. */
-typedef std::function<std::shared_ptr<Store>(const std::string & uri)> OpenStore;
+typedef std::map<std::string, std::string> StoreParams;
+
+typedef std::function<std::shared_ptr<Store>(
+    const std::string & uri, const StoreParams & params)> OpenStore;
 
 struct RegisterStoreImplementation
 {