header

package
v1.0.396 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToCtx

func ToCtx(ctx context.Context, values Values) context.Context

ToCtx creates a child context containing headers

func ToMsg

func ToMsg(ctx context.Context, values Values, msg *nats.Msg) error

ToMsg inserts SHAR headers into a nats message

Types

type Values

type Values map[string]string

Values is a container for SHAR header values

func FromCtx

func FromCtx(ctx context.Context) (v Values)

FromCtx extracts headers from a context

func FromMsg

func FromMsg(ctx context.Context, msg *nats.Msg) (Values, error)

FromMsg extracts SHAR headers from a NATS message

Jump to

Keyboard shortcuts

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