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

Method ServiceList

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

Source from the content-addressed store, hash-verified

1074}
1075
1076func (s *Server) ServiceList(c *stdapi.Context) error {
1077 if err := s.hook("ServiceListValidate", c); err != nil {
1078 return err
1079 }
1080
1081 app := c.Var("app")
1082
1083 v, err := s.provider(c).WithContext(c.Context()).ServiceList(app)
1084 if err != nil {
1085 return err
1086 }
1087
1088 if vs, ok := interface{}(v).(Sortable); ok {
1089 sort.Slice(v, vs.Less)
1090 }
1091
1092 return c.RenderJSON(v)
1093}
1094
1095func (s *Server) ServiceMetrics(c *stdapi.Context) error {
1096 if err := s.hook("ServiceMetricsValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

hookMethod · 0.95
providerMethod · 0.95
ContextMethod · 0.80
SliceMethod · 0.80
ServiceListMethod · 0.65
WithContextMethod · 0.65

Tested by

no test coverage detected