summaryrefslogtreecommitdiff
path: root/Types/Backend.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-08-01 18:00:47 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-08-01 18:00:47 -0400
commitddbf5df3c9940473663a6e562f8ee3583867046e (patch)
tree40dc81d0c2693b5fd5fc3e5b9cd8df17e0505ec5 /Types/Backend.hs
parent154cb13180fbe877d2030d83a415b30150ac7298 (diff)
parentd0a8e3d6217f2924b864393d425b6d7582370d07 (diff)
Merge branch 'newchunks'
I am happy enough with this to make it live!
Diffstat (limited to 'Types/Backend.hs')
-rw-r--r--Types/Backend.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Types/Backend.hs b/Types/Backend.hs
index 7eb59b6e2..5c5855bc3 100644
--- a/Types/Backend.hs
+++ b/Types/Backend.hs
@@ -15,9 +15,16 @@ import Types.KeySource
data BackendA a = Backend
{ name :: String
, getKey :: KeySource -> a (Maybe Key)
+ -- Checks the content of a key.
, fsckKey :: Maybe (Key -> FilePath -> a Bool)
+ -- Checks if a key can be upgraded to a better form.
, canUpgradeKey :: Maybe (Key -> Bool)
+ -- Checks if there is a fast way to migrate a key to a different
+ -- backend (ie, without re-hashing).
, fastMigrate :: Maybe (Key -> BackendA a -> Maybe Key)
+ -- Checks if a key is known (or assumed) to always refer to the
+ -- same data.
+ , isStableKey :: Key -> Bool
}
instance Show (BackendA a) where