(c *stdapi.Context)
| 770 | } |
| 771 | |
| 772 | func (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 | |
| 796 | func (s *Server) ProcessLogs(c *stdapi.Context) error { |
| 797 | if err := s.hook("ProcessLogsValidate", c); err != nil { |
nothing calls this directly
no test coverage detected