Documentation
¶
Index ¶
- type TracingWrapper
- func (tw *TracingWrapper[T]) Clear()
- func (tw *TracingWrapper[T]) Delete(key string) error
- func (tw *TracingWrapper[T]) Exists(key string) bool
- func (tw *TracingWrapper[T]) Get(key string) (T, error)
- func (tw *TracingWrapper[T]) Len() int
- func (tw *TracingWrapper[T]) Peek(key string) (T, error)
- func (tw *TracingWrapper[T]) Set(key string, value T, ttl time.Duration) error
- func (tw *TracingWrapper[T]) WithContext(ctx context.Context) types.Cache[T]
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]
Click to show internal directories.
Click to hide internal directories.