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

Method ServiceUpdate

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

Source from the content-addressed store, hash-verified

1134}
1135
1136func (s *Server) ServiceUpdate(c *stdapi.Context) error {
1137 if err := s.hook("ServiceUpdateValidate", c); err != nil {
1138 return err
1139 }
1140
1141 app := c.Var("app")
1142 name := c.Var("name")
1143
1144 var opts structs.ServiceUpdateOptions
1145 if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil {
1146 return err
1147 }
1148
1149 err := s.provider(c).WithContext(c.Context()).ServiceUpdate(app, name, opts)
1150 if err != nil {
1151 return err
1152 }
1153
1154 return c.RenderOK()
1155}
1156
1157func (s *Server) SystemGet(c *stdapi.Context) error {
1158 if err := s.hook("SystemGetValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected