utils

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultOperationTimeout is the default timeout for Redis operations (5 seconds)
	DefaultOperationTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

func BuildKey

func BuildKey(prefix, key string) string

BuildKey constructs a key with the given prefix

func BuildKeys

func BuildKeys(prefix string, keys ...string) []string

BuildKeys constructs multiple keys with the given prefix

func WithDefaultTimeout

func WithDefaultTimeout(ctx context.Context) (context.Context, context.CancelFunc)

WithDefaultTimeout creates a context with the default operation timeout

func WithTimeout

func WithTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

WithTimeout creates a context with the given timeout

Types

This section is empty.

Jump to

Keyboard shortcuts

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