context

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func GetBroker

func GetBroker(ctx context.Context) (*config.Broker, error)

GetBroker gets a broker from the context.

func GetBrokerKey

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

GetBrokerKey gets the broker key from the context.

func GetTarget

func GetTarget(ctx context.Context) (*config.Target, error)

GetTarget gets a target from the context.

func WithBroker

func WithBroker(ctx context.Context, b *config.Broker) context.Context

WithBroker sets a broker in the context.

func WithBrokerKey

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

WithBrokerKey sets a broker key in the context.

func WithTarget

func WithTarget(ctx context.Context, t *config.Target) context.Context

WithTarget sets a target 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