Пример #1
0
    def init(self):
        guard = adm.Guard()
        self.khdl = KeventHandler(guard)
        apihdl = APIHandler(guard)

        self.poller = mq.Poller()
        self.poller.register(self.khdl)
        self.poller.register(apihdl)
Пример #2
0
 def init(self):
     self.poller = mq.Poller()
     pub = mq.pub_socket('eventd')
     self.ksub = KernelEventSub(pub)
     self.usub = UserspaceEventSub(pub)
     self.uevent = UEventSub(pub)
     self.poller.register(self.ksub)
     self.poller.register(self.usub)
     self.poller.register(self.uevent)
Пример #3
0
 def init(self):
     self.poller = mq.Poller()
     conn = gnsq.Nsqd(address=config.zoofs.ip, http_port=4151)
     pub = mq.pub_socket('eventd')
     self.ksub = KernelEventSub(pub)
     self.usub = UserspaceEventSub(pub)
     self.uevent = UEventSub(pub, conn)
     self.poller.register(self.ksub)
     self.poller.register(self.usub)
     self.poller.register(self.uevent)
Пример #4
0
 def init(self):
     self._poller = mq.Poller()
     self._rsp = Response()
     self._poller.register(self._rsp)
Пример #5
0
 def init(self):
     self.poller = mq.Poller()
     self.usub = UEventSub()
     self.poller.register(self.usub)
Пример #6
0
 def init(self):
     self._poller = mq.Poller()
     conn = gnsq.Nsqd(address=config.zoofs.ip, http_port=config.zoofs.port)
     self._rsp = Response(conn)
     self._poller.register(self._rsp)
Пример #7
0
 def init(self):
     self.poller = mq.Poller()
     self.usvr = UEventSvr()
     self.poller.register(self.usvr)