Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Notifier *gobrake.Notifier
}
A Handler is an HTTP middleware that provides integration with Airbrake.
func New ¶
func New(notifier *gobrake.Notifier) *Handler
New returns a new Handler. Use the Handler and HandleFunc methods to wrap existing HTTP handlers.
func (*Handler) Handle ¶
Handle works as a middleware that wraps an existing http.Handler and sends route performance stats
func (*Handler) HandleFunc ¶
func (h *Handler) HandleFunc(handler http.HandlerFunc) http.HandlerFunc
HandleFunc is like Handler, but with a handler function parameter for cases where that is convenient. In particular, use it to wrap a handler function literal.
http.Handle(pattern, h.HandleFunc(func (w http.ResponseWriter, r *http.Request) { // handler code here }))
Click to show internal directories.
Click to hide internal directories.