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.
- Producer
Builder - 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§
- Boxed
Finalize Hook - Could be use to avoid type annotations problem
- Boxed
Prepare Hook - Could be use to avoid type annotations problem