Documentation ¶
Index ¶
- func Wrap(scope tally.Scope, name string, ctx context.Context, operation OperationFn, ...) error
- func WrapWithResult[T any](scope tally.Scope, name string, ctx context.Context, ...) (T, error)
- type FilterFn
- type Instrument
- type InstrumentOption
- type InstrumentWithResult
- type OperationFn
- type OperationWithResultFn
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Instrument ¶
type Instrument interface { Instrument(ctx context.Context, operation OperationFn, opts ...InstrumentOption) error WithRetry(retry retry.Retry) Instrument }
func New ¶
func New(scope tally.Scope, name string, opts ...Option) Instrument
type InstrumentOption ¶
type InstrumentOption func(options *instrumentOptions)
func WithLoggerFields ¶
type InstrumentWithResult ¶
type InstrumentWithResult[T any] interface { Instrument(ctx context.Context, operation OperationWithResultFn[T], opts ...InstrumentOption) (T, error) WithRetry(retry retry.RetryWithResult[T]) InstrumentWithResult[T] }
func NewWithResult ¶
func NewWithResult[T any](scope tally.Scope, name string, opts ...Option) InstrumentWithResult[T]
type OperationFn ¶
type Option ¶
type Option func(c *options)
func WithFilter ¶
func WithFilter(filter FilterFn) Option
func WithLogger ¶
func WithTimeSource ¶
func WithTimeSource(timeSource timesource.TimeSource) Option
func WithTracer ¶
Click to show internal directories.
Click to hide internal directories.