redis

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

func Codec

func Codec(codec codec.Codec) Option

func Prefix

func Prefix(prefix string) Option

type Store

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

func New

func New(redis redis.Cmdable, opts ...Option) *Store

func (*Store) Decrement

func (s *Store) Decrement(ctx context.Context, key string, value int) (int, error)

func (*Store) Flush

func (s *Store) Flush(ctx context.Context) (bool, error)

func (*Store) Forever

func (s *Store) Forever(ctx context.Context, key string, value interface{}) (bool, error)

func (*Store) Forget

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

func (*Store) Get

func (s *Store) Get(ctx context.Context, key string, dest interface{}) error

func (*Store) GetPrefix

func (s *Store) GetPrefix() string

func (*Store) Has

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

func (*Store) Increment

func (s *Store) Increment(ctx context.Context, key string, value int) (int, error)

func (*Store) Put

func (s *Store) Put(ctx context.Context, key string, value interface{}, ttl time.Duration) (bool, error)

Jump to

Keyboard shortcuts

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