cherryContext

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

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

Add 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 Get

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

Get get a value from the propagate

func GetMessageId

func GetMessageId(ctx context.Context) uint

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