Ejemplo n.º 1
0
func (m *Mux) AddSessionlessHandler(request handler.Request) {
	if request.Metrics == nil {
		request.Metrics = m.Metrics
	}
	hHandler := handler.Wrapper(request)

	m.mux.Handle(request.Type, request.Endpoint, hHandler)
}
Ejemplo n.º 2
0
func (m *Mux) AddHandler(request handler.Request) {
	if request.Metrics == nil {
		request.Metrics = m.Metrics
	}
	hHandler := handler.Wrapper(request)
	hHandler = handler.BuildHandlerWithContext(hHandler, m.log)

	m.mux.Handle(request.Type, request.Endpoint, hHandler)
}