Source File
propagation.go
Belonging Package
go.opentelemetry.io/otel/api/propagation
package propagation
import (
)
Extract(context.Context, HTTPSupplier) context.Context
}
Inject(context.Context, HTTPSupplier)
}
type Config struct {
httpEx []HTTPExtractor
httpIn []HTTPInjector
}
HTTPExtractors() []HTTPExtractor
HTTPInjectors() []HTTPInjector
}
type HTTPPropagator interface {
HTTPInjector
HTTPExtractor
GetAllKeys() []string
}
type propagators struct {
config Config
}
func ( ...Option) Propagators {
:= Config{}
for , := range {
(&)
}
return &propagators{
config: ,
}
}
func ( *propagators) () []HTTPExtractor {
return .config.httpEx
}
func ( *propagators) () []HTTPInjector {
return .config.httpIn
}
func ( context.Context, Propagators, HTTPSupplier) context.Context {
for , := range .HTTPExtractors() {
= .Extract(, )
}
return
}
func ( context.Context, Propagators, HTTPSupplier) {
for , := range .HTTPInjectors() {
.Inject(, )
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |