Files
opencloud/extensions/web/pkg/service/v0/tracing.go
Christian Richter e5abc25aa1 refactor web
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-04-13 17:04:38 +02:00

27 lines
486 B
Go

package svc
import (
"net/http"
)
// NewTracing returns a service that instruments traces.
func NewTracing(next Service) Service {
return tracing{
next: next,
}
}
type tracing struct {
next Service
}
// ServeHTTP implements the Service interface.
func (t tracing) ServeHTTP(w http.ResponseWriter, r *http.Request) {
t.next.ServeHTTP(w, r)
}
// Config implements the Service interface.
func (t tracing) Config(w http.ResponseWriter, r *http.Request) {
t.next.Config(w, r)
}