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

tensorchord / openmodelz / 6146306117

11 Sep 2023 12:22PM UTC coverage: 26.069% (-3.9%) from 29.927%
6146306117

Pull #171

github

xieydd
chore: Make proxy endpoint port configurable

Signed-off-by: xieydd <xieydd@gmail.com>
Pull Request #171: feat: Support BYOC

443 of 443 new or added lines in 14 files covered. (100.0%)

939 of 3602 relevant lines covered (26.07%)

1.63 hits per line

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

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

3
import (
4
        "fmt"
5
        "path"
6

7
        "github.com/gin-gonic/gin"
8
        "github.com/tensorchord/openmodelz/agent/pkg/consts"
9
)
10

11
// @Summary     Proxy to the backend mosec.
12
// @Description Proxy to the backend mosec.
13
// @Tags        inference
14
// @Accept      */*
15
// @Produce     json
16
// @Param       id path string true "Deployment ID"
17
// @Router      /mosec/{id} [get]
18
// @Router      /mosec/{id}/metrics [get]
19
// @Router      /mosec/{id}/inference [post]
20
// @Success     201
21
func (s *Server) proxyMosec(c *gin.Context) error {
×
22
        uid, deployment, err := s.proxyAuth(c)
×
23
        if err != nil {
×
24
                return err
×
25
        }
×
26

27
        c.Request.URL.Path = path.Join(
×
28
                "/", "inference", fmt.Sprintf("%s.%s", deployment, consts.DefaultPrefix+uid), c.Param("proxyPath"))
×
29
        return s.handleInferenceProxy(c)
×
30
}
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