implemented serveGet and clientGet
Both are only at bare proof of concept stage. Still need to deal with signaling validity and invalidity, and checking it. And there's a bad bug: After -JN*2 requests, another request hangs! So, I think it's failing to free up the Annex worker and end of request lifetime. Perhaps I need to use this: https://docs.servant.dev/en/stable/cookbook/managed-resource/ManagedResource.html
This commit is contained in:
parent
f9b7ce7224
commit
1e0f92a5a1
5 changed files with 177 additions and 31 deletions
|
@ -310,6 +310,10 @@ data LocalF c
|
|||
-- content been transferred.
|
||||
| StoreContentTo FilePath (Maybe IncrementalVerifier) Offset Len (Proto L.ByteString) (Proto (Maybe Validity)) ((Bool, Verification) -> c)
|
||||
-- ^ Like StoreContent, but stores the content to a temp file.
|
||||
| SendContentWith (L.ByteString -> Annex (Maybe Validity -> Annex Bool)) (Proto L.ByteString) (Proto (Maybe Validity)) (Bool -> c)
|
||||
-- ^ Reads content from the Proto L.ByteString and sends it to the
|
||||
-- callback. The callback must consume the whole lazy ByteString,
|
||||
-- before it returns a validity checker.
|
||||
| SetPresent Key UUID c
|
||||
| CheckContentPresent Key (Bool -> c)
|
||||
-- ^ Checks if the whole content of the key is locally present.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue