Module ext

Source
Expand description

This module provides wrappers to construct task producer & consumer. The producer sends tasks via stdin of the consumer, which should be a sub-process.

Structs§

Producer
Producer sends tasks to the child, and waits for the responses. It impl Processor.
ProducerBuilder
Builder for Producer
Request
Request contains the required data to be sent to the consumer.
Response
Response contains the output for the specific task, and error message if exists.

Functions§

dump_error_resp_env
Dump error resp env key
run_consumer
Starts the consumer with the processor impl with Default.
run_consumer_with_proc
Starts the consumer with the given processor. In most cases, this is used in a sub-process Please be awrae that you should let the logs output into stderr, or just disable all logs from this process, otherwise the producer colud be confused.

Type Aliases§

BoxedFinalizeHook
Could be use to avoid type annotations problem
BoxedPrepareHook
Could be use to avoid type annotations problem