Files
opencloud/webdav/pkg/service/v0/tracing.go
A.Unger 72a987f8e3 Add 'webdav/' from commit '0d5eded8d0068b8df984b3d4c44a66f10c97cf77'
git-subtree-dir: webdav
git-subtree-mainline: 7ffaa859b3
git-subtree-split: 0d5eded8d0
2020-09-18 12:56:12 +02:00

27 lines
495 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)
}
// Thumbnail implements the Service interface.
func (t tracing) Thumbnail(w http.ResponseWriter, r *http.Request) {
t.next.Thumbnail(w, r)
}