httpgrpcutil

package
v1.20.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParentContextForRequest added in v1.20.0

func GetParentContextForRequest(ctx context.Context, req *httpgrpc.HTTPRequest) context.Context

GetParentContextForRequest extracts parent trace context from HTTP request headers and attaches it to the provided context using OTel propagation.

func PrioritizeRecoverableErr

func PrioritizeRecoverableErr(errs ...error) error

PrioritizeRecoverableErr checks whether in the given slice of errors there is a recoverable error, if yes then it will return the first recoverable error, if not then it will return the first non-recoverable error, if there is no error at all then it will return nil.

Types

type HttpgrpcHeadersCarrier

type HttpgrpcHeadersCarrier httpgrpc.HTTPRequest

HttpgrpcHeadersCarrier implements propagation.TextMapCarrier for OTel trace context propagation over httpgrpc requests.

func (*HttpgrpcHeadersCarrier) Get added in v1.20.0

func (c *HttpgrpcHeadersCarrier) Get(key string) string

Get implements propagation.TextMapCarrier for OTel.

func (*HttpgrpcHeadersCarrier) Keys added in v1.20.0

func (c *HttpgrpcHeadersCarrier) Keys() []string

Keys implements propagation.TextMapCarrier for OTel.

func (*HttpgrpcHeadersCarrier) Set

func (c *HttpgrpcHeadersCarrier) Set(key, val string)

Set implements propagation.TextMapCarrier for OTel.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL