about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-04T14·34+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-04T14·34+0200
commit42c5774e78a9f1422dee9c35adb9c056aa994d3b (patch)
tree6d162197e5993948b7f62446a5fd66ec00d74768 /src/libstore/store-api.hh
parentb7203e853e3b928e1a7fb081fce379f023e935bb (diff)
Sort substituters by priority
Fixes #1438.
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index c625a36303..cada37653e 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -590,6 +590,11 @@ public:
        a notion of connection. Otherwise this is a no-op. */
     virtual void connect() { };
 
+    /* Get the priority of the store, used to order substituters. In
+       particular, binary caches can specify a priority field in their
+       "nix-cache-info" file. Lower value means higher priority. */
+    virtual int getPriority() { return 0; }
+
 protected:
 
     Stats stats;