Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recovery ¶
type Recovery struct { ServiceName string // for logging Logger *logrus.Entry ErrorClient environments.SentryClient // Can use this to send prod errors to a system StackAll bool StackSize int SentryPublicDSN string }
Recovery is a Negroni middleware that recovers from any panics and writes a 500 if there was one.
func NewRecovery ¶
func NewRecovery(serviceName string, conf environments.Config, sentryPublicDSN string) *Recovery
NewRecovery returns a new instance of Recovery
func (*Recovery) ServeHTTP ¶
func (mw *Recovery) ServeHTTP(res http.ResponseWriter, req *http.Request, next http.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.