Process Manager
Library that provides APIs to run external processes
Main library interface is located at Manager
structure. To init this structure use CreateManager
function.
Main library methods:
AddProcess
- run new process with argumentsTerminateProcess
- kill processGetProcesses
- get all processesShutdown
- kill all processes and flush logsGetProcess
- get process by pid
Library config is represented in ManagerConfig
structure:
type ManagerConfig struct { LogsFolder string RenewOldProcesses bool ProcessesListFile string }
LogsFolder
- folder where individual process logs will be locatedRenewOldProcesses
- if set to true process will be renewed after main daemon restartProcessesListFile
- location of file that contains list of processes that needs to be renew
See more details and example of usage in cmd
package.