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

Method SystemProcesses

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

Source from the content-addressed store, hash-verified

1263}
1264
1265func (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
1287func (s *Server) SystemReleases(c *stdapi.Context) error {
1288 if err := s.hook("SystemReleasesValidate", 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
SystemProcessesMethod · 0.65
WithContextMethod · 0.65

Tested by

no test coverage detected