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

Method ProcessGet

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

Source from the content-addressed store, hash-verified

750}
751
752func (s *Server) ProcessGet(c *stdapi.Context) error {
753 if err := s.hook("ProcessGetValidate", c); err != nil {
754 return err
755 }
756
757 app := c.Var("app")
758 pid := c.Var("pid")
759
760 v, err := s.provider(c).WithContext(c.Context()).ProcessGet(app, pid)
761 if err != nil {
762 return err
763 }
764
765 if vs, ok := interface{}(v).(Sortable); ok {
766 sort.Slice(v, vs.Less)
767 }
768
769 return c.RenderJSON(v)
770}
771
772func (s *Server) ProcessList(c *stdapi.Context) error {
773 if err := s.hook("ProcessListValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

hookMethod · 0.95
providerMethod · 0.95
ContextMethod · 0.80
SliceMethod · 0.80
ProcessGetMethod · 0.65
WithContextMethod · 0.65

Tested by

no test coverage detected