codeskyblue
f6d73a4839
|
8 years ago | |
---|---|---|
Godeps | 8 years ago | |
docs | 8 years ago | |
res | 8 years ago | |
vendor/github.com | 8 years ago | |
.fsw.yml | 8 years ago | |
.gitignore | 8 years ago | |
.gopack.yml | 8 years ago | |
.travis.yml | 8 years ago | |
LICENSE | 9 years ago | |
README.md | 8 years ago | |
broadcast.go | 8 years ago | |
broadcast_test.go | 8 years ago | |
build.sh | 8 years ago | |
config.go | 8 years ago | |
deploy.sh | 8 years ago | |
equinox.key.enc | 8 years ago | |
equinox.pub | 8 years ago | |
fsm.go | 8 years ago | |
gosuv.go | 8 years ago | |
proctrl.go | 8 years ago | |
res.go | 8 years ago | |
res_bindata.go | 8 years ago | |
res_nobindata.go | 8 years ago | |
utils.go | 8 years ago | |
web.go | 8 years ago |
README.md
gosuv
Program should not use in production (current is in beta)
Process managerment writtern by golang, inspired by python-supervisor
Features
- Realtime log view
- Web control page
- Github webhook
- 中文文档
Requirements
Go version at least 1.6+
Installation
Standalone binary can be download from https://dl.equinox.io/shengxiang/gosuv/stable
Or if you have go enviroment, you can also build from source.
go get -d github.com/codeskyblue/gosuv
cd $GOPATH/src/github.com/codeskyblue/gosuv
go build
If you want to build a standalone binary, run the following command.
go get github.com/elazarl/go-bindata-assetfs/...
go-bindata-assetfs -tags bindata res/...
go build -tags bindata
Usage
Start server in the background
gosuv start-server
Show server status
$ gosuv status
Server is running
Open web http://localhost:8000 to see the manager page.
Configuration
Default config file stored in directory $HOME/.gosuv/
Design
HTTP is follow the RESTFul guide.
Get or Update program
<GET|PUT> /api/programs/:name
Add new program
POST /api/programs
Del program
DELETE /api/programs/:name
State
Only 4 states. ref
Plugin Design (todo)
Current plugins:
All command plugin will store in $HOME/.gosuv/cmdplugin
, gosuv will treat this plugin as a subcommand.
for example:
$HOME/.gosuv/cmdplugin/ --.
|- showpid/
|- run
There is a directory showpid
When run gosuv showpid
, file run
will be called.