add incremental hashing interface to Backend

As yet unused.

Backend.External could perhaps implement it too, although that would
involve sending chunks of data to it via a pipe or something, so likely
to be slow.
This commit is contained in:
Joey Hess 2021-02-09 15:00:51 -04:00
parent fd51b0cd83
commit ed684f651e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 204 additions and 65 deletions

View file

@ -67,6 +67,7 @@ makeBackend' ebname@(ExternalBackendName bname) hasext (Right p) = do
-- bump if progress handling is later added.
nullMeterUpdate
else Nothing
, verifyKeyContentIncrementally = Nothing
, canUpgradeKey = Nothing
, fastMigrate = Nothing
, isStableKey = const isstable
@ -80,6 +81,7 @@ unavailBackend (ExternalBackendName bname) hasext =
{ backendVariety = ExternalKey bname hasext
, genKey = Nothing
, verifyKeyContent = Nothing
, verifyKeyContentIncrementally = Nothing
, canUpgradeKey = Nothing
, fastMigrate = Nothing
, isStableKey = const False