Safe Haskell | None |
---|
Functions of the metadata daemon exported for RPC
Synopsis
- data MetadHandle = MetadHandle {
- mhInstParams :: MVar InstanceParams
- type MetadMonadIntType = ReaderT MetadHandle IO
- newtype MetadMonadInt a = MetadMonadInt {}
- runMetadMonadInt :: MetadMonadInt a -> MetadHandle -> IO a
- type MetadMonad = ResultT GanetiException MetadMonadInt
- metadHandle :: MetadMonad MetadHandle
- instParams :: MetadMonad InstanceParams
- modifyInstParams :: (InstanceParams -> MetadMonad (InstanceParams, a)) -> MetadMonad a
- echo :: String -> MetadMonad String
- updateConfig :: JSValue -> MetadMonad ()
- exportedFunctions :: [Name]
The monad in which all the Metad functions execute
data MetadHandle Source #
MetadHandle | |
|
type MetadMonadIntType = ReaderT MetadHandle IO Source #
A type alias for easier referring to the actual content of the monad when implementing its instances.
newtype MetadMonadInt a Source #
The internal part of the monad without error handling.
Instances
runMetadMonadInt :: MetadMonadInt a -> MetadHandle -> IO a Source #
Runs the internal part of the MetadMonad monad on a given daemon handle.
type MetadMonad = ResultT GanetiException MetadMonadInt Source #
The complete monad with error handling.
Basic functions in the monad
modifyInstParams :: (InstanceParams -> MetadMonad (InstanceParams, a)) -> MetadMonad a Source #
Functions available to the RPC module
echo :: String -> MetadMonad String Source #
updateConfig :: JSValue -> MetadMonad () Source #
Update the configuration with the received instance parameters.
The list of all functions exported to RPC.
exportedFunctions :: [Name] Source #