tracing

package
v0.10.13 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 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 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

func NewWrapper[T any](cache types.Cache[T], cacheType string) *Wrapper[T]

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]) Delete added in v0.10.13

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

Delete removes a key from the cache with tracing

func (*Wrapper[T]) Exists added in v0.10.13

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

Exists checks if a key exists in the cache with tracing

func (*Wrapper[T]) Get added in v0.10.13

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

Get retrieves a value by key with tracing

func (*Wrapper[T]) Len added in v0.10.13

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

Len returns the number of items in the cache with tracing

func (*Wrapper[T]) Peek added in v0.10.13

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

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

func (*Wrapper[T]) Set added in v0.10.13

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

Set stores a key-value pair with tracing

func (*Wrapper[T]) WithContext added in v0.10.13

func (tw *Wrapper[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