context

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTargetKeyNotPresent = errors.New("target key not present in the context")
	ErrBrokerKeyNotPresent = errors.New("broker key not present in the context")
)

Functions

func GetBrokerKey

func GetBrokerKey(ctx context.Context) (string, error)

GetBrokerKey gets the broker key from the context.

func GetTargetKey added in v0.15.0

func GetTargetKey(ctx context.Context) (string, error)

GetTargetKey gets a target key from the context.

func WithBrokerKey

func WithBrokerKey(ctx context.Context, key string) context.Context

WithBrokerKey sets a broker key in the context.

func WithTargetKey added in v0.15.0

func WithTargetKey(ctx context.Context, key string) context.Context

WithTargetKey sets a target key in the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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