|
|
|
|
|
| Description |
| Implementation of the LUXI loader.
|
|
| Synopsis |
|
| 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 | | | genericConvert :: JSON a => String -> String -> String -> (JSValue, JSValue) -> Result 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) | | | 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
|
|
| getData :: Monad m => JSValue -> m JSValue | Source |
|
| Get values behind "data" part of the result.
|
|
| parseQueryField :: Monad m => JSValue -> m (JSValue, JSValue) | Source |
|
| Converts a (status, value) into m value, if possible.
|
|
| parseQueryRow :: Monad m => JSValue -> m [(JSValue, JSValue)] | Source |
|
| Parse a result row.
|
|
| parseQueryResult :: Monad m => JSValue -> m [[(JSValue, JSValue)]] | Source |
|
| Parse an overall query result and get the [(status, value)] list
for each element queried.
|
|
| extractArray :: Monad m => JSValue -> m [[(JSValue, JSValue)]] | Source |
|
| Prepare resulting output as parsers expect it.
|
|
| fromJValWithStatus :: (JSON a, Monad m) => (JSValue, JSValue) -> m a | Source |
|
| Testing result status for more verbose error message.
|
|
|
| :: JSON a | | | => String | The object name
| | -> String | The attribute we're trying to convert
| | -> String | The value we're trying to convert
| | -> (JSValue, JSValue) | The annotated result
| | -> Result a | | | Annotate errors when converting values with owner/attribute for
better debugging.
|
|
|
| Data querying functionality
|
|
|
| The input data for node query.
|
|
|
| The input data for instance query.
|
|
|
| The input data for cluster query.
|
|
|
| The input data for node group query.
|
|
|
| Wraper over callMethod doing node query.
|
|
|
| Wraper over callMethod doing instance query.
|
|
|
| Wrapper over callMethod doing cluster information query.
|
|
|
| Wrapper over callMethod doing group query.
|
|
|
| Parse a instance list in JSON format.
|
|
|
| Construct an instance from a JSON object.
|
|
|
| Parse a node list in JSON format.
|
|
|
| Construct a node from a JSON object.
|
|
|
| Parses the cluster tags.
|
|
|
| Parses the cluster groups.
|
|
|
| Parses a given group information.
|
|
| Main loader functionality
|
|
|
| :: String | Unix socket to use as source
| | -> IO (Result JSValue, Result JSValue, Result JSValue, Result JSValue) | | | Builds the cluster data by querying a given socket name.
|
|
|
|
| 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.
|
|
|
| Produced by Haddock version 2.6.0 |