Versions in this module Expand all Collapse all v0 v0.1.0 Jun 16, 2025 Changes in this version + const ScopeName + func Apply[T any](ops []SetOption[T], o *Options[T]) + func ElapsedTime(startTime time.Time) float64 + func Version() string + type CmdMetricAttributesFn func(sentCmd hooks.SentCmd[T], status semconv.CmdStreamCommandStatus, ...) []attribute.KeyValue + type Hooks struct + func (h *Hooks[T]) BeforeSend(ctx context.Context, cmd core.Cmd[T]) (context.Context, error) + func (h *Hooks[T]) OnError(ctx context.Context, sentCmd hooks.SentCmd[T], err error) + func (h *Hooks[T]) OnResult(ctx context.Context, sentCmd hooks.SentCmd[T], recvResult hooks.ReceivedResult, ...) + func (h *Hooks[T]) OnTimeout(ctx context.Context, sentCmd hooks.SentCmd[T], err error) + type HooksFactory struct + func NewHooksFactory[T any](ops ...SetOption[T]) HooksFactory[T] + func (f HooksFactory[T]) New() hooks.Hooks[T] + type Invoker struct + func NewInvoker[T any](invoker handler.Invoker[T], ops ...SetOption[T]) Invoker[T] + func (i Invoker[T]) Invoke(ctx context.Context, seq core.Seq, at time.Time, bytesRead int, ...) (err error) + type Options struct + CmdMetricAttributesFn CmdMetricAttributesFn[T] + Meter metric.Meter + MeterProvider metric.MeterProvider + Propagator propagation.TextMapPropagator + ResultMetricAttributesFn ResultMetricAttributesFn[T] + ServerAddr net.Addr + SpanAttributesFn SpanAttributesFn[T] + SpanNameFormatter SpanNameFormatterFn[T] + SpanResultEventAttributesFn SpanResultEventAttributesFn[T] + SpanStartOptions []trace.SpanStartOption + Tracer trace.Tracer + TracerProvider trace.TracerProvider + func (o Options[T]) CmdMetricAttributes(sentCmd hooks.SentCmd[T], status semconv.CmdStreamCommandStatus, ...) (attrs []attribute.KeyValue) + func (o Options[T]) ResultMetricAttributes(sentCmd hooks.SentCmd[T], recvResult hooks.ReceivedResult, elapsedTime float64) (attrs []attribute.KeyValue) + func (o Options[T]) SpanAttributes(peerAddr net.Addr, sentCmd hooks.SentCmd[T]) (attrs []attribute.KeyValue) + func (o Options[T]) SpanResultEventAttributes(sentCmd hooks.SentCmd[T], recvResult hooks.ReceivedResult) (attrs []attribute.KeyValue) + type Proxy struct + func NewProxy[T any](proxy core.Proxy, callback ProxyCallbackFn) *Proxy[T] + func (p *Proxy[T]) LocalAddr() net.Addr + func (p *Proxy[T]) RemoteAddr() net.Addr + func (p *Proxy[T]) Send(seq core.Seq, result core.Result) (n int, err error) + func (p *Proxy[T]) SendWithDeadline(seq core.Seq, result core.Result, deadline time.Time) (n int, err error) + type ProxyCallbackFn func(recvResult hooks.ReceivedResult) + type ResultMetricAttributesFn func(sentCmd hooks.SentCmd[T], recvResult hooks.ReceivedResult, elapsedTime float64) []attribute.KeyValue + type SetOption func(o *Options[T]) + func WithCmdMetricAttributesFn[T any](fn CmdMetricAttributesFn[T]) SetOption[T] + func WithMeterProvider[T any](mp metric.MeterProvider) SetOption[T] + func WithPropagator[T any](p propagation.TextMapPropagator) SetOption[T] + func WithResultMetricAttributesFn[T any](fn ResultMetricAttributesFn[T]) SetOption[T] + func WithServerAddr[T any](addr net.Addr) SetOption[T] + func WithSpanAttributesFn[T any](fn SpanAttributesFn[T]) SetOption[T] + func WithSpanNameFormatter[T any](f SpanNameFormatterFn[T]) SetOption[T] + func WithSpanResultEventAttributesFn[T any](fn SpanResultEventAttributesFn[T]) SetOption[T] + func WithSpanStartOption[T any](s trace.SpanStartOption) SetOption[T] + func WithTracerProvider[T any](tp trace.TracerProvider) SetOption[T] + type SpanAttributesFn func(remoteAddr net.Addr, sentCmd hooks.SentCmd[T]) []attribute.KeyValue + type SpanNameFormatterFn func(cmd core.Cmd[T]) string + type SpanResultEventAttributesFn func(sentCmd hooks.SentCmd[T], recvResult hooks.ReceivedResult) []attribute.KeyValue + type TraceCmd struct + Cmd V + MapCarrier *map[string]string + func NewTraceCmd[T any, V core.Cmd[T]](cmd V) TraceCmd[T, V] + func (c TraceCmd[T, V]) Carrier() (carrier map[string]string) + func (c TraceCmd[T, V]) Exec(ctx context.Context, seq core.Seq, at time.Time, receiver T, proxy core.Proxy) error + func (c TraceCmd[T, V]) InnerCmd() core.Cmd[T] + func (c TraceCmd[T, V]) SetCarrier(carrier map[string]string) + func (c TraceCmd[T, V]) TypeStr() string