From 95d20dfde94fc715f39e2ffeadefc5b5bd5e570b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 29 Apr 2016 16:26:16 +0200 Subject: Allow parameters in store URIs This is to allow store-specific configuration, e.g. s3://my-cache?compression=bzip2&secret-key=/path/to/key. --- src/libstore/store-api.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/libstore/store-api.hh') 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> getDefaultSubstituters(); /* Store implementation registration. */ -typedef std::function(const std::string & uri)> OpenStore; +typedef std::map StoreParams; + +typedef std::function( + const std::string & uri, const StoreParams & params)> OpenStore; struct RegisterStoreImplementation { -- cgit 1.4.1