Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abrander/go-supervisord
RPC remote control for supervisord
https://github.com/abrander/go-supervisord
Last synced: about 1 month ago
JSON representation
RPC remote control for supervisord
- Host: GitHub
- URL: https://github.com/abrander/go-supervisord
- Owner: abrander
- License: mit
- Created: 2015-10-27T17:45:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-08-21T02:32:48.000Z (over 1 year ago)
- Last Synced: 2024-06-18T18:49:26.797Z (7 months ago)
- Language: Go
- Size: 10.7 KB
- Stars: 26
- Watchers: 4
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-supervisord
RPC remote control for [supervisord](http://supervisord.org/)[![GoDoc][1]][2]
[1]: https://godoc.org/github.com/abrander/go-supervisord?status.svg
[2]: https://godoc.org/github.com/abrander/go-supervisordCode Examples
-------------Reloading configuration and clearing daemon log:
```go
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`:
```go
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())
}
}
```