Safe Haskell | Safe-Infered |
---|
Implementation of the LUXI loader.
- annotateConvert :: String -> String -> String -> Result a -> Result a
- genericConvert :: JSON a => String -> String -> String -> (JSValue, JSValue) -> Result a
- convertArrayMaybe :: JSON a => String -> String -> String -> (JSValue, JSValue) -> Result [Maybe a]
- queryNodesMsg :: LuxiOp
- queryInstancesMsg :: LuxiOp
- queryClusterInfoMsg :: LuxiOp
- queryGroupsMsg :: LuxiOp
- queryNodes :: Client -> IO (Result JSValue)
- queryInstances :: Client -> IO (Result JSValue)
- queryClusterInfo :: Client -> IO (Result JSValue)
- queryGroups :: Client -> IO (Result JSValue)
- getInstances :: Bool -> NameAssoc -> JSValue -> Result [(String, Instance)]
- parseInstance :: Bool -> NameAssoc -> [(JSValue, JSValue)] -> Result (String, Instance)
- getNodes :: NameAssoc -> JSValue -> Result [(String, Node)]
- parseNode :: NameAssoc -> [(JSValue, JSValue)] -> Result (String, Node)
- getClusterData :: JSValue -> Result ([String], IPolicy, String)
- getGroups :: JSValue -> Result [(String, Group)]
- parseGroup :: [(JSValue, JSValue)] -> Result (String, Group)
- readData :: String -> IO (Result JSValue, Result JSValue, Result JSValue, Result JSValue)
- parseData :: Bool -> (Result JSValue, Result JSValue, Result JSValue, Result JSValue) -> Result ClusterData
- loadData :: Bool -> String -> IO (Result ClusterData)
Utility functions
annotateConvert :: String -> String -> String -> Result a -> Result aSource
genericConvert :: JSON a => String -> String -> String -> (JSValue, JSValue) -> Result aSource
convertArrayMaybe :: JSON a => String -> String -> String -> (JSValue, JSValue) -> Result [Maybe a]Source
Data querying functionality
queryNodes :: Client -> IO (Result JSValue)Source
queryInstances :: Client -> IO (Result JSValue)Source
queryClusterInfo :: Client -> IO (Result JSValue)Source
queryGroups :: Client -> IO (Result JSValue)Source
getInstances :: Bool -> NameAssoc -> JSValue -> Result [(String, Instance)]Source
parseInstance :: Bool -> NameAssoc -> [(JSValue, JSValue)] -> Result (String, Instance)Source
getClusterData :: JSValue -> Result ([String], IPolicy, String)Source
parseGroup :: [(JSValue, JSValue)] -> Result (String, Group)Source
Main loader functionality
:: Bool | use only state-of-record (SoR) data |
-> (Result JSValue, Result JSValue, Result JSValue, Result JSValue) | |
-> Result ClusterData |
Converts the output of readData
into the internal cluster
representation.
:: Bool | use only state-of-record (SoR) data |
-> String | Unix socket to use as source |
-> IO (Result ClusterData) |
Top level function for data loading.