(c *stdapi.Context)
| 1074 | } |
| 1075 | |
| 1076 | func (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 | |
| 1095 | func (s *Server) ServiceMetrics(c *stdapi.Context) error { |
| 1096 | if err := s.hook("ServiceMetricsValidate", c); err != nil { |
nothing calls this directly
no test coverage detected