context

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToPropagateCtx

func AddToPropagateCtx(ctx context.Context, key string, val interface{}) context.Context

AddToPropagateCtx adds a key and value that will be propagated through RPC calls

func Decode

func Decode(m []byte) (context.Context, error)

Decode returns a context given a binary encoded message

func Encode

func Encode(ctx context.Context) ([]byte, error)

Encode returns the given propagatable context encoded in binary format

func FromMap

func FromMap(val map[string]interface{}) context.Context

FromMap creates a new context from a map with propagated values

func GetFromPropagateCtx

func GetFromPropagateCtx(ctx context.Context, key string) interface{}

GetFromPropagateCtx get a value from the propagate

func ToMap

func ToMap(ctx context.Context) map[string]interface{}

ToMap returns the values that will be propagated through RPC calls in map[string]interface{} format

Types

This section is empty.

Jump to

Keyboard shortcuts

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