Safe Haskell | Safe-Infered |
---|
Implementation of the Ganeti confd server functionality.
- type CheckResult = ()
- type PrepResult = Config Snap ()
- latestAPIVersion :: Int
- data Report
- = StatelessR (IO DCReport)
- | StatefulR (Maybe CollectorData -> IO DCReport)
- data DataCollector = DataCollector {
- dName :: String
- dCategory :: Maybe DCCategory
- dKind :: DCKind
- dReport :: Report
- dUpdate :: Maybe (Maybe CollectorData -> IO CollectorData)
- collectors :: [DataCollector]
- defaultHttpConf :: FilePath -> FilePath -> Config Snap ()
- checkMain :: CheckFn CheckResult
- prepMain :: PrepFn CheckResult PrepResult
- versionQ :: Snap ()
- version1Api :: MVar CollectorMap -> Snap ()
- dcListItem :: DataCollector -> JSValue
- listHandler :: Snap ()
- reportHandler :: MVar CollectorMap -> Snap ()
- allReports :: MVar CollectorMap -> 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 -> Snap ()
- monitoringApi :: MVar CollectorMap -> Snap ()
- collect :: CollectorMap -> DataCollector -> IO CollectorMap
- collection :: CollectorMap -> IO CollectorMap
- collectord :: MVar CollectorMap -> IO ()
- main :: MainFn CheckResult PrepResult
Types and constants definitions
type CheckResult = ()Source
type PrepResult = Config Snap ()Source
latestAPIVersion :: IntSource
StatelessR (IO DCReport) | |
StatefulR (Maybe CollectorData -> IO DCReport) |
data DataCollector Source
DataCollector | |
|
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 -> Snap ()Source
dcListItem :: DataCollector -> JSValueSource
listHandler :: Snap ()Source
reportHandler :: MVar CollectorMap -> Snap ()Source
allReports :: MVar CollectorMap -> 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 -> Snap ()Source
monitoringApi :: MVar CollectorMap -> Snap ()Source
collect :: CollectorMap -> DataCollector -> IO CollectorMapSource
collection :: CollectorMap -> IO CollectorMapSource
collectord :: MVar CollectorMap -> IO ()Source
main :: MainFn CheckResult PrepResultSource
Main function.