Safe Haskell | None |
---|
Ganeti.Query.Instance
Contents
Description
Implementation of the Ganeti Query2 instance queries.
Synopsis
- type Runtime = Either RpcError LiveInfo
- fieldsMap :: FieldMap Instance Runtime
- instanceAliases :: [(FieldName, FieldName)]
- instanceFields :: FieldList Instance Runtime
- getInstanceInfo :: [(String, ERpcError RpcResultAllInstancesInfo)] -> Instance -> ERpcError (Maybe (InstanceInfo, Bool))
- collectLiveData :: Bool -> ConfigData -> [String] -> [Instance] -> IO [(Instance, Runtime)]
Documentation
type Runtime = Either RpcError LiveInfo Source #
Runtime containing the LiveInfo
. See the genericQuery function in
the Query.hs file for an explanation of the terms used.
instanceAliases :: [(FieldName, FieldName)] Source #
The instance aliases.
Helper functions for node property retrieval
Various helper functions for property retrieval
Live fields functionality
Functionality related to status and operational status extraction
Helper functions extracting information as necessary for the generic query
getInstanceInfo :: [(String, ERpcError RpcResultAllInstancesInfo)] -> Instance -> ERpcError (Maybe (InstanceInfo, Bool)) Source #
Retrieves the instance information if it is present anywhere in the all instances RPC result. Notes if it originates from the primary node. An error is delivered if there is no result, and the primary node is down.
Arguments
:: Bool | Live queries allowed |
-> ConfigData | The cluster config |
-> [String] | The requested fields |
-> [Instance] | The instance objects |
-> IO [(Instance, Runtime)] |
Collect live data from RPC query if enabled.