Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinRateLimit ¶ added in v2.3.6
func GinRateLimit(switchName, rateName string) gin.HandlerFunc
func GinRecovery ¶
func GinRecovery() gin.HandlerFunc
Types ¶
type LogFormatterParams ¶ added in v2.10.5
type LogFormatterParams struct { // StatusCode is HTTP response code. StatusCode int // Latency is how much time the server cost to process a certain request. Latency time.Duration // ClientIP equals Context's ClientIP method. ClientIP string // Method is the HTTP method given to the request. Method string // Path is a path the client requests. Path string // ErrorMessage is set if error has occurred in processing the request. ErrorMessage string // BodySize is the size of the Response Body BodySize int //userId UserId int64 }
type RateLimiter ¶ added in v2.3.6
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶ added in v2.3.6
func NewRateLimiter(switchName, rateName string) *RateLimiter
Click to show internal directories.
Click to hide internal directories.