Home

Awesome

<div align="center"> <br/> <img src="https://raw.githubusercontent.com/ShinyTrinkets/overseer/master/logo.png" alt="Overseer logo"> <br/> </div>

Overseer

Project name Build status Coverage report Go Report Card Go Reference

Simple process manager library.

At the heart of this library is the os/exec.Cmd from Go-lang and the first wrapper for that is the Cmd struct.<br/> The Overseer struct can supervise one or more Cmds running at the same time.<br/> You can safely run multiple Overseer instances at the same time.

There are 3 states in the normal lifecycle of a proc: starting, running, finished.<br/> If the process is killed prematurely, the states are: starting, running, interrupted.<br/> If the process cannot start, the states are: starting, fatal.

Overseer API

Setting up a logger is optional, but if you want to use it, it must be called before creating a new Overseer.<br/> By default, the logger is DefaultLogger from ShinyTrinkets/meta-logger/default.go.<br/> To disable the logger completely, you need to create a Logger interface, with empty functions for Info and Error, see examples/simple-overseer.

Cmd API

It's recommended to use the higher level Overseer, instead of Cmd directly.<br/> If you use Cmd directly, keep in mind that it is one use only. After starting a instance, it cannot be started again. However, you can Clone your instance and start the clone. The Supervise method from the Overseer does all of that for you.

Project highlights

For examples of usage, please check the Examples folder, the Overseer CLI app, the manager tests, or the Spinal app.

Similar libraries

Icon is made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> and licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>.


License

MIT © Cristi Constantin.