(c *stdapi.Context)
| 827 | } |
| 828 | |
| 829 | func (s *Server) ProcessRun(c *stdapi.Context) error { |
| 830 | if err := s.hook("ProcessRunValidate", c); err != nil { |
| 831 | return err |
| 832 | } |
| 833 | |
| 834 | app := c.Var("app") |
| 835 | service := c.Var("service") |
| 836 | |
| 837 | var opts structs.ProcessRunOptions |
| 838 | if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil { |
| 839 | return err |
| 840 | } |
| 841 | |
| 842 | v, err := s.provider(c).WithContext(c.Context()).ProcessRun(app, service, opts) |
| 843 | if err != nil { |
| 844 | return err |
| 845 | } |
| 846 | |
| 847 | if vs, ok := interface{}(v).(Sortable); ok { |
| 848 | sort.Slice(v, vs.Less) |
| 849 | } |
| 850 | |
| 851 | return c.RenderJSON(v) |
| 852 | } |
| 853 | |
| 854 | func (s *Server) ProcessStop(c *stdapi.Context) error { |
| 855 | if err := s.hook("ProcessStopValidate", c); err != nil { |
nothing calls this directly
no test coverage detected