MCPcopy Create free account
hub / github.com/convox/rack / ProcessRun

Method ProcessRun

pkg/api/controllers.go:829–852  ·  view source on GitHub ↗
(c *stdapi.Context)

Source from the content-addressed store, hash-verified

827}
828
829func (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
854func (s *Server) ProcessStop(c *stdapi.Context) error {
855 if err := s.hook("ProcessStopValidate", c); err != nil {

Callers

nothing calls this directly

Calls 7

hookMethod · 0.95
providerMethod · 0.95
RequestMethod · 0.80
ContextMethod · 0.80
SliceMethod · 0.80
ProcessRunMethod · 0.65
WithContextMethod · 0.65

Tested by

no test coverage detected