Safe Haskell | Safe-Infered |
---|
Implementation of the Ganeti Query2 export queries.
- 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 = ResultEntrySource
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.
rpcExtractor :: Node -> Either RpcError RpcResultExportList -> [(Node, ResultEntry)]Source
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.