mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 22:25:03 +00:00
*: revendor dependencies after moving to go1.12
This commit is contained in:
parent
a47edfe5a9
commit
552284f174
371 changed files with 57445 additions and 108763 deletions
13
vendor/golang.org/x/net/trace/trace.go
generated
vendored
13
vendor/golang.org/x/net/trace/trace.go
generated
vendored
|
|
@ -64,6 +64,7 @@ package trace // import "golang.org/x/net/trace"
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io"
|
||||
|
|
@ -124,6 +125,18 @@ func init() {
|
|||
http.HandleFunc("/debug/events", Events)
|
||||
}
|
||||
|
||||
// NewContext returns a copy of the parent context
|
||||
// and associates it with a Trace.
|
||||
func NewContext(ctx context.Context, tr Trace) context.Context {
|
||||
return context.WithValue(ctx, contextKey, tr)
|
||||
}
|
||||
|
||||
// FromContext returns the Trace bound to the context, if any.
|
||||
func FromContext(ctx context.Context) (tr Trace, ok bool) {
|
||||
tr, ok = ctx.Value(contextKey).(Trace)
|
||||
return
|
||||
}
|
||||
|
||||
// Traces responds with traces from the program.
|
||||
// The package initialization registers it in http.DefaultServeMux
|
||||
// at /debug/requests.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue