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
- this module contains all the shared IPC logic agnostic to servers and clients. in particular, it contains the
Message
type and its components and theConnection
type, which abstracts away sopht’s messaging protocol - contains all structures and functions related to the
State
structure. this includes the implementations of all the server-side process management functions likestart
andstatus
as well as things likeRestartPolicy
and [ManagedProcess
] - this module contains all necessary logic for starting and interacting with processes across all platforms
Structs
- 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
- represents a command to be executed by a server. this should never be received by a client.
- union of all errors resulting from sopht functions. this type implements
Display
andError
, and is the error type ofsopht::Result
. - union of all different message types. currently the only two message types are
Command
andResponse
. theCommand
variant should only ever be sent by clients and received by servers, and theResponse
variant should only ever be received by clients and sent by servers
Functions
- attempts to create the local directories required for sopht
Type Aliases
- specialized
Result
type for return values from sopht functions