mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-04 15:27:17 -05:00
37 lines
760 B
Go
37 lines
760 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)
|
|
}
|
|
|
|
// GetMe implements the Service interface.
|
|
func (t tracing) GetMe(w http.ResponseWriter, r *http.Request) {
|
|
t.next.GetMe(w, r)
|
|
}
|
|
|
|
// GetUsers implements the Service interface.
|
|
func (t tracing) GetUsers(w http.ResponseWriter, r *http.Request) {
|
|
t.next.GetUsers(w, r)
|
|
}
|
|
|
|
// GetUser implements the Service interface.
|
|
func (t tracing) GetUser(w http.ResponseWriter, r *http.Request) {
|
|
t.next.GetUser(w, r)
|
|
}
|