Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.THH.HsRPC
Description
Creates a client out of list of RPC server components.
Synopsis
- data RpcClientMonad a
- runRpcClient :: (MonadBase IO m, MonadError GanetiException m) => RpcClientMonad a -> Client -> m a
- mkRpcCall :: Name -> Q [Dec]
- mkRpcCalls :: [Name] -> Q [Dec]
Documentation
data RpcClientMonad a #
The monad for all client RPC functions. Given a client value, it runs the RPC call in IO and either retrieves the result or the error.
Instances
runRpcClient :: (MonadBase IO m, MonadError GanetiException m) => RpcClientMonad a -> Client -> m a #
Given a client run a given client RPC action.
mkRpcCall :: Name -> Q [Dec] #
Given a server RPC function (such as from WConfd.Core), creates
the corresponding client function. The monad of the result type of the
given function is replaced by RpcClientMonad
and the new function
is implemented to issue a RPC call to the server.
mkRpcCalls :: [Name] -> Q [Dec] #