Expand description
API used for spawning and managing multiple processes.
The API is implemented by ProcessManager, which spawns a Tokio task and exposes its functionalities through ProcessManagerHandle.
ProcessManagerHandle communicates asynchronously with ProcessManager via message passing,
therefore it can be cheaply cloned and used by many threads concurrently without any lock-based synchronization.
See ProcessManager and ProcessManagerHandle docs for more information.
Modules§
- serde
jsonormessage-pack - Types representing messages format and encoding.
Structs§
- Logs
Query - Type describing how to fetch logs from spawned process.
- Message
- Type used for communication between a parent and child process.
- Process
Handle ProcessManagerHandlewrapper used to interact with only one spawned process.- Process
Id - Type representing an ID of spawned process. Uses
UUIDinternally. - Process
Info - Type representing information about spawned process.
- Process
Manager ProcessManagerprovides asynchronous API for spawning and managing multiple processes.- Process
Manager Handle - Type used for communication with
ProcessManagertask.
Enums§
- GetLogs
Error - Error type returned when collecting logs from the process.
- GetProcess
Info Error - Error type returned when trying to get an information about the process.
- Kill
Process Error - Error type returned when trying to kill the process.
- Read
Message Error - Error type returned when subscribing to a messages stream.
- Receive
Deserialized Message Error - Error type returned when reading a deserializable message from a messages stream.
- Receive
Message Error - Error type returned when reading message bytes from a messages stream.
- Spawn
Process Error - Error type returned when spawning a new child process.
- Write
Message Error - Error type returned when sending a message to the process.
Constants§
- INPUT_
PIPE_ ENV_ NAME - Environment variable representing a named pipe path used to read incoming messages in the child process.
- OUTPUT_
PIPE_ ENV_ NAME - Environment variable representing a named pipe path used to send messages to the parent process.
- PROCESS_
DATA_ DIR_ ENV_ NAME - Environment variable representing the directory intended for storing temporary process data.
Traits§
- Message
Stream Ext - Adapters specific to
Message-returning streams. - Result
Stream Ext - Adapters specific to
Result-returning streams. - TryMessage
Stream Ext - Adapters for streams yielding
Result<Message, ReceiveMessageError>.