Revision 0fbc8447 src/Ganeti/Luxi.hs

b/src/Ganeti/Luxi.hs
29 29
  ( LuxiOp(..)
30 30
  , LuxiReq(..)
31 31
  , Client
32
  , Server
32 33
  , JobId
33 34
  , fromJobId
34 35
  , makeJobId
......
67 68
import Ganeti.OpParams (pTagsObject)
68 69
import Ganeti.OpCodes
69 70
import qualified Ganeti.Query.Language as Qlang
71
import Ganeti.Runtime (GanetiDaemon(..))
70 72
import Ganeti.THH
71 73
import Ganeti.Types
72 74

  
......
170 172
-- | Type holding the initial (unparsed) Luxi call.
171 173
data LuxiCall = LuxiCall LuxiReq JSValue
172 174

  
175
luxiConnectConfig :: ConnectConfig
176
luxiConnectConfig = ConnectConfig { connDaemon = GanetiLuxid
177
                                  , recvTmo    = luxiDefRwto
178
                                  , sendTmo    = luxiDefRwto
179
                                  }
180

  
181
-- | Connects to the master daemon and returns a luxi Client.
182
getLuxiClient :: String -> IO Client
183
getLuxiClient = connectClient luxiConnectConfig luxiDefCtmo
184

  
185
-- | Creates and returns a server endpoint.
186
getLuxiServer :: Bool -> FilePath -> IO Server
187
getLuxiServer = connectServer luxiConnectConfig
188

  
189

  
173 190
-- | Serialize a request to String.
174 191
buildCall :: LuxiOp  -- ^ The method
175 192
          -> String  -- ^ The serialized form

Also available in: Unified diff