示例#1
0
 def __init__(self, name: str):
     super().__init__(name)
     self.stop_on_close: BoolOption = \
         BoolOption('stop_on_close', "Stop service when pipe is closed", default=True)
     self.data_pipe: StrOption = \
         StrOption('data_pipe', "Data Pipe Identification", required=True,
                   default='readfile')
     self.pipe_address: ZMQAddressOption = \
         ZMQAddressOption('pipe_address', "Data Pipe endpoint address",
                          required=True)
     self.pipe_mode: EnumOption = \
         EnumOption('pipe_mode', SocketMode, "Data Pipe Mode", required=True,
                    default=SocketMode.BIND)
     self.pipe_format: MIMEOption = \
         MIMEOption('pipe_format', "Pipe data format specification", required=True,
                    default=MIME('text/plain;charset=utf-8'))
     self.pipe_batch_size: IntOption = \
         IntOption('pipe_batch_size', "Data batch size", required=True, default=50)
     self.filename: StrOption = \
         StrOption('filename', "File specification", required=True)
     self.file_mode: EnumOption = \
         EnumOption('file_mode', FileOpenMode, "File I/O mode", required=False)
     self.file_format: MIMEOption = \
         MIMEOption('file_format', "File data format specification",
                    required=True, default=MIME('text/plain;charset=utf-8'))
示例#2
0
 def __init__(self, name: str):
     super().__init__(name)
     #: File specification
     self.filename: StrOption = StrOption('filename',
                                          "File specification",
                                          required=True)
     #: File I/O mode
     self.file_mode: EnumOption = \
         (EnumOption('file_mode', FileOpenMode, "File I/O mode", required=False,
                     default=FileOpenMode.WRITE))
     #: File storage type
     self.file_type: EnumOption = \
         (EnumOption('file_type', FileStorageType, "File data storage type", required=True))
示例#3
0
 def __init__(self, name: str):
     super().__init__(name)
     self.fail_on: EnumOption = \
         EnumOption('fail_on', FailOn, "Stage when dummy should raise an exception",
                    default=FailOn.NEVER)
     self.schedule: ListOption = \
         ListOption('schedule', int, "Delays for dummy scheduled actions", default=list())
示例#4
0
 def __init__(self, name: str):
     super().__init__(name)
     self.propagate_input_error: BoolOption = \
         BoolOption('propagate_input_error',
                    "When input pipe is closed with error, close output with error as well",
                    default=True)
     # Input pipe
     self.input_pipe: StrOption = \
         StrOption('input_pipe', "Data Pipe Identification", required=True)
     self.input_pipe_address: ZMQAddressOption = \
         ZMQAddressOption('input_pipe_address', "Data Pipe endpoint address", required=True)
     self.input_pipe_mode: EnumOption = \
         EnumOption('input_pipe_mode', SocketMode, "Data Pipe Mode", required=True)
     self.input_pipe_format: MIMEOption = \
         MIMEOption('input_pipe_format', "Pipe data format specification")
     self.input_batch_size: IntOption = \
         IntOption('input_batch_size', "Data batch size", required=True, default=50)
     self.input_ready_schedule_interval: IntOption = \
         IntOption('input_ready_schedule_interval',
                   "READY message schedule interval in milliseconds", required=True,
                   default=1000)
     # Output pipe
     self.output_pipe: StrOption = \
         StrOption('output_pipe', "Data Pipe Identification", required=True)
     self.output_pipe_address: ZMQAddressOption = \
         ZMQAddressOption('output_pipe_address', "Data Pipe endpoint address", required=True)
     self.output_pipe_mode: EnumOption = \
         EnumOption('output_pipe_mode', SocketMode, "Data Pipe Mode", required=True)
     self.output_pipe_format: MIMEOption = \
         MIMEOption('output_pipe_format', "Pipe data format specification")
     self.output_batch_size: IntOption = \
         IntOption('output_batch_size', "Data batch size", required=True, default=50)
     self.output_ready_schedule_interval: IntOption = \
         IntOption('output_ready_schedule_interval',
                   "READY message schedule interval in milliseconds", required=True,
                   default=1000)
示例#5
0
 def __init__(self, name: str):
     super().__init__(name)
     # Adjust default batch_size to compensate default 64K messages in producers
     self.batch_size.default = 5
     #: File specification
     self.filename: StrOption = StrOption('filename',
                                          "File specification",
                                          required=True)
     #: File data format specification
     self.file_format: MIMEOption = \
         MIMEOption('file_format', "File data format specification", required=True,
                    default=MIME('text/plain;charset=utf-8'))
     #: File I/O mode
     self.file_mode: EnumOption = \
         (EnumOption('file_mode', FileOpenMode, "File I/O mode", required=False,
                     default=FileOpenMode.WRITE))
示例#6
0
 def __init__(self, name: str):
     super().__init__(name)
     self.stop_on_close: BoolOption = \
         BoolOption('stop_on_close', "Stop service when pipe is closed", default=True)
     self.pipe: StrOption = \
         StrOption('pipe', "Data Pipe Identification", required=True)
     self.pipe_address: ZMQAddressOption = \
         ZMQAddressOption('pipe_address', "Data Pipe endpoint address", required=True)
     self.pipe_mode: EnumOption = \
         EnumOption('pipe_mode', SocketMode, "Data Pipe Mode", required=True)
     self.pipe_format: MIMEOption = \
         MIMEOption('pipe_format', "Pipe data format specification")
     self.batch_size: IntOption = \
         IntOption('batch_size', "Data batch size", required=True, default=50)
     self.ready_schedule_interval: IntOption = \
         IntOption('ready_schedule_interval',
                   "READY message schedule interval in milliseconds", required=True,
                   default=1000)