// WithHandler adds middleware handlers to
198988
func WithHandler(h ...Handler) Option {
	return func(o *Options) {
		o.Handlers = append(o.Handlers, h...)
	}
}
573941
func (app *App) UseHandler(h Handler) *App {
	app.mds = append(app.mds, h.Serve)
	return app
}
1374725
func WithHandle404(fn http.HandlerFunc) option {
	return func(m *Module) {
		m.handle404 = fn
	}
}
113303
func (m *Method) PreHandle(handler Handler) *Method {
	m.preHandlers = append(m.preHandlers, handler)
	return m
}
991467
func WithImageHandlerWrapper(w func(images.Handler) images.Handler) RemoteOpt {
	return func(client *Client, c *RemoteContext) error {
		c.HandlerWrapper = w
		return nil
	}
}
1290279
func (b *EventBus) AddHandler(m eh.EventMatcher, h eh.EventHandler) {
	sub := b.subscription(m, h, false)
	go b.handle(m, h, sub)
}
582235
func WithLoader(l loader.Loader) Option {
	return func(o *Options) {
		o.Loader = l
	}
}
1181142
func (r *Router) UseHandler(handler http.Handler) *Router {
	r.Route("/*").All(handler.ServeHTTP)
	return r
}
246892
func MiddlewareWithRecovery(fn recover.RecoveryHandlerFunc) []pubsub.Middleware {
	return []pubsub.Middleware{
		logrus.Middleware{},
		prometheus.Middleware{},
		opentracing.Middleware{},
		audit.Middleware{},
		recover.Middleware{RecoveryHandlerFunc: fn},
	}
}
926592
func (r *FlatChain) ChainHandler(h http.Handler) FlatChains {
	fh := FlatChainHandlerWrap(h, r.log)
	r.Chain(fh)
	return fh
}
1285702
func (n *Negroni) UseHandler(handler http.Handler) {
	n.Use(Wrap(handler))
}
710797
func (m *Mux) UseHandler(phase string, fn c.HandlerFunc) *Mux {
	m.Middleware.UseHandler(phase, fn)
	return m
}
1176006
func (middlewares Middlewares) BuildHandler(handler http.Handler) http.Handler {
	for i := len(middlewares) - 1; i >= 0; i-- {
		handler = middlewares[i].ServeNext(handler)
	}
	return handler
}
533214
func WithTracing(s *session.Session) {
	// After adding these handlers, the "Send" handler list will look
	// something like:
	//
	//	opentracing.Start -> opentracing.RequestInfo -> opentracing.DynamoDBInfo -> core.ValidateReqSigHandler -> core.SendHandler
	s.Handlers.Send.PushFrontNamed(DynamoDBInfoHandler)
	s.Handlers.Send.PushFrontNamed(RequestInfoHandler)
	s.Handlers.Send.PushFrontNamed(StartHandler)

	s.Handlers.Complete.PushBackNamed(FinishHandler)
}
84890
func WithNotFoundHandler(h http.Handler) RouterOption {
	return func(router *Router) {
		router.notFoundHandler = h
	}
}
1202233
func (builder *StoreBucketPropsCommandBuilder) WithR(r uint32) *StoreBucketPropsCommandBuilder {
	builder.props.R = &r
	return builder
}
1134682
func HTTPHandler(opts ...HandlerOption) Handler {
	h := &httpHandler{}
	h.Init(opts...)
	return h
}