(c *stdapi.Context)
| 1263 | } |
| 1264 | |
| 1265 | func (s *Server) SystemProcesses(c *stdapi.Context) error { |
| 1266 | if err := s.hook("SystemProcessesValidate", c); err != nil { |
| 1267 | return err |
| 1268 | } |
| 1269 | |
| 1270 | var opts structs.SystemProcessesOptions |
| 1271 | if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil { |
| 1272 | return err |
| 1273 | } |
| 1274 | |
| 1275 | v, err := s.provider(c).WithContext(c.Context()).SystemProcesses(opts) |
| 1276 | if err != nil { |
| 1277 | return err |
| 1278 | } |
| 1279 | |
| 1280 | if vs, ok := interface{}(v).(Sortable); ok { |
| 1281 | sort.Slice(v, vs.Less) |
| 1282 | } |
| 1283 | |
| 1284 | return c.RenderJSON(v) |
| 1285 | } |
| 1286 | |
| 1287 | func (s *Server) SystemReleases(c *stdapi.Context) error { |
| 1288 | if err := s.hook("SystemReleasesValidate", c); err != nil { |
nothing calls this directly
no test coverage detected