valkeystore

package module
v0.0.0-...-7731494 Latest Latest
Warning

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

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

Documentation

Overview

Package valkeystore provides a targeting.Store backed by Valkey or Redis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store wraps a go-redis client to satisfy targeting.Store.

func New

func New(rdb redis.Cmdable) *Store

New creates a Store from a go-redis client. Accepts *redis.Client, *redis.ClusterClient, or any redis.Cmdable.

func (*Store) Exists

func (s *Store) Exists(ctx context.Context, key string) (bool, error)

func (*Store) Get

func (s *Store) Get(ctx context.Context, key string) (string, bool, error)

func (*Store) MGet

func (s *Store) MGet(ctx context.Context, keys ...string) ([]string, error)

func (*Store) MSet

func (s *Store) MSet(ctx context.Context, kvs map[string]string, ttl time.Duration) error

func (*Store) Set

func (s *Store) Set(ctx context.Context, key, value string, ttl time.Duration) error

func (*Store) SetIntersect

func (s *Store) SetIntersect(ctx context.Context, keys ...string) ([]string, error)

func (*Store) SetIsMember

func (s *Store) SetIsMember(ctx context.Context, key, member string) (bool, error)

func (*Store) SetMembers

func (s *Store) SetMembers(ctx context.Context, key string) ([]string, error)

func (*Store) ZAdd

func (s *Store) ZAdd(ctx context.Context, key string, score float64, member string) error

func (*Store) ZCount

func (s *Store) ZCount(ctx context.Context, key string, min, max float64) (int64, error)

func (*Store) ZExpire

func (s *Store) ZExpire(ctx context.Context, key string, ttl time.Duration) error

func (*Store) ZRemRangeByScore

func (s *Store) ZRemRangeByScore(ctx context.Context, key string, min, max float64) error

Jump to

Keyboard shortcuts

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