Documentation ¶
Index ¶
- func CORS(opts *azugo.CORSOptions) func(azugo.RequestHandler) azugo.RequestHandler
- func Metrics(path string, options ...MetricsOption) azugo.RequestHandlerFunc
- func RealIP(next azugo.RequestHandler) azugo.RequestHandler
- func RequestLogger(next azugo.RequestHandler) azugo.RequestHandler
- type MetricsOption
- type MetricsSubsystem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORS ¶
func CORS(opts *azugo.CORSOptions) func(azugo.RequestHandler) azugo.RequestHandler
CORS is a middleware for handling CORS requests.
func Metrics ¶
func Metrics(path string, options ...MetricsOption) azugo.RequestHandlerFunc
Metrics initializes and returns Prometheus metrics middleware.
func RealIP ¶
func RealIP(next azugo.RequestHandler) azugo.RequestHandler
RealIP middleware updates request remote IP address based on X-Real-IP and X-Forwarded-For headers.
func RequestLogger ¶
func RequestLogger(next azugo.RequestHandler) azugo.RequestHandler
Types ¶
type MetricsOption ¶
type MetricsOption interface {
// contains filtered or unexported methods
}
Interface for metrics handler options.
type MetricsSubsystem ¶
type MetricsSubsystem string
MetricsSubsystem represents subsystem name for Prometheus metric structuring.
Click to show internal directories.
Click to hide internal directories.