context

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 3 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) (*config.BrokerKey, error)

GetBrokerKey gets the broker key from the context.

func GetTargetKey added in v0.15.0

func GetTargetKey(ctx context.Context) (*config.TargetKey, error)

GetTargetKey gets a target key from the context.

func WithBrokerKey

func WithBrokerKey(ctx context.Context, key *config.BrokerKey) context.Context

WithBrokerKey sets a broker key in the context.

func WithTargetKey added in v0.15.0

func WithTargetKey(ctx context.Context, key *config.TargetKey) 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