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

Method SystemUpdate

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

Source from the content-addressed store, hash-verified

1471}
1472
1473func (s *Server) SystemUpdate(c *stdapi.Context) error {
1474 if err := s.hook("SystemUpdateValidate", c); err != nil {
1475 return err
1476 }
1477
1478 var opts structs.SystemUpdateOptions
1479 if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil {
1480 return err
1481 }
1482
1483 err := s.provider(c).WithContext(c.Context()).SystemUpdate(opts)
1484 if err != nil {
1485 return err
1486 }
1487
1488 return c.RenderOK()
1489}
1490
1491func (s *Server) Workers(c *stdapi.Context) error {
1492 return stdapi.Errorf(404, "not available via api")

Callers

nothing calls this directly

Calls 6

hookMethod · 0.95
providerMethod · 0.95
RequestMethod · 0.80
ContextMethod · 0.80
SystemUpdateMethod · 0.65
WithContextMethod · 0.65

Tested by

no test coverage detected