Expand description
sopht is a program for managing long running processes in a (slightly) more sophisticated way than something like tmux. this library currently implements the IPC protocol sopht uses to pass commands and responses between clients and a server, as well as the machinery required for starting and managing child processes
Re-exports§
pub use ipc::create_client_connection;pub use ipc::socket_file_path;pub use ipc::Connection;pub use manager::ChangeRestartPolicyArgs;pub use manager::ExitStatus;pub use manager::ProcessStatus;pub use manager::RestartPolicy;pub use manager::SendArgs;pub use manager::StartArgs;pub use manager::State;pub use process::Process;pub use process::PID;
Modules§
- ipc
- this module contains all the shared IPC logic agnostic to servers and
clients. in particular, it contains the
Messagetype and its components and theConnectiontype, which abstracts away sopht’s messaging protocol - manager
- contains all structures and functions related to the
Statestructure. this includes the implementations of all the server-side process management functions likestartandstatusas well as things likeRestartPolicyand [ManagedProcess] - process
- this module contains all necessary logic for starting and interacting with processes across all platforms
Structs§
- Response
- represents a response from the server to the client. this should never be received by a server. additionally, this structure is subject to change in the future as responses get more detailed
Enums§
- Command
- represents a command to be executed by a server. this should never be received by a client.
- Error
- union of all errors resulting from sopht functions. this type implements
DisplayandError, and is the error type ofsopht::Result. - Message
- union of all different message types. currently the only two message types
are
CommandandResponse. theCommandvariant should only ever be sent by clients and received by servers, and theResponsevariant should only ever be received by clients and sent by servers
Functions§
- create_
local_ dirs - attempts to create the local directories required for sopht