add tailf plugin

master
shengxiang 9 years ago
parent 5864aa0de8
commit 168f125e4f

@ -49,6 +49,10 @@ Only 4 states. [ref](http://supervisord.org/subprocess.html#process-states)
![states](images/states.png)
# Plugin Design
Current plugins:
- [tailf](https://github.com/codeskyblue/gosuv-tailf)
All command plugin will store in `$HOME/.gosuv/cmdplugin`, gosuv will treat this plugin as a subcommand.
for example:

@ -355,7 +355,7 @@ func runPlugin(ctx *cli.Context, name string) {
envs := []string{
"GOSUV_SERVER_ADDR=" + ctx.GlobalString("addr"),
"GOSUV_PLUGIN_NAME=" + name,
"GOSUV_FILE_PATH=" + os.Args[0],
"GOSUV_PROGRAM=" + os.Args[0],
}
cmd := exec.Command(filepath.Join(pluginDir, "run"), ctx.Args()...)
cmd.Stdout = os.Stdout

Loading…
Cancel
Save