MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / SendHandle

Method SendHandle

internal/message/http.go:29–41  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

27}
28
29func (p *Http) SendHandle(c *gin.Context) {
30 var req Req
31 if err := c.ShouldBind(&req); err != nil {
32 common.ErrorResp(c, err, 400)
33 return
34 }
35 select {
36 case p.Received <- req.Message:
37 common.SuccessResp(c)
38 default:
39 common.ErrorStrResp(c, "nowhere needed", 500)
40 }
41}
42
43func (p *Http) Send(message Message) error {
44 select {

Callers

nothing calls this directly

Calls 3

ErrorRespFunction · 0.92
SuccessRespFunction · 0.92
ErrorStrRespFunction · 0.92

Tested by

no test coverage detected