winss
|
A template for a service process. More...
#include <service_process.hpp>
Public Member Functions | |
ServiceProcessTmpl () | |
The default service process template constructor. More... | |
ServiceProcessTmpl (fs::path service_dir) | |
Initializes the service process with the service directory. More... | |
ServiceProcessTmpl (const ServiceProcessTmpl &)=delete | |
No copy. More... | |
ServiceProcessTmpl (ServiceProcessTmpl &&p) | |
Creates a new service process and moves it from an old one. More... | |
virtual const fs::path & | GetServiceDir () const |
Gets the path of the service directory. More... | |
virtual bool | IsCreated () const |
Gets the service process is created. More... | |
virtual void | Start (const ServicePipes &pipes, bool consumer) |
Starts the service process. More... | |
virtual void | Close () |
Closes the service process. More... | |
ServiceProcessTmpl & | operator= (const ServiceProcessTmpl &)=delete |
No copy. More... | |
ServiceProcessTmpl & | operator= (ServiceProcessTmpl &&p) |
Moves the service process object to this object. More... | |
virtual | ~ServiceProcessTmpl () |
Service process destructor which will close the process. More... | |
Static Public Attributes | |
static constexpr const char | kSuperviseExe [16] = "winss-supervise" |
The supervisor name. More... | |
Protected Attributes | |
fs::path | service_dir |
The service directory. More... | |
TProcess | proc |
The supervisor process. More... | |
A template for a service process.
Models a service process which would be either the main service or the log service. Log services should be started with a consumer pipe to the pipes of the main service.
TMutex | The process implementation type. |
|
inline |
The default service process template constructor.
|
inlineexplicit |
Initializes the service process with the service directory.
service_dir | The path to the service directory. |
|
delete |
No copy.
|
inline |
Creates a new service process and moves it from an old one.
p | The previous service process. |
|
inlinevirtual |
Service process destructor which will close the process.
|
inlinevirtual |
Closes the service process.
|
inlinevirtual |
Gets the path of the service directory.
|
inlinevirtual |
Gets the service process is created.
|
delete |
No copy.
|
inline |
Moves the service process object to this object.
p | The previous service process. |
|
inlinevirtual |
Starts the service process.
[in] | pipes | The redirected pipes. |
[in] | consumer | The process is a consumer of the pipes. |
References winss::ProcessParams::stdin_pipe, winss::ServicePipes::stdin_pipe, winss::ServicePipes::stdout_pipe, and SUFFIX.
|
static |
The supervisor name.
|
protected |
The supervisor process.
|
protected |
The service directory.