Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.Query.Instance
Description
Implementation of the Ganeti Query2 instance queries.
Synopsis
- type Runtime = Either RpcError LiveInfo
- fieldsMap :: FieldMap Instance Runtime
- collectLiveData :: Bool -> ConfigData -> [String] -> [Instance] -> IO [(Instance, Runtime)]
- getInstanceInfo :: [(String, ERpcError RpcResultAllInstancesInfo)] -> Instance -> ERpcError (Maybe (InstanceInfo, Bool))
- instanceFields :: FieldList Instance Runtime
- instanceAliases :: [(FieldName, FieldName)]
Documentation
type Runtime = Either RpcError LiveInfo #
Runtime containing the LiveInfo
. See the genericQuery function in
the Query.hs file for an explanation of the terms used.
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.
getInstanceInfo :: [(String, ERpcError RpcResultAllInstancesInfo)] -> Instance -> ERpcError (Maybe (InstanceInfo, Bool)) #
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.
instanceFields :: FieldList Instance Runtime #
The instance fields.
instanceAliases :: [(FieldName, FieldName)] #
The instance aliases.