context

package
v0.0.0-...-2ef827d Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detach

func Detach(ctx context.Context) context.Context

Detach returns a context that keeps all the values of its parent context but detaches from the cancellation and error handling.

Types

type Context

type Context interface {
	context.Context

	Logger() logging.Logger
	Span() (Context, trace.Span)
	SpanByName(name string) (Context, trace.Span)

	WithError(err error) Context
	WithField(key string, value interface{}) Context
	WithFields(fields logging.Fields) Context
}

func New

func New(ctx context.Context, telemetry Telemetry) Context

func NewBackground

func NewBackground(telemetry Telemetry) Context

type MockExecutionContext

type MockExecutionContext struct {
	mock.Mock
}

MockExecutionContext is an autogenerated mock type for the ExecutionContext type

func (*MockExecutionContext) GetContext

func (_m *MockExecutionContext) GetContext() context.Context

GetContext provides a mock function with given fields:

func (*MockExecutionContext) GetContextWithTransactionID

func (_m *MockExecutionContext) GetContextWithTransactionID() (context.Context, error)

GetContextWithTransactionID provides a mock function with given fields:

func (*MockExecutionContext) GetLogger

func (_m *MockExecutionContext) GetLogger() logging.Logger

GetLogger provides a mock function with given fields:

func (*MockExecutionContext) GetTransactionID

func (_m *MockExecutionContext) GetTransactionID() (string, error)

GetTransactionID provides a mock function with given fields:

type MockExecutionContextWithoutTransactionID

type MockExecutionContextWithoutTransactionID struct {
	mock.Mock
}

MockExecutionContextWithoutTransactionID is an autogenerated mock type for the ExecutionContextWithoutTransactionID type

func (*MockExecutionContextWithoutTransactionID) GetContext

GetContext provides a mock function with given fields:

func (*MockExecutionContextWithoutTransactionID) GetLogger

GetLogger provides a mock function with given fields:

type Telemetry

type Telemetry struct {
	Logger logging.Logger
	Tracer trace.Tracer
}

Jump to

Keyboard shortcuts

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