prometheus.go 180 B

123456789101112
  1. package middleware
  2. import (
  3. "go-admin/common/prometheus"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func WithPrometheus(c *gin.Context) {
  7. c.Set("prome", prometheus.PromeApi())
  8. c.Next()
  9. }