| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
HNormalise
- normaliseRsyslog :: Rsyslog -> Maybe ByteString
- normaliseJsonInput :: ByteString -> Normalised
- normaliseText :: Text -> Normalised
- parseMessage :: Parser (Text, ParseResult)
- data Normalised
Documentation
Arguments
| :: Rsyslog | Incoming rsyslog information |
| -> Maybe ByteString | IF the conversion succeeded the JSON encoded rsyslog message to forward |
The normaliseRsyslog function returns an NRSyslog structure tranformed to a ByteString or Nothing
when parsing fails
Arguments
| :: ByteString | Input representing an rsyslog message in JSON format |
| -> Normalised | Transformed or Original result |
The normaliseJsonInput function converts a ByteString to a normalised message or keeps the original if
the conversion (parsing) fails.
Arguments
| :: Text | Input |
| -> Normalised | Transformed or Original result |
The normaliseText function converts a Text to a normalised message or keeps the original (in ByteString)
format if the conversion fails
parseMessage :: Parser (Text, ParseResult) Source #
The parseMessage function will try and use each configured parser to normalise the input it's given
data Normalised Source #
Constructors
| Transformed !ByteString | A |
| Original !ByteString | An |