keymod

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Overview

Package keymod provides functions for modifying keys.

This package is particularly useful when working with distributed caching systems like Redis Cluster, where keys containing "{hashTag}" are ensured to exist on the same node. This allows related keys to be stored together, enabling multi-key operations like transactions and Lua scripts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key added in v0.15.0

type Key string

Key represents a key in a distributed caching system.

func (Key) Prefix added in v0.15.0

func (k Key) Prefix(text string) Key

Prefix prepends the given text to the key.

func (Key) String added in v0.15.0

func (k Key) String() string

func (Key) Suffix added in v0.15.0

func (k Key) Suffix(text string) Key

Suffix appends the given text to the key.

func (Key) TagPrefix added in v0.15.0

func (k Key) TagPrefix(text string) Key

TagPrefix wraps the given text in curly braces and prepends it to the key.

func (Key) TagSuffix added in v0.15.0

func (k Key) TagSuffix(text string) Key

TagSuffix wraps the given text in curly braces and appends it to the key.

Jump to

Keyboard shortcuts

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