Esempio n. 1
0
 def get_options(cls):
     """
     Schema for options validation and assignment of default values.
     """
     return {
         'hosts': Or(*make_iterables([str, ContextValue])),
         'ports': Or(*make_iterables([int, ContextValue])),
         Optional('message_pattern', default=zmq.PAIR):
             Or(zmq.PAIR, zmq.REQ, zmq.SUB, zmq.PULL),
         Optional('connect_at_start', default=True): bool
     }
Esempio n. 2
0
 def get_options(cls):
     """
     Schema for options validation and assignment of default values.
     """
     return {
         "hosts":
         Or(*make_iterables([str, ContextValue])),
         "ports":
         Or(*make_iterables([int, ContextValue])),
         ConfigOption("message_pattern", default=zmq.PAIR):
         Or(zmq.PAIR, zmq.REQ, zmq.SUB, zmq.PULL),
         ConfigOption("connect_at_start", default=True):
         bool,
     }
Esempio n. 3
0
 def configuration_schema(self):
     """
     Schema for options validation and assignment of default values.
     """
     overrides = {
         'hosts':
         Or(*make_iterables([str, ContextValue])),
         'ports':
         Or(*make_iterables([int, ContextValue])),
         Optional('message_pattern', default=zmq.PAIR):
         Or(zmq.PAIR, zmq.REQ, zmq.SUB, zmq.PULL),
         Optional('connect_at_start', default=True):
         bool
     }
     return self.inherit_schema(overrides, super(ZMQClientConfig, self))