instrumenter

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package instrumenter provides an interface for observing cache, ratelimit and HTTP operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NullFinish added in v0.33.0

func NullFinish(error)

NullFinish helper when no error handling is needed.

func NullInstrumenter

func NullInstrumenter(_ context.Context, _ string, _ ...any) func(err error)

NullInstrumenter is a no-op instrumenter.

func ObserveKey added in v0.33.0

func ObserveKey(ctx context.Context, i Instrumenter, op, key string) func(error)

ObserveKey helper for instrumenting operations with a single key argument.

Types

type Instrumenter

type Instrumenter func(ctx context.Context, op string, args ...any) func(err error)

Instrumenter defines function type that can be used for instrumentation. This function should return a function with no argument as a callback for finished execution.

func CombinedInstrumenter

func CombinedInstrumenter(instr ...Instrumenter) Instrumenter

CombinedInstrumenter is an instrumenter that combines multiple instrumenters.

func (Instrumenter) Observe

func (i Instrumenter) Observe(ctx context.Context, op string, args ...any) func(err error)

Observe operation.

Jump to

Keyboard shortcuts

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