redisstorage

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package redisstorage is redis storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(ctx context.Context, opt *redis.Options, prefix string) (*Storage, error)

func (*Storage) Clean

func (st *Storage) Clean(ctx context.Context) error

func (*Storage) Close

func (st *Storage) Close() error

func (*Storage) Connect

func (st *Storage) Connect(ctx context.Context) error

func (*Storage) Exists

func (st *Storage) Exists(ctx context.Context, key string) (bool, error)

func (*Storage) Get

func (st *Storage) Get(ctx context.Context, key string) (b []byte, found bool, _ error)

func (*Storage) Set

func (st *Storage) Set(ctx context.Context, key string, b []byte) error

func (*Storage) ZAddArgs

func (st *Storage) ZAddArgs(ctx context.Context, key string, args redis.ZAddArgs) error

func (*Storage) ZRangeArgs

func (st *Storage) ZRangeArgs(ctx context.Context, z redis.ZRangeArgs, f func(string) (bool, error)) error

Jump to

Keyboard shortcuts

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