A good idea, I'll update it as suggested.
On Wed, Dec 11, 2013 at 10:14 AM, Klaus Aehlig <[email protected]> wrote: > On Tue, Dec 10, 2013 at 05:34:38PM +0100, Petr Pudlak wrote: > > Instead of passing a bare server socket around, we pass it encapsulated > > in a data type together with parameters such as read/write timeouts. > > > > Signed-off-by: Petr Pudlak <[email protected]> > > --- > > src/Ganeti/Luxi.hs | 14 ++++++++ > > src/Ganeti/Query/Server.hs | 5 ++- > > src/Ganeti/UDSServer.hs | 79 > ++++++++++++++++++++++++++++++---------------- > > 3 files changed, 67 insertions(+), 31 deletions(-) > > > > diff --git a/src/Ganeti/Luxi.hs b/src/Ganeti/Luxi.hs > > index df25a50..d4766c2 100644 > > --- a/src/Ganeti/Luxi.hs > > +++ b/src/Ganeti/Luxi.hs > > @@ -29,6 +29,7 @@ module Ganeti.Luxi > > ( LuxiOp(..) > > , LuxiReq(..) > > , Client > > + , Server > > , JobId > > , fromJobId > > , makeJobId > > @@ -67,6 +68,7 @@ import Ganeti.UDSServer > > import Ganeti.OpParams (pTagsObject) > > import Ganeti.OpCodes > > import qualified Ganeti.Query.Language as Qlang > > +import Ganeti.Runtime (GanetiDaemon(..)) > > import Ganeti.THH > > import Ganeti.Types > > > > @@ -170,6 +172,18 @@ $(genStrOfOp ''LuxiOp "strOfOp") > > -- | Type holding the initial (unparsed) Luxi call. > > data LuxiCall = LuxiCall LuxiReq JSValue > > > > +luxiConnectConfig :: ConnectConfig > > +luxiConnectConfig = ConnectConfig GanetiLuxid luxiDefRwto luxiDefRwto > > Just a suggestion: would it increase readability to have > > luxiConnectConfig = ConnectConfig { connDeaemon=GanetiLuxid > , recvTmo=luxiDefRwto > , sendTmo=luxiDefRwto > } > > Either way, LGTM. > > -- > Klaus Aehlig > Google Germany GmbH, Dienerstr. 12, 80331 Muenchen > Registergericht und -nummer: Hamburg, HRB 86891 > Sitz der Gesellschaft: Hamburg > Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores >
