contextpropagation

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(ctx context.Context, metadata *core.WorkflowMetadata, propagators []ContextPropagator) (context.Context, error)

func ExtractToWorkflow

func ExtractToWorkflow(ctx sync.Context, metadata *core.WorkflowMetadata, propagators []ContextPropagator) (sync.Context, error)

func Inject

func Inject(ctx context.Context, metadata *core.WorkflowMetadata, propagators []ContextPropagator) error

func InjectFromWorkflow

func InjectFromWorkflow(ctx sync.Context, metadata *core.WorkflowMetadata, propagators []ContextPropagator) error

func WithPropagators

func WithPropagators(ctx sync.Context, propagators []ContextPropagator) sync.Context

Types

type ContextPropagator

type ContextPropagator interface {
	Inject(context.Context, *core.WorkflowMetadata) error
	Extract(context.Context, *core.WorkflowMetadata) (context.Context, error)

	InjectFromWorkflow(sync.Context, *core.WorkflowMetadata) error
	ExtractToWorkflow(sync.Context, *core.WorkflowMetadata) (sync.Context, error)
}

func Propagators

func Propagators(ctx sync.Context) []ContextPropagator

Jump to

Keyboard shortcuts

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