(c *stdapi.Context)
| 724 | } |
| 725 | |
| 726 | func (s *Server) ProcessExec(c *stdapi.Context) error { |
| 727 | if err := s.hook("ProcessExecValidate", c); err != nil { |
| 728 | return err |
| 729 | } |
| 730 | |
| 731 | app := c.Var("app") |
| 732 | pid := c.Var("pid") |
| 733 | command := c.Value("command") |
| 734 | |
| 735 | var opts structs.ProcessExecOptions |
| 736 | if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil { |
| 737 | return err |
| 738 | } |
| 739 | |
| 740 | v, err := s.provider(c).WithContext(c.Context()).ProcessExec(app, pid, command, stdsdk.NewAdapterWs(c.Websocket()), opts) |
| 741 | if err != nil { |
| 742 | return err |
| 743 | } |
| 744 | |
| 745 | if vs, ok := interface{}(v).(Sortable); ok { |
| 746 | sort.Slice(v, vs.Less) |
| 747 | } |
| 748 | |
| 749 | return renderStatusCode(c, v) |
| 750 | } |
| 751 | |
| 752 | func (s *Server) ProcessGet(c *stdapi.Context) error { |
| 753 | if err := s.hook("ProcessGetValidate", c); err != nil { |
nothing calls this directly
no test coverage detected