live: add ws endpoint to push into pipeline (#41534)
This commit is contained in:
@@ -96,9 +96,8 @@ func (g *Gateway) Handle(ctx *models.ReqContext) {
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Gateway) HandlePath(ctx *models.ReqContext) {
|
||||
streamID := web.Params(ctx.Req)[":streamId"]
|
||||
path := web.Params(ctx.Req)[":path"]
|
||||
func (g *Gateway) HandlePipelinePush(ctx *models.ReqContext) {
|
||||
channelID := web.Params(ctx.Req)["*"]
|
||||
|
||||
body, err := io.ReadAll(ctx.Req.Body)
|
||||
if err != nil {
|
||||
@@ -108,13 +107,10 @@ func (g *Gateway) HandlePath(ctx *models.ReqContext) {
|
||||
}
|
||||
logger.Debug("Live channel push request",
|
||||
"protocol", "http",
|
||||
"streamId", streamID,
|
||||
"path", path,
|
||||
"channel", channelID,
|
||||
"bodyLength", len(body),
|
||||
)
|
||||
|
||||
channelID := "stream/" + streamID + "/" + path
|
||||
|
||||
ruleFound, err := g.GrafanaLive.Pipeline.ProcessInput(ctx.Req.Context(), ctx.OrgId, channelID, body)
|
||||
if err != nil {
|
||||
logger.Error("Pipeline input processing error", "error", err, "body", string(body))
|
||||
|
||||
Reference in New Issue
Block a user