natscarrier

package
v0.0.0-...-0c3af6b Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package natscarrier provides an OTEL TextMapCarrier implementation for NATS messages.

The carrier can be used to inject and extract trace/span IDs from a nats.Msg via go.opentelemetry.io/otel/propagation.TextMapPropagator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header nats.Header

Header implements the go.opentelemetry.io/otel/propagation.TextMapCarrier interface using a nats.Header held in memory as a storage

func (Header) Get

func (h Header) Get(key string) string

Get returns the value associated with the passed key

func (Header) Keys

func (h Header) Keys() []string

Keys lists the keys stored in this carrier

func (Header) Set

func (h Header) Set(key string, value string)

Set stores the key-value pair

func (Header) String

func (h Header) String() string

String implements the fmt.Stringer interface, see Header

Jump to

Keyboard shortcuts

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