Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Storage
- newStorage :: MonadIO m => RawFilePath -> m Storage
- getStoragePath :: Storage -> StorageAddress -> RawFilePath
- scopeStorage :: MonadIO m => Storage -> StorageAddress -> m Storage
- syncThread :: MonadIO m => Storage -> (Int -> m ()) -> m Void
- newtype StorageAddress = StorageAddress ByteString
- writeStorage :: Storage -> StorageAddress -> LByteString -> STM ()
- readStorage :: MonadIO m => Storage -> StorageAddress -> m (Maybe LByteString)
Documentation
newStorage :: MonadIO m => RawFilePath -> m Storage #
getStoragePath :: Storage -> StorageAddress -> RawFilePath #
scopeStorage :: MonadIO m => Storage -> StorageAddress -> m Storage #
syncThread :: MonadIO m => Storage -> (Int -> m ()) -> m Void #
The syncThread must be started for the storage to persist
Read/Write
newtype StorageAddress #
Instances
writeStorage :: Storage -> StorageAddress -> LByteString -> STM () #
readStorage :: MonadIO m => Storage -> StorageAddress -> m (Maybe LByteString) #