Safe Haskell | None |
---|
Functions of the metadata daemon exported for RPC
- 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 IOSource
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.
Monad MetadMonadInt | |
Functor MetadMonadInt | |
Applicative MetadMonadInt | |
MonadIO MetadMonadInt | |
MonadLog MetadMonadInt | |
MonadBase IO MetadMonadInt | |
MonadBaseControl IO MetadMonadInt |
runMetadMonadInt :: MetadMonadInt a -> MetadHandle -> IO aSource
Runs the internal part of the MetadMonad monad on a given daemon handle.
type MetadMonad = ResultT GanetiException MetadMonadIntSource
The complete monad with error handling.
Basic functions in the monad
modifyInstParams :: (InstanceParams -> MetadMonad (InstanceParams, a)) -> MetadMonad aSource
Functions available to the RPC module
echo :: String -> MetadMonad StringSource
updateConfig :: JSValue -> MetadMonad ()Source
Update the configuration with the received instance parameters.
The list of all functions exported to RPC.
exportedFunctions :: [Name]Source