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

Method ProcessList

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

Source from the content-addressed store, hash-verified

770}
771
772func (s *Server) ProcessList(c *stdapi.Context) error {
773 if err := s.hook("ProcessListValidate", c); err != nil {
774 return err
775 }
776
777 app := c.Var("app")
778
779 var opts structs.ProcessListOptions
780 if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil {
781 return err
782 }
783
784 v, err := s.provider(c).WithContext(c.Context()).ProcessList(app, opts)
785 if err != nil {
786 return err
787 }
788
789 if vs, ok := interface{}(v).(Sortable); ok {
790 sort.Slice(v, vs.Less)
791 }
792
793 return c.RenderJSON(v)
794}
795
796func (s *Server) ProcessLogs(c *stdapi.Context) error {
797 if err := s.hook("ProcessLogsValidate", 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
ProcessListMethod · 0.65
WithContextMethod · 0.65

Tested by

no test coverage detected