mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-16 01:49:00 -06:00
27 lines
492 B
Go
27 lines
492 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)
|
|
}
|
|
|
|
// ConfigJs implements the Service interface.
|
|
func (t tracing) ConfigJs(w http.ResponseWriter, r *http.Request) {
|
|
t.next.ConfigJs(w, r)
|
|
}
|