Crate sopht

source ·
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

Structs

  • structure containing the state of a connection to the sopht socket
  • contains all information about a running or previously-running process, including the Child structure and the handles to the threads reading the output streams of the process. this structure also maintains a Vec<String> containing all the output lines of its child process. for more info about how this output is read and stored, see Process::start
  • detailed status of a Process. this structure is generated by State::status_of
  • 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
  • arguments to State::send
  • arguments to State::start
  • the state of the sopht process manager. contains all processes started and all other configuration/state

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 and Error, and is the error type of sopht::Result.
  • how sopht internally represents the exit status of a process
  • union of all different message types. currently the only two message types are Command and Response. the Command variant should only ever be sent by clients and received by servers, and the Response variant should only ever be received by clients and sent by servers
  • describes the conditions under which a process will be restarted in an upkeep cycle. this has no effect on State::restart

Functions

Type Aliases

  • PIDs are represented internally by a plain usize, though this may change in the future!
  • specialized Result type for return values from sopht functions