Documentation
¶
Index ¶
- type Wrapper
- func (tw *Wrapper[T]) Clear()
- func (tw *Wrapper[T]) Delete(key string) error
- func (tw *Wrapper[T]) Exists(key string) bool
- func (tw *Wrapper[T]) Get(key string) (T, error)
- func (tw *Wrapper[T]) Len() int
- func (tw *Wrapper[T]) Peek(key string) (T, error)
- func (tw *Wrapper[T]) Set(key string, value T, ttl time.Duration) error
- func (tw *Wrapper[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 Wrapper ¶ added in v0.10.13
type Wrapper[T any] struct { // contains filtered or unexported fields }
Wrapper wraps a Cache implementation with distributed tracing capabilities
func NewWrapper ¶ added in v0.10.13
NewWrapper creates a new tracing wrapper for the given cache
func (*Wrapper[T]) Clear ¶ added in v0.10.13
func (tw *Wrapper[T]) Clear()
Clear removes all items from the cache with tracing
func (*Wrapper[T]) Exists ¶ added in v0.10.13
Exists checks if a key exists in the cache with tracing
func (*Wrapper[T]) Len ¶ added in v0.10.13
Len returns the number of items in the cache with tracing
func (*Wrapper[T]) Peek ¶ added in v0.10.13
Peek retrieves a value by key without affecting its position with tracing
Click to show internal directories.
Click to hide internal directories.