Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data WriterHandle (f :: Type -> Type)
- openWriter :: Foldable f => f String -> FilePath -> IO (WriterHandle f)
- closeWriter :: WriterHandle f -> IO ()
- withWriter :: Foldable f => f String -> FilePath -> (WriterHandle f -> IO a) -> IO a
- write :: Foldable f => WriterHandle f -> f Int64 -> Builder -> IO Int
- flush :: WriterHandle f -> IO ()
- getLastSeqNo :: WriterHandle f -> IO Int
Writer interface
data WriterHandle (f :: Type -> Type) Source #
Instances
NFData (WriterHandle f) Source # | |
Defined in Database.Franz.Writer rnf :: WriterHandle f -> () # |
:: Foldable f | |
=> f String | index names: a fixed-length collection of the names of indices for this stream. Use Proxy if you don't want any indices. If you want only one type of index, use `Identity ""`. |
-> FilePath | |
-> IO (WriterHandle f) |
closeWriter :: WriterHandle f -> IO () Source #
Flush any pending data and close a WriterHandle
.
withWriter :: Foldable f => f String -> FilePath -> (WriterHandle f -> IO a) -> IO a Source #
flush :: WriterHandle f -> IO () Source #
Flush the changes.
getLastSeqNo :: WriterHandle f -> IO Int Source #
Get the sequential number of the last item item written.