• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tensorchord / openmodelz / 6458415884

09 Oct 2023 03:03PM UTC coverage: 27.112% (-0.008%) from 27.12%
6458415884

Pull #187

github

xieydd
chore: Fix server list return type

Signed-off-by: xieydd <xieydd@gmail.com>
Pull Request #187: chore: Fix server list return type

1 of 1 new or added line in 1 file covered. (100.0%)

982 of 3622 relevant lines covered (27.11%)

1.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/agent/pkg/server/handler_server_list.go
1
package server
2

3
import (
4
        "net/http"
5

6
        "github.com/gin-gonic/gin"
7
        "github.com/tensorchord/openmodelz/agent/api/types"
8
)
9

10
// @Summary     List the servers.
11
// @Description List the servers.
12
// @Tags        namespace
13
// @Accept      json
14
// @Produce     json
15
// @Success     200 {object} []types.Server
16
// @Router      /system/servers [get]
17
func (s *Server) handleServerList(c *gin.Context) error {
×
18
        ns := []types.Server{}
×
19
        ns, err := s.runtime.ServerList(c.Request.Context())
×
20
        if err != nil {
×
21
                return errFromErrDefs(err, "namespace-list")
×
22
        }
×
23
        c.JSON(http.StatusOK, ns)
×
24
        return nil
×
25
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc