what
Proof of concept and playground for a daemontools written in go.
The goal is to have a stable service starter which automagically restarts a service if it has been shut down and log (with logrotation) all output.
You may start up with an empty (or not even existing) service-dir and create the services after starting go-supervise
. As soon as a "run" executable is found, the service be started up.
You may delete a service sub-directory (e.g. ~/services/srv1) while go-supervise
is running. It will detect the deletion and shut down the service.
For now, go-supervise
uses etcd to save known services, because later on
- It should be possible to add a service in etcd database and let
go-supervise
starts it up on the correct server.
- It should be possible to remove a service in etcd database and let
go-supervise
shut it down.
etcd is expected on 127.0.0.1:2379, which is default. Later on go-supervise
will have a configuration file.
documentation
Not existent yet, Sorry :-)
uses
Antigloss' Logger
CoreOS etcd client
Vektra's TAI64
usage
mkdir ~/services/srv1 && echo "exec sleep 1000" > ~/services/srv1/run
git clone https://github.com/Adar/go-supervise
cd go-supervise/svscan
./svscan -path ~/services/
known bugs
If the multilog process is killed, it won't start up again leaving the service
without any logging.
License
MIT license, see LICENSE.txt for details.