X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=inline;f=lib%2Fapiv1%2Fexec.go;h=b0bfd4116ee071e05e0fd218482d92fb491345eb;hb=a840678ea8b627e8a0f952c07a268e4b0be8ee9c;hp=f7beea65ed0a434bd31754ef486d3a4f0efb5e3d;hpb=ec7051e1da665206f594c7616ad381bfeaea333a;p=src%2Fxds%2Fxds-server.git diff --git a/lib/apiv1/exec.go b/lib/apiv1/exec.go index f7beea6..b0bfd41 100644 --- a/lib/apiv1/exec.go +++ b/lib/apiv1/exec.go @@ -22,7 +22,7 @@ type ExecArgs struct { // ExecOutMsg Message send on each output (stdout+stderr) of executed command type ExecOutMsg struct { CmdID string `json:"cmdID"` - Timestamp string `json:timestamp` + Timestamp string `json:"timestamp"` Stdout string `json:"stdout"` Stderr string `json:"stderr"` } @@ -30,13 +30,15 @@ type ExecOutMsg struct { // ExecExitMsg Message send when executed command exited type ExecExitMsg struct { CmdID string `json:"cmdID"` - Timestamp string `json:timestamp` + Timestamp string `json:"timestamp"` Code int `json:"code"` Error error `json:"error"` } -// Event name send in WS +// ExecOutEvent Event send in WS when characters are received const ExecOutEvent = "exec:output" + +// ExecExitEvent Event send in WS when program exited const ExecExitEvent = "exec:exit" var execCommandID = 1