Safe Haskell | Safe-Infered |
---|
Implementation of the LUXI loader.
- getData :: Monad m => JSValue -> m JSValue
- parseQueryField :: Monad m => JSValue -> m (JSValue, JSValue)
- parseQueryRow :: Monad m => JSValue -> m [(JSValue, JSValue)]
- parseQueryResult :: Monad m => JSValue -> m [[(JSValue, JSValue)]]
- extractArray :: Monad m => JSValue -> m [[(JSValue, JSValue)]]
- fromJValWithStatus :: (JSON a, Monad m) => (JSValue, JSValue) -> m a
- 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 :: NameAssoc -> JSValue -> Result [(String, Instance)]
- parseInstance :: 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 :: (Result JSValue, Result JSValue, Result JSValue, Result JSValue) -> Result ClusterData
- loadData :: String -> IO (Result ClusterData)
Utility functions
parseQueryField :: Monad m => JSValue -> m (JSValue, JSValue)Source
parseQueryRow :: Monad m => JSValue -> m [(JSValue, JSValue)]Source
parseQueryResult :: Monad m => JSValue -> m [[(JSValue, JSValue)]]Source
extractArray :: Monad m => JSValue -> m [[(JSValue, JSValue)]]Source
fromJValWithStatus :: (JSON a, Monad m) => (JSValue, JSValue) -> m aSource
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 :: NameAssoc -> JSValue -> Result [(String, Instance)]Source
parseInstance :: NameAssoc -> [(JSValue, JSValue)] -> Result (String, Instance)Source
getClusterData :: JSValue -> Result ([String], IPolicy, String)Source
parseGroup :: [(JSValue, JSValue)] -> Result (String, Group)Source
Main loader functionality
parseData :: (Result JSValue, Result JSValue, Result JSValue, Result JSValue) -> Result ClusterDataSource
Converts the output of readData
into the internal cluster
representation.
:: String | Unix socket to use as source |
-> IO (Result ClusterData) |
Top level function for data loading.