EventStore Haskell TCP client

That driver supports 100% of EventStore features !
More information about the GetEventStore database can be found there: https://geteventstore.com/
Requirements
- 64bits system
- GHC >= 7.8.3
- Cabal >= 1.18
- EventStore >= 3.0.0 (>= 3.1.0 if you want competing consumers).
Note: If you use this client version >= to 1.1
, it will only supports EventStore >= 4.0.0.
Install
$ cabal update
$ cabal install eventstore
$ git clone https://github.com/YoEight/eventstore.git
$ cd eventstore
$ cabal install --only-dependencies
$ cabal configure
$ cabal install
How to test
Tests are available. Those assume a server is running on 127.0.0.1
and 1113
port.
$ cabal install --only-dependencies --enable-tests
$ cabal configure --enable-tests
$ cabal test
How to use
This code snippet showcases client version >= 1.1
.
module Main where
import Control.Concurrent.Async (wait)
import Data.Aeson
import Database.EventStore
main :: IO ()
main = do
conn <- connect defaultSettings (Static "127.0.0.1" 1113)
let js = object ["isHaskellTheBest" .= True]
evt = createEvent "programming" Nothing (withJson js)
as <- sendEvent conn "languages" anyVersion evt Nothing
_ <- wait as
shutdown conn
waitTillClosed conn
Notes
That library was tested on Linux and OSX.
Contributions and bug reports are welcome!
BSD3 License
-Yorick Laupa