Documentation ¶
Index ¶
- func AccessMode() gin.HandlerFunc
- func FlowQpsCount() gin.HandlerFunc
- func FlowQpsLimit() gin.HandlerFunc
- func FlowReqBreaker() gin.HandlerFunc
- func FlowReqCount() gin.HandlerFunc
- func JwtAuthToken() gin.HandlerFunc
- func JwtQpdLimit() gin.HandlerFunc
- func JwtQpsLimit() gin.HandlerFunc
- func ReverseProxy() gin.HandlerFunc
- func StripUri() gin.HandlerFunc
- func UrlRewrite() gin.HandlerFunc
- type InterceptingResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlowQpsLimit ¶
func FlowQpsLimit() gin.HandlerFunc
func FlowReqBreaker ¶
func FlowReqBreaker() gin.HandlerFunc
FlowReqBreaker 是一个Gin中间件,它使用gobreaker来实现熔断器。
func JwtQpdLimit ¶
func JwtQpdLimit() gin.HandlerFunc
func JwtQpsLimit ¶
func JwtQpsLimit() gin.HandlerFunc
func ReverseProxy ¶
func ReverseProxy() gin.HandlerFunc
ReverseProxy 创建并返回一个gin.HandlerFunc, 该中间件用于根据服务名动态发现后端服务,并通过负载均衡策略反向代理请求到相应的后端服务。
Types ¶
type InterceptingResponseWriter ¶
type InterceptingResponseWriter struct { http.ResponseWriter // 原始的 ResponseWriter // contains filtered or unexported fields }
InterceptingResponseWriter 是一个自定义的 ResponseWriter,用于捕获响应数据。
func (*InterceptingResponseWriter) Flush ¶
func (irw *InterceptingResponseWriter) Flush()
Flush 方法,用于支持流式传输,如果底层的 ResponseWriter 支持的话。
Click to show internal directories.
Click to hide internal directories.