health_check.go 547 B

123456789101112131415161718192021
  1. package controllers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "github.com/langgenius/dify-plugin-daemon/internal/manifest"
  5. "github.com/langgenius/dify-plugin-daemon/internal/types/app"
  6. "github.com/langgenius/dify-plugin-daemon/internal/utils/routine"
  7. )
  8. func HealthCheck(app *app.Config) gin.HandlerFunc {
  9. return func(c *gin.Context) {
  10. c.JSON(200, gin.H{
  11. "status": "ok",
  12. "pool_status": routine.FetchRoutineStatus(),
  13. "version": manifest.VersionX,
  14. "build_time": manifest.BuildTimeX,
  15. "platform": app.Platform,
  16. })
  17. }
  18. }