Documentation
¶
Overview ¶
Package xray provides standard means for introspecting the internal operational state of an [api.Linker].
Index ¶
- func ContextAdd(ctx context.Context, value any)
- func ContextGet[T any](ctx context.Context) T
- func ContextHas[T any](ctx context.Context) bool
- func ContextOff(ctx context.Context) context.Context
- func Error(err error, skip int) error
- func New(err error) error
- func NewContext(ctx context.Context) context.Context
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextAdd ¶
ContextAdd a value to the xray context, it can be retrieved later with Get.
func ContextGet ¶
ContextGet a value from the xray context, if it exists. Otherwise a zero value is returned.
func ContextHas ¶
ContextHas returns true if the xray context has a value of the given type.
func ContextOff ¶
ContextOff returns a new xray context that will not record any values.
func Error ¶
Error wraps the provided error with the caller's file and line number. Skipping the provided number of frames.
Types ¶
Click to show internal directories.
Click to hide internal directories.