Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigDefault = MiddlewareConfig{ Next: nil, NewRelicApp: &newrelic.Application{}, }
ConfigDefault is the default config
View Source
var ProviderSet = wire.NewSet(New)
Functions ¶
func NewMiddleware ¶
func NewMiddleware(config ...MiddlewareConfig) fiber.Handler
NewMiddleware creates a new middleware handler
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) Application ¶
func (a *App) Application() *newrelic.Application
func (*App) NewContext ¶
func (*App) StartTransaction ¶
func (a *App) StartTransaction(name string) *newrelic.Transaction
type MiddlewareConfig ¶
type MiddlewareConfig struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // NewRelicApp is newrelic.Application // // Required. Default: empty Application NewRelicApp *newrelic.Application }
MiddlewareConfig defines the config for middleware.
type ResponseWriter ¶
type ResponseWriter struct {
// contains filtered or unexported fields
}
ResponseWriter imitates http.ResponseWriter
func (*ResponseWriter) Header ¶
func (rw *ResponseWriter) Header() http.Header
Header implementation
func (*ResponseWriter) Write ¶
func (rw *ResponseWriter) Write(p []byte) (int, error)
Write implementation
func (*ResponseWriter) WriteHeader ¶
func (rw *ResponseWriter) WriteHeader(statusCode int)
WriteHeader implementation
Click to show internal directories.
Click to hide internal directories.