redis

package
v0.0.0-...-55fbde6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 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 RedisStore

type RedisStore struct {
	datastore.Datastore
	// contains filtered or unexported fields
}

RedisStore is the datastore backed by redis

func New

func New(host, port, password string) *RedisStore

NewRedis returns a pointer to a new RedisStore instance

func (RedisStore) Find

func (r RedisStore) Find(queryStr string, callback datastore.ResultCallback)

Find finds data in redis and takes a ResultCallback

func (RedisStore) FindAndUpdate

func (r RedisStore) FindAndUpdate(queryStr string, update interface{}, callback datastore.ResultCallback)

Find and update does the same as Update but passes the data to the callback as well

func (RedisStore) Remove

func (r RedisStore) Remove(queryStr string, callback datastore.NoResultCallback)

Remove removes data from redis and takes a NoResultCallback

func (RedisStore) Save

func (r RedisStore) Save(key string, data interface{}, callback datastore.NoResultCallback)

Save saves data in redis and takes a NoResultCallback

func (RedisStore) Update

func (r RedisStore) Update(queryStr string, update interface{}, callback datastore.NoResultCallback)

Update updates a key in redis with a new value

Jump to

Keyboard shortcuts

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