Safe Haskell | Safe-Infered |
---|
DRBD proc file parser
This module holds the definition of the parser that extracts status information from the DRBD proc file.
- skipSpaces :: Parser ()
- skipSpacesAndString :: Text -> Parser a -> Parser a
- isBadEndOfLine :: Char -> Bool
- optional :: Parser a -> Parser (Maybe a)
- drbdStatusParser :: [DrbdInstMinor] -> Parser DRBDStatus
- versionInfoParser :: Parser VersionInfo
- deviceParser :: [DrbdInstMinor] -> Parser DeviceInfo
- connStateParser :: Parser ConnState
- localRemoteParser :: Parser a -> Parser (LocalRemote a)
- roleParser :: Parser Role
- diskStateParser :: Parser DiskState
- ioFlagsParser :: Parser String
- perfIndicatorsParser :: Parser PerfIndicators
- syncStatusParser :: Parser SyncStatus
- statusBarParser :: Parser ()
- sizeUnitParser :: Parser SizeUnit
- timeParser :: Parser Time
- timeUnitParser :: Parser TimeUnit
- commaIntParser :: Parser Int
- commaIntHelper :: Int -> Parser Int
- additionalInfoParser :: Parser AdditionalInfo
Documentation
skipSpaces :: Parser ()Source
skipSpacesAndString :: Text -> Parser a -> Parser aSource
isBadEndOfLine :: Char -> BoolSource
drbdStatusParser :: [DrbdInstMinor] -> Parser DRBDStatusSource
The parser for a whole DRBD status file.
versionInfoParser :: Parser VersionInfoSource
deviceParser :: [DrbdInstMinor] -> Parser DeviceInfoSource
connStateParser :: Parser ConnStateSource
localRemoteParser :: Parser a -> Parser (LocalRemote a)Source
roleParser :: Parser RoleSource
diskStateParser :: Parser DiskStateSource
ioFlagsParser :: Parser StringSource
perfIndicatorsParser :: Parser PerfIndicatorsSource
syncStatusParser :: Parser SyncStatusSource
statusBarParser :: Parser ()Source
sizeUnitParser :: Parser SizeUnitSource
timeParser :: Parser TimeSource
timeUnitParser :: Parser TimeUnitSource
commaIntParser :: Parser IntSource
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.
commaIntHelper :: Int -> Parser IntSource
additionalInfoParser :: Parser AdditionalInfoSource