observability

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithCorrelationID

func ContextWithCorrelationID(ctx context.Context, correlationID string) context.Context

func CorrelationIdFromContext

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

func NewCommandDecorator

func NewCommandDecorator[C any](base CommandHandler[C], logger *logs.Logger) commandDecorator[C]

func NewCommandWithResultDecorator

func NewCommandWithResultDecorator[C, R any](base CommandWithResultHandler[C, R], logger *logs.Logger) commandWithResultDecorator[C, R]

func NewCorrelationID

func NewCorrelationID() string

func NewQueryDecorator

func NewQueryDecorator[Q any, R any](base QueryHandler[Q, R], logger *logs.Logger) queryDecorator[Q, R]

Types

type CommandHandler

type CommandHandler[C any] interface {
	Execute(ctx context.Context, cmd C) (err error)
}

type CommandWithResultHandler

type CommandWithResultHandler[C any, R any] interface {
	Execute(ctx context.Context, cmd C) (result R, err error)
}

type QueryHandler

type QueryHandler[Q any, R any] interface {
	Execute(ctx context.Context, q Q) (result R, err error)
}

Jump to

Keyboard shortcuts

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