context

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CorrelationIdBackground = "BACKGROUND"
	CorrelationIdStartUp    = "START_UP"
	CorrelationIdShutDown   = "SHUT_DOWN"
)

Correlation ID enums

Variables

This section is empty.

Functions

func Background

func Background() context.Context

Background returns a new background context with background correlation ID enum

func CorrelationId

func CorrelationId(ctx context.Context) string

CorrelationId returns correlation ID value of ctx

func New

func New(ctx context.Context) context.Context

New context with correlation ID of ctx with newly appended ctx, test value of ctx, and other defaults

func ShutDown

func ShutDown() context.Context

ShutDown returns a new background context with shut down correlation ID enum

func StartUp

func StartUp() context.Context

StartUp returns a new background context with start up correlation ID enum

func Test

func Test(ctx context.Context) bool

Test returns test value of ctx

func WithCorrelationId

func WithCorrelationId(ctx context.Context, correlationId string) context.Context

WithCorrelationId returns a new context with correlation ID value

func WithCorrelationIdAppend

func WithCorrelationIdAppend(ctx context.Context, correlationId string) context.Context

WithCorrelationIdAppend returns a new context with correlation ID value appended to existing correlation ID value if one exists

func WithTest

func WithTest(ctx context.Context, test bool) context.Context

WithTest returns a new context with test value

Types

This section is empty.

Jump to

Keyboard shortcuts

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