Revision c03224f6 src/Ganeti/Rpc.hs
b/src/Ganeti/Rpc.hs | ||
---|---|---|
68 | 68 |
|
69 | 69 |
, RpcCallExportList(..) |
70 | 70 |
, RpcResultExportList(..) |
71 |
|
|
72 |
, rpcTimeoutFromRaw -- FIXME: Not used anywhere |
|
73 | 71 |
) where |
74 | 72 |
|
75 | 73 |
import Control.Arrow (second) |
... | ... | |
123 | 121 |
|
124 | 122 |
type ERpcError = Either RpcError |
125 | 123 |
|
126 |
-- | Basic timeouts for RPC calls. |
|
127 |
$(declareIADT "RpcTimeout" |
|
128 |
[ ( "Urgent", 'C.rpcTmoUrgent ) |
|
129 |
, ( "Fast", 'C.rpcTmoFast ) |
|
130 |
, ( "Normal", 'C.rpcTmoNormal ) |
|
131 |
, ( "Slow", 'C.rpcTmoSlow ) |
|
132 |
, ( "FourHours", 'C.rpcTmo4hrs ) |
|
133 |
, ( "OneDay", 'C.rpcTmo1day ) |
|
134 |
]) |
|
135 |
|
|
136 | 124 |
-- | A generic class for RPC calls. |
137 | 125 |
class (J.JSON a) => RpcCall a where |
138 | 126 |
-- | Give the (Python) name of the procedure. |
Also available in: Unified diff