分析优化 channel 接口用时

This commit is contained in:
2025-04-01 10:51:32 +08:00
parent 47bb49ce70
commit 6d89470a89
7 changed files with 156 additions and 35 deletions

20
web/handlers/temp.go Normal file
View File

@@ -0,0 +1,20 @@
package handlers
import (
"platform/pkg/rds"
"github.com/gofiber/fiber/v2"
)
func Temp(c *fiber.Ctx) error {
id := c.Query("id")
result, err := rds.Client.Get(c.Context(), "channel:"+id).Result()
if err != nil {
return err
}
return c.JSON(fiber.Map{
"result": result,
})
}