Module manager

Source
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§

serdejson or message-pack
Types representing messages format and encoding.

Structs§

LogsQuery
Type describing how to fetch logs from spawned process.
Message
Type used for communication between a parent and child process.
ProcessHandle
ProcessManagerHandle wrapper used to interact with only one spawned process.
ProcessId
Type representing an ID of spawned process. Uses UUID internally.
ProcessInfo
Type representing information about spawned process.
ProcessManager
ProcessManager provides asynchronous API for spawning and managing multiple processes.
ProcessManagerHandle
Type used for communication with ProcessManager task.

Enums§

GetLogsError
Error type returned when collecting logs from the process.
GetProcessInfoError
Error type returned when trying to get an information about the process.
KillProcessError
Error type returned when trying to kill the process.
ReadMessageError
Error type returned when subscribing to a messages stream.
ReceiveDeserializedMessageError
Error type returned when reading a deserializable message from a messages stream.
ReceiveMessageError
Error type returned when reading message bytes from a messages stream.
SpawnProcessError
Error type returned when spawning a new child process.
WriteMessageError
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§

MessageStreamExt
Adapters specific to Message-returning streams.
ResultStreamExt
Adapters specific to Result-returning streams.
TryMessageStreamExt
Adapters for streams yielding Result<Message, ReceiveMessageError>.