hslogstash-0.3.0: A library to work with, or as, a logstash server

Safe HaskellNone




sinkSocketRetry :: MonadResource m => IO Socket -> Int -> IO () -> Consumer ByteString m ()Source

Tentative safe Sink for a Socket. It should try reopening the Socket every time the call to sendAll fails. This means that some bytes might be sent multiple times, if the socket fails in the middle of the sendAll call. This is targeted at protocols where only a full message makes sense.

This is used to send a full JSON object to Logstash.

tcpSinkRetry :: MonadResource m => ByteString -> Int -> Int -> IO () -> Consumer ByteString m ()Source

A specialization of the previous Sink that opens a TCP connection.