Documentation
¶
Index ¶
- func GetHeader(r httpgrpc.HTTPRequest, key string) string
- func GetHeaderValues(r httpgrpc.HTTPRequest, key string) []string
- func GetParentSpanForRequest(tracer opentracing.Tracer, req *httpgrpc.HTTPRequest) (opentracing.SpanContext, error)
- func WrapHTTPGrpcError(err error, format string, args ...interface{}) error
- type HttpgrpcHeadersCarrier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHeader ¶ added in v1.17.0
func GetHeader(r httpgrpc.HTTPRequest, key string) string
GetHeader is similar to http.Header.Get, which gets the first value associated with the given key. If there are no values associated with the key, it returns "".
func GetHeaderValues ¶ added in v1.17.0
func GetHeaderValues(r httpgrpc.HTTPRequest, key string) []string
GetHeaderValues is similar to http.Header.Values, which returns all values associated with the given key.
func GetParentSpanForRequest ¶
func GetParentSpanForRequest(tracer opentracing.Tracer, req *httpgrpc.HTTPRequest) (opentracing.SpanContext, error)
func WrapHTTPGrpcError ¶ added in v1.16.0
Types ¶
type HttpgrpcHeadersCarrier ¶
type HttpgrpcHeadersCarrier httpgrpc.HTTPRequest
Used to transfer trace information from/to HTTP request.
func (*HttpgrpcHeadersCarrier) ForeachKey ¶
func (c *HttpgrpcHeadersCarrier) ForeachKey(handler func(key, val string) error) error
func (*HttpgrpcHeadersCarrier) Set ¶
func (c *HttpgrpcHeadersCarrier) Set(key, val string)
Click to show internal directories.
Click to hide internal directories.