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

Method InstanceList

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

Source from the content-addressed store, hash-verified

558}
559
560func (s *Server) InstanceList(c *stdapi.Context) error {
561 if err := s.hook("InstanceListValidate", c); err != nil {
562 return err
563 }
564
565 v, err := s.provider(c).WithContext(c.Context()).InstanceList()
566 if err != nil {
567 return err
568 }
569
570 if vs, ok := interface{}(v).(Sortable); ok {
571 sort.Slice(v, vs.Less)
572 }
573
574 return c.RenderJSON(v)
575}
576
577func (s *Server) InstanceShell(c *stdapi.Context) error {
578 if err := s.hook("InstanceShellValidate", c); err != nil {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected