Documentation ¶
Index ¶
- Variables
- func Cors() gin.HandlerFunc
- func GetRequestsIp(r *http.Request) string
- func InitContext() gin.HandlerFunc
- func Limiter(maxBurstSize int) gin.HandlerFunc
- func PrintPostData() gin.HandlerFunc
- func ProtocolDeal() gin.HandlerFunc
- func RequestStats() gin.HandlerFunc
- func StatsReport() metrics.Registry
- func TimeoutMiddleware(timeout time.Duration) func(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultRegistry = metrics.NewRegistry()
)
Functions ¶
func GetRequestsIp ¶
GetIP gets a requests IP address by reading off the forwarded-for header (for proxies) and falls back to use the remote address.
func InitContext ¶
func InitContext() gin.HandlerFunc
func PrintPostData ¶
func PrintPostData() gin.HandlerFunc
func ProtocolDeal ¶
func ProtocolDeal() gin.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.