ganeti

Safe HaskellNone

Ganeti.THH.PyRPC

Description

Combines the construction of RPC server components and their Python stubs.

Synopsis

Documentation

nest' :: Doc -> DocSource

apply :: String -> [Doc] -> DocSource

lowerFirst :: String -> StringSource

upperFirst :: String -> StringSource

toFunc :: String -> [Type] -> Q DocSource

nameToFunc :: Name -> Q DocSource

namesToClass :: String -> Doc -> [Name] -> Q DocSource

genPyUDSRpcStubSource

Arguments

:: String

the name of the class to be generated

-> String

the name of the constant from constants.py holding the path to a UDS socket

-> [Name]

names of functions to include

-> Q Doc 

Takes a list of function names and creates a RPC handler that delegates calls to them, as well as writes out the corresponding Python stub.

See mkRpcM for the requirements on the passed functions and the returned expression.

genPyUDSRpcStubStrSource

Arguments

:: String

the name of the class to be generated

-> String

the constant in pathutils.py holding the socket path

-> [Name]

functions to include

-> Q Exp