codeskyblue
5f1d2b2996
|
8 years ago | |
---|---|---|
Godeps | 8 years ago | |
docs | 8 years ago | |
res | 8 years ago | |
vendor | 8 years ago | |
.fsw.yml | 8 years ago | |
.gitignore | 8 years ago | |
.gopack.yml | 8 years ago | |
.travis.yml | 8 years ago | |
.travis.yml.equinox | 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
- Start, Stop, Tail, Reload
- Add program support
- Edit support
- Delete support
- Path auto complete https://github.com/twitter/typeahead.js
- Memory and CPU monitor
-
HTTP Basic auth
-
Github webhook
-
Single log page, include search support
-
中文文档
Requirements
Go version at least 1.6+
Installation
Standalone binary can be download from https://dl.equinox.io/shengxiang/gosuv/stable
Standalone binary can be download from github releases
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:11313 to see the manager page.
Configuration
Default config file stored in directory $HOME/.gosuv/
- file
programs.yml
contains all program settings. - file
config.yml
contains server config
File config.yml
can be generated by gosuv conftest
Example config.yaml
server:
httpauth:
enabled: false
username: uu
password: pp
addr: :11313
client:
server_url: http://localhost:11313
Logs can be found in $HOME/.gosuv/log/
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.