context

package
v0.0.0-...-cb950d2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(parent context.Context) context.Context

Clone copy the origin mosn value context(if it is), and return new one

func Get

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

func WithValue

func WithValue(parent context.Context, key types.ContextKey, value interface{}) context.Context

The following context topology will leads to existed pair {'foo':'bar'} NOT FOUND, because recursive lookup for key-type=ContextKey is not supported by mosn.valueCtx.

topology: context.Background -> mosn.valueCtx{'foo':'bar'} -> context.valueCtx -> mosn.valueCtx{'hmm':'haa'}

Types

This section is empty.

Jump to

Keyboard shortcuts

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