tracing

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TracingWrapper

type TracingWrapper[T any] struct {
	// contains filtered or unexported fields
}

TracingWrapper wraps a Cache implementation with distributed tracing capabilities

func NewTracingWrapper

func NewTracingWrapper[T any](cache types.Cache[T], cacheType string) *TracingWrapper[T]

NewTracingWrapper creates a new tracing wrapper for the given cache

func (*TracingWrapper[T]) Clear

func (tw *TracingWrapper[T]) Clear()

Clear removes all items from the cache with tracing

func (*TracingWrapper[T]) Delete

func (tw *TracingWrapper[T]) Delete(key string) error

Delete removes a key from the cache with tracing

func (*TracingWrapper[T]) Exists

func (tw *TracingWrapper[T]) Exists(key string) bool

Exists checks if a key exists in the cache with tracing

func (*TracingWrapper[T]) Get

func (tw *TracingWrapper[T]) Get(key string) (T, error)

Get retrieves a value by key with tracing

func (*TracingWrapper[T]) Len

func (tw *TracingWrapper[T]) Len() int

Len returns the number of items in the cache with tracing

func (*TracingWrapper[T]) Peek

func (tw *TracingWrapper[T]) Peek(key string) (T, error)

Peek retrieves a value by key without affecting its position with tracing

func (*TracingWrapper[T]) Set

func (tw *TracingWrapper[T]) Set(key string, value T, ttl time.Duration) error

Set stores a key-value pair with tracing

func (*TracingWrapper[T]) WithContext

func (tw *TracingWrapper[T]) WithContext(ctx context.Context) types.Cache[T]

Jump to

Keyboard shortcuts

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