(t *testing.T)
| 16 | ) |
| 17 | |
| 18 | func TestPullModel(t *testing.T) { |
| 19 | // 创建 Gin 引擎 |
| 20 | r := gin.Default() |
| 21 | r.Use(gzip.Gzip(gzip.DefaultCompression)) |
| 22 | // 设置路由,监听 "/stream" 路径 |
| 23 | r.GET("/stream", streamHandler) |
| 24 | r.GET("/stop", stopPull) |
| 25 | r.GET("/models", models) |
| 26 | |
| 27 | // 启动 HTTP 服务器 |
| 28 | r.Run(":11180") |
| 29 | } |
| 30 | |
| 31 | func streamHandler(c *gin.Context) { |
| 32 | // 创建一个通道,用于监测客户端关闭连接的信号 |
nothing calls this directly
no outgoing calls
no test coverage detected