flaw-oil-0.1.0.0

LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Flaw.Oil.ClientRepo

Description

 
Synopsis

Documentation

data ClientRepo Source #

Instances
Repo ClientRepo Source # 
Instance details

Defined in Flaw.Oil.ClientRepo

clientRepoRevision :: ClientRepo -> IO Revision Source #

Get global revision in client repo. Tries to increase global revision found in manifest, by using chunks, and then removes those chunks.

clientRepoGetRevisionValue :: ClientRepo -> ByteString -> IO (Revision, ByteString) Source #

Get revision and value by key.

clientRepoChange :: ClientRepo -> ByteString -> ByteString -> IO () Source #

Change value for given key.

clientRepoGetKeysPrefixed :: ClientRepo -> ByteString -> IO [ByteString] Source #

Get all keys having the string given as a prefix. Empty-valued keys are returned too for removed values, for purpose of detecting changes.

newtype ClientRepoPushState Source #

State of push, needed for pull.

Constructors

ClientRepoPushState 

pullClientRepo :: ClientRepo -> Pull -> ClientRepoPushState -> IO ClientRepoPullInfo Source #

Perform pull, i.e. process answer from server, marking pushed changes and remembering outside changes.

cleanupClientRepo :: ClientRepo -> IO () Source #

Perform cleanup after interrupted sync (i.e. after push, but without pull). It's harmless to do it without push.

syncClientRepo :: ClientRepo -> Manifest -> (Push -> IO Pull) -> IO ClientRepoPullInfo Source #

Helper function to perform sync.