adapter

package
v0.0.0-...-80b5034 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractFields

type AbstractFields = field.AbstractFields

AbstractFields is just a type alias for field.AbstractFields (for convenience).

type Emitter

type Emitter = errmontypes.Emitter

Emitter is just a type alias for errmontypes.Emitter (for convenience).

type ErrorMonitor

type ErrorMonitor = errmontypes.ErrorMonitor

ErrorMonitor is just a type alias for errmontypes.ErrorMonitor (for convenience).

func ErrorMonitorFromEmitter

func ErrorMonitorFromEmitter(
	emitter Emitter,
	callerFrameFilter runtime.PCFilter,
) ErrorMonitor

ErrorMonitorFromEmitter wraps a Emitter with a generic implementation of of ErrorMonitor.

type Event

type Event = errmontypes.Event

Event is just a type alias for errmontypes.Event (for convenience).

type FieldsChain

type FieldsChain = field.FieldsChain

FieldsChain is just a type alias for field.FieldsChain (for convenience).

type GenericErrorMonitor

type GenericErrorMonitor struct {
	EmitterValue      Emitter
	CallerFrameFilter runtime.PCFilter
	ContextFields     *FieldsChain
	TraceIDs          TraceIDs
	PreHooks          PreHooks
	Hooks             Hooks
}

GenericErrorMonitor implements ErrorMonitor given a Emitter.

func (*GenericErrorMonitor) Emitter

func (h *GenericErrorMonitor) Emitter() Emitter

Emitter implements errmon.ErrorMonitor

func (*GenericErrorMonitor) Flush

func (*GenericErrorMonitor) Flush()

Flush implements metrics.Metrics (or more specifically belt.Tool).

func (*GenericErrorMonitor) ObserveError

func (h *GenericErrorMonitor) ObserveError(belt *belt.Belt, err error) *Event

ObserveError implements errmon.ErrorMonitor

func (*GenericErrorMonitor) ObserveRecover

func (h *GenericErrorMonitor) ObserveRecover(belt *belt.Belt, recoverResult any) *Event

ObserveRecover implements errmon.ErrorMonitor

func (*GenericErrorMonitor) WithContextFields

func (h *GenericErrorMonitor) WithContextFields(allFields *FieldsChain, _ int) belt.Tool

WithContextFields implements errmon.ErrorMonitor

func (*GenericErrorMonitor) WithHooks

func (h *GenericErrorMonitor) WithHooks(hooks ...Hook) ErrorMonitor

WithHooks implements errmon.ErrorMonitor

func (*GenericErrorMonitor) WithPreHooks

func (h *GenericErrorMonitor) WithPreHooks(preHooks ...PreHook) ErrorMonitor

WithPreHooks implements errmon.ErrorMonitor

func (*GenericErrorMonitor) WithTraceIDs

func (h *GenericErrorMonitor) WithTraceIDs(allTraceIDs TraceIDs, _ int) belt.Tool

WithTraceIDs implements errmon.ErrorMonitor

type Hook

type Hook = errmontypes.Hook

Hook is just a type alias for errmontypes.Hook (for convenience).

type Hooks

type Hooks = errmontypes.Hooks

Hooks is just a type alias for errmontypes.Hooks (for convenience).

type PreHook

type PreHook = errmontypes.PreHook

PreHook is just a type alias for errmontypes.PreHook (for convenience).

type PreHooks

type PreHooks = errmontypes.PreHooks

PreHooks is just a type alias for errmontypes.PreHooks (for convenience).

type TraceIDs

type TraceIDs = belt.TraceIDs

TraceIDs is just a type alias for belt.TraceIDs (for convenience).

Jump to

Keyboard shortcuts

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