keyspace

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeNamespace

func NormalizeNamespace(ns string) string

规范化命名空间,去除开头和结尾的冒号。

Types

type KeyPattern

type KeyPattern string

KeyPattern 键模式,用于 SCAN 和 purge 操作。

func NewKeyPattern

func NewKeyPattern(pattern string) KeyPattern

创建规范化键模式。

func (KeyPattern) String

func (p KeyPattern) String() string

返回原始键模式字符串。

type Keyspace

type Keyspace struct {
	// contains filtered or unexported fields
}

Keyspace 键空间,用于将 Redis 键分组的一种机制。

func New

func New(namespace string) Keyspace

创建键空间。

func NewFromNamespace

func NewFromNamespace(namespace Namespace) Keyspace

NewFromNamespace 从命名空间值对象创建 Keyspace。

func (Keyspace) Child

func (k Keyspace) Child(child string) Keyspace

Child 在当前命名空间下继续派生子命名空间。

func (Keyspace) Namespace

func (k Keyspace) Namespace() Namespace

Namespace 返回当前 Keyspace 的命名空间。

func (Keyspace) Pattern

func (k Keyspace) Pattern(pattern string) KeyPattern

Pattern 返回带命名空间前缀的模式值对象。

func (Keyspace) Prefix

func (k Keyspace) Prefix(key string) string

Prefix 为键附加命名空间前缀。

type Namespace

type Namespace string

Namespace 命名空间,用于将 Redis 键分组的一种机制。

func NewNamespace

func NewNamespace(ns string) Namespace

创建规范化命名空间。

func (Namespace) String

func (n Namespace) String() string

返回规范化命名空间。

Jump to

Keyboard shortcuts

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