Ejemplo n.º 1
0
    def choice1(obj1=ChoiceOf(StringConstraint(2000), int)): return None


@implementer(RIHelper)
Ejemplo n.º 2
0
 def choice1(obj1=ChoiceOf(ByteStringConstraint(2000), int)):
     return None
Ejemplo n.º 3
0
from zope.interface import Interface
from foolscap.remoteinterface import RemoteInterface
from foolscap.schema import DictOf, ListOf, Any, Optional, ChoiceOf

TubID = Any()  # printable, base32 encoded
Incarnation = (Any(), ChoiceOf(Any(), None))
Header = DictOf(Any(), Any())
Event = DictOf(Any(), Any())  # this has message:, level:, facility:, etc
EventWrapper = DictOf(Any(), Any())  # this has from:, rx_time:, and d:


class RILogObserver(RemoteInterface):
    __remote_name__ = "RILogObserver.foolscap.lothar.com"

    def msg(logmsg=Event):
        return None

    def done():
        return None

    def new_incident(name=Any(), trigger=Event):
        # should this give (tubid, incarnation, trigger) like list_incidents?
        return None

    def done_with_incident_catchup():
        return None


class RILogFile(RemoteInterface):
    __remote_name__ = "RILogFile.foolscap.lothar.com"
Ejemplo n.º 4
0
from zope.interface import Interface
from foolscap.remoteinterface import RemoteInterface
from foolscap.schema import DictOf, ListOf, Any, Optional, ChoiceOf

TubID = str  # printable, base32 encoded
Incarnation = (str, ChoiceOf(str, None))
Header = DictOf(str, Any())
Event = DictOf(str, Any())  # this has message:, level:, facility:, etc
EventWrapper = DictOf(str, Any())  # this has from:, rx_time:, and d:


class RILogObserver(RemoteInterface):
    __remote_name__ = "RILogObserver.foolscap.lothar.com"

    def msg(logmsg=Event):
        pass

    def done():
        pass

    def new_incident(name=str, trigger=Event):
        # should this give (tubid, incarnation, trigger) like list_incidents?
        pass

    def done_with_incident_catchup():
        pass


class RILogFile(RemoteInterface):
    __remote_name__ = "RILogFile.foolscap.lothar.com"
Ejemplo n.º 5
0
    def choice1(obj1=ChoiceOf(ByteStringConstraint(2000), int)): return None

class HelperTarget(Referenceable):