Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.Storage.Drbd.Parser
Description
DRBD proc file parser
This module holds the definition of the parser that extracts status information from the DRBD proc file.
Synopsis
- drbdStatusParser :: [DrbdInstMinor] -> Parser DRBDStatus
- commaIntParser :: Parser Int
Documentation
drbdStatusParser :: [DrbdInstMinor] -> Parser DRBDStatus #
The parser for a whole DRBD status file.
commaIntParser :: Parser Int #
Haskell does not recognise ',' as the thousands separator every 3 digits but DRBD uses it, so we need an ah-hoc parser. If a number beginning with more than 3 digits without a comma is parsed, only the first 3 digits are considered to be valid, the rest is not consumed, and left for further parsing.