Documentation ¶
Overview ¶
prometheus中间件
Index ¶
- Constants
- Variables
- func Cors() gin.HandlerFunc
- func NoRouteHandler(c *gin.Context)
- func PromHandler(handler http.Handler) gin.HandlerFunc
- func RegisterHealthMiddleware(c *gin.Context)
- func RegisterIndex(c *gin.Context)
- func RegisterPrometheusMiddleware(router *gin.Engine, isauth bool)
- func RegisterSwaggerMiddleware(router *gin.Engine)
- func RegisterUrlCache(router *gin.Engine)
Constants ¶
View Source
const ( LabelValueTenantPlatform = "platform" XForwardedUri = "X-Forwarded-Uri" XForwardedMethod = "X-Forwarded-Method" XForwardedHost = "X-Forwarded-Host" XForwardedProto = "X-Forwarded-Proto" )
Variables ¶
View Source
var ( URLCACHE_GET string = "/apis/v1/urlcache/:name" URLCACHEALL_GET string = "/apis/v1/urlcache" URLCACHE_FORWARDAUTH string = "/forwardauth" )
View Source
var NoRoutePath string = "/admin/index"
默认404跳转地址
View Source
var WhilteList []string = []string{
"URLCACHE_GET", "URLCACHEALL_GET", "URLCACHE_FORWARDAUTH",
}
平台级别白名单列表
Functions ¶
func PromHandler ¶
func PromHandler(handler http.Handler) gin.HandlerFunc
func RegisterHealthMiddleware ¶
@Summary 健康检查 @Description 接口健康检查接口 @Tags Health @Success 200 {string} string "success" @Router /health [get]
func RegisterIndex ¶
func RegisterPrometheusMiddleware ¶
默认prometheus监控+自定义监控
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.