Skip to content

abrander/go-supervisord

Repository files navigation

go-supervisord

RPC remote control for supervisord

GoDoc

Code Examples

Reloading configuration and clearing daemon log:

import "github.com/abrander/go-supervisord"
  
func main() {
	c, err := supervisord.NewClient("http://127.0.0.1:9001/RPC2")
	if err != nil {
		panic(err.Error())
	}
	
	err = c.ClearLog()
	if err != nil {
		panic(err.Error())
	}
	
	err = c.Restart()
	if err != nil {
		panic(err.Error())
	}
}

Stop supervisord process worker:

import "github.com/abrander/go-supervisord"
  
func main() {
	c, err := supervisord.NewClient("http://127.0.0.1:9001/RPC2")
	if err != nil {
		panic(err.Error())
	}
	
	err = c.StopProcess("worker", false)
	if err != nil {
		panic(err.Error())
	}
}

About

RPC remote control for supervisord

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages