Safe Haskell | None |
---|---|
Language | Haskell2010 |
Receive logstash messages from the network, and process them with a conduit.
- logstashListener :: Int -> Sink (Either ByteString LogstashMessage) (ResourceT IO) () -> IO ()
- tryDecode :: FromJSON a => ByteString -> Either ByteString a
Documentation
:: Int | Port number |
-> Sink (Either ByteString LogstashMessage) (ResourceT IO) () | |
-> IO () |
This creates a logstash network listener, given a TCP port. It will try to decode the Bytestring as UTF-8, and, if it fails, as Latin1.
tryDecode :: FromJSON a => ByteString -> Either ByteString a Source
Decodes JSON data from ByteStrings that can be encoded in UTF-8 or latin1.