Safe Haskell | Safe-Infered |
---|
Implementation of the Ganeti confd server functionality.
- type ConfigAccess = String -> DataCollectorConfig
- type CheckResult = ()
- type PrepResult = Config Snap ()
- latestAPIVersion :: Int
- defaultHttpConf :: FilePath -> FilePath -> Config Snap ()
- checkMain :: CheckFn CheckResult
- prepMain :: PrepFn CheckResult PrepResult
- versionQ :: Snap ()
- version1Api :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()
- collectorConfigs :: ConfdClient -> IO ConfigAccess
- activeCollectors :: MVar ConfigAccess -> IO [DataCollector]
- dcListItem :: DataCollector -> JSValue
- listHandler :: MVar ConfigAccess -> Snap ()
- reportHandler :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()
- allReports :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()
- getReport :: MVar CollectorMap -> DataCollector -> IO DCReport
- getColData :: String -> MVar CollectorMap -> IO (Maybe CollectorData)
- catFromName :: String -> Result (Maybe DCCategory)
- errorReport :: Snap ()
- error404 :: Snap ()
- oneReport :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()
- monitoringApi :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()
- collect :: CollectorMap -> DataCollector -> IO CollectorMap
- collection :: CollectorMap -> MVar ConfigAccess -> IO CollectorMap
- seconds :: Int -> Integer
- collectord :: MVar CollectorMap -> MVar ConfigAccess -> IO ()
- main :: MainFn CheckResult PrepResult
Types and constants definitions
type ConfigAccess = String -> DataCollectorConfigSource
type CheckResult = ()Source
type PrepResult = Config Snap ()Source
latestAPIVersion :: IntSource
Configuration handling
defaultHttpConf :: FilePath -> FilePath -> Config Snap ()Source
Helper functions
checkMain :: CheckFn CheckResultSource
Check function for the monitoring agent.
prepMain :: PrepFn CheckResult PrepResultSource
Prepare function for monitoring agent.
Query answers
version1Api :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()Source
activeCollectors :: MVar ConfigAccess -> IO [DataCollector]Source
dcListItem :: DataCollector -> JSValueSource
listHandler :: MVar ConfigAccess -> Snap ()Source
reportHandler :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()Source
allReports :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()Source
getReport :: MVar CollectorMap -> DataCollector -> IO DCReportSource
getColData :: String -> MVar CollectorMap -> IO (Maybe CollectorData)Source
catFromName :: String -> Result (Maybe DCCategory)Source
errorReport :: Snap ()Source
oneReport :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()Source
monitoringApi :: MVar CollectorMap -> MVar ConfigAccess -> Snap ()Source
collect :: CollectorMap -> DataCollector -> IO CollectorMapSource
collection :: CollectorMap -> MVar ConfigAccess -> IO CollectorMapSource
collectord :: MVar CollectorMap -> MVar ConfigAccess -> IO ()Source
main :: MainFn CheckResult PrepResultSource
Main function.