redis

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accessor

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

Accessor implementation of the redis key value accessor

func New

func New(connectURL string) (*Accessor, error)

New driver connection

func (*Accessor) Begin

func (acc *Accessor) Begin() (kvstorage.KeyValueTxAccessor, error)

Begin new transaction

func (*Accessor) Commit

func (acc *Accessor) Commit() (err error)

Commit transaction changes

func (*Accessor) Del

func (acc *Accessor) Del(key ...string) error

Del keys from the storage

func (*Accessor) Get

func (acc *Accessor) Get(key string) (interface{}, error)

Get value from key

func (*Accessor) Incr

func (acc *Accessor) Incr(key string) (int64, error)

Incr value with key

func (*Accessor) Keys

func (acc *Accessor) Keys(pattern string) ([]string, error)

Keys returns the list of keys with pattern "text"+*

func (*Accessor) MGet

func (acc *Accessor) MGet(keys ...string) ([]interface{}, error)

MGet returns values from banch of keys in the same order

func (*Accessor) MSet

func (acc *Accessor) MSet(vals ...interface{}) error

MSet multiple set operation with {Key, Value, ...} input

func (*Accessor) Set

func (acc *Accessor) Set(key string, value interface{}, expiration ...time.Duration) error

Set value for the key

Jump to

Keyboard shortcuts

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