Safe Haskell | None |
---|
Implementation of the Ganeti Query2 export queries.
Synopsis
- type Runtime = ResultEntry
- rpcErrToRs :: RpcError -> ResultEntry
- rpcExtractor :: Node -> Either RpcError RpcResultExportList -> [(Node, ResultEntry)]
- exportFields :: FieldList Node Runtime
- fieldsMap :: FieldMap Node Runtime
- collectLiveData :: Bool -> ConfigData -> [Node] -> IO [(Node, Runtime)]
Documentation
type Runtime = ResultEntry Source #
The parsed result of the ExportList. This is a bit tricky, in
that we already do parsing of the results in the RPC calls, so the
runtime type is a plain ResultEntry
, as we have just one type.
rpcErrToRs :: RpcError -> ResultEntry Source #
Small helper for rpc to rs.
rpcExtractor :: Node -> Either RpcError RpcResultExportList -> [(Node, ResultEntry)] Source #
Helper for extracting fields from RPC result.
collectLiveData :: Bool -> ConfigData -> [Node] -> IO [(Node, Runtime)] Source #
Collect live data from RPC query if enabled.
Note that this function is "funny": the returned rows will not be 1:1 with the input, as nodes without exports will be pruned, whereas nodes with multiple exports will be listed multiple times.