goredis: github.com/astaxie/goredis Index | Files | Directories

package goredis

import "github.com/astaxie/goredis"

Index

Package Files

redis.go

Variables

var MaxPoolSize = 50

type Client Uses

type Client struct {
    Addr     string
    Db       int
    Password string
    // contains filtered or unexported fields
}

func NewClient Uses

func NewClient(poolsize int) (c *Client)

func (*Client) Append Uses

func (client *Client) Append(key string, val []byte) error

func (*Client) Auth Uses

func (client *Client) Auth(password string) error

func (*Client) Bgrewriteaof Uses

func (client *Client) Bgrewriteaof() error

func (*Client) Bgsave Uses

func (client *Client) Bgsave() error

func (*Client) Blpop Uses

func (client *Client) Blpop(keys []string, timeoutSecs uint) (*string, []byte, error)

func (*Client) Brpop Uses

func (client *Client) Brpop(keys []string, timeoutSecs uint) (*string, []byte, error)

func (*Client) Dbsize Uses

func (client *Client) Dbsize() (int, error)

func (*Client) Decr Uses

func (client *Client) Decr(key string) (int64, error)

func (*Client) Decrby Uses

func (client *Client) Decrby(key string, val int64) (int64, error)

func (*Client) Del Uses

func (client *Client) Del(key string) (bool, error)

func (*Client) Exists Uses

func (client *Client) Exists(key string) (bool, error)

func (*Client) Expire Uses

func (client *Client) Expire(key string, time int64) (bool, error)

func (*Client) Flush Uses

func (client *Client) Flush(all bool) error

func (*Client) Get Uses

func (client *Client) Get(key string) ([]byte, error)

func (*Client) Getset Uses

func (client *Client) Getset(key string, val []byte) ([]byte, error)

func (*Client) Hdel Uses

func (client *Client) Hdel(key string, field string) (bool, error)

func (*Client) Hexists Uses

func (client *Client) Hexists(key string, field string) (bool, error)

func (*Client) Hget Uses

func (client *Client) Hget(key string, field string) ([]byte, error)

func (*Client) Hgetall Uses

func (client *Client) Hgetall(key string, val interface{}) error

func (*Client) Hincrby Uses

func (client *Client) Hincrby(key string, field string, val int64) (int64, error)

func (*Client) Hkeys Uses

func (client *Client) Hkeys(key string) ([]string, error)

func (*Client) Hlen Uses

func (client *Client) Hlen(key string) (int, error)

func (*Client) Hmset Uses

func (client *Client) Hmset(key string, mapping interface{}) error

func (*Client) Hset Uses

func (client *Client) Hset(key string, field string, val []byte) (bool, error)

func (*Client) Hvals Uses

func (client *Client) Hvals(key string) ([][]byte, error)

func (*Client) Incr Uses

func (client *Client) Incr(key string) (int64, error)

func (*Client) Incrby Uses

func (client *Client) Incrby(key string, val int64) (int64, error)

func (*Client) Keys Uses

func (client *Client) Keys(pattern string) ([]string, error)

func (*Client) Lastsave Uses

func (client *Client) Lastsave() (int64, error)

func (*Client) Lindex Uses

func (client *Client) Lindex(key string, index int) ([]byte, error)

func (*Client) Llen Uses

func (client *Client) Llen(key string) (int, error)

func (*Client) Lpop Uses

func (client *Client) Lpop(key string) ([]byte, error)

func (*Client) Lpush Uses

func (client *Client) Lpush(key string, val []byte) error

func (*Client) Lrange Uses

func (client *Client) Lrange(key string, start int, end int) ([][]byte, error)

func (*Client) Lrem Uses

func (client *Client) Lrem(key string, count int, value []byte) (int, error)

func (*Client) Lset Uses

func (client *Client) Lset(key string, index int, value []byte) error

func (*Client) Ltrim Uses

func (client *Client) Ltrim(key string, start int, end int) error

func (*Client) Mget Uses

func (client *Client) Mget(keys ...string) ([][]byte, error)

func (*Client) Move Uses

func (client *Client) Move(key string, dbnum int) (bool, error)

func (*Client) Mset Uses

func (client *Client) Mset(mapping map[string][]byte) error

func (*Client) Msetnx Uses

func (client *Client) Msetnx(mapping map[string][]byte) (bool, error)

func (*Client) Ping Uses

func (client *Client) Ping() (string, error)

func (*Client) Publish Uses

func (client *Client) Publish(channel string, val []byte) error

Publish a message to a redis server.

func (*Client) Randomkey Uses

func (client *Client) Randomkey() (string, error)

func (*Client) Rename Uses

func (client *Client) Rename(src string, dst string) error

func (*Client) Renamenx Uses

func (client *Client) Renamenx(src string, dst string) (bool, error)

func (*Client) Rpop Uses

func (client *Client) Rpop(key string) ([]byte, error)

func (*Client) Rpoplpush Uses

func (client *Client) Rpoplpush(src string, dst string) ([]byte, error)

func (*Client) Rpush Uses

func (client *Client) Rpush(key string, val []byte) error

func (*Client) Sadd Uses

func (client *Client) Sadd(key string, value []byte) (bool, error)

func (*Client) Save Uses

func (client *Client) Save() error

func (*Client) Scard Uses

func (client *Client) Scard(key string) (int, error)

func (*Client) Sdiff Uses

func (client *Client) Sdiff(key1 string, keys []string) ([][]byte, error)

func (*Client) Sdiffstore Uses

func (client *Client) Sdiffstore(dst string, key1 string, keys []string) (int, error)

func (*Client) Set Uses

func (client *Client) Set(key string, val []byte) error

func (*Client) Setex Uses

func (client *Client) Setex(key string, time int64, val []byte) error

func (*Client) Setnx Uses

func (client *Client) Setnx(key string, val []byte) (bool, error)

func (*Client) Sinter Uses

func (client *Client) Sinter(keys ...string) ([][]byte, error)

func (*Client) Sinterstore Uses

func (client *Client) Sinterstore(dst string, keys ...string) (int, error)

func (*Client) Sismember Uses

func (client *Client) Sismember(key string, value []byte) (bool, error)

func (*Client) Smadd Uses

func (client *Client) Smadd(key string, members []string) (bool, error)

Sadd mutiple members, with redis >=2.4

func (*Client) Smembers Uses

func (client *Client) Smembers(key string) ([][]byte, error)

func (*Client) Smove Uses

func (client *Client) Smove(src string, dst string, val []byte) (bool, error)

func (*Client) Spop Uses

func (client *Client) Spop(key string) ([]byte, error)

func (*Client) Srandmember Uses

func (client *Client) Srandmember(key string) ([]byte, error)

func (*Client) Srem Uses

func (client *Client) Srem(key string, value []byte) (bool, error)

func (*Client) Subscribe Uses

func (client *Client) Subscribe(subscribe <-chan string, unsubscribe <-chan string, psubscribe <-chan string, punsubscribe <-chan string, messages chan<- Message) error

Subscribe to redis serve channels, this method will block until one of the sub/unsub channels are closed. There are two pairs of channels subscribe/unsubscribe & psubscribe/punsubscribe. The former does an exact match on the channel, the later uses glob patterns on the redis channels. Closing either of these channels will unblock this method call. Messages that are received are sent down the messages channel.

func (*Client) Substr Uses

func (client *Client) Substr(key string, start int, end int) ([]byte, error)

func (*Client) Sunion Uses

func (client *Client) Sunion(keys ...string) ([][]byte, error)

func (*Client) Sunionstore Uses

func (client *Client) Sunionstore(dst string, keys ...string) (int, error)

func (*Client) Transaction Uses

func (client *Client) Transaction() (*Transaction, error)

func (*Client) Ttl Uses

func (client *Client) Ttl(key string) (int64, error)

func (*Client) Type Uses

func (client *Client) Type(key string) (string, error)

func (*Client) Zadd Uses

func (client *Client) Zadd(key string, value []byte, score float64) (bool, error)

func (*Client) Zcard Uses

func (client *Client) Zcard(key string) (int, error)

func (*Client) Zincrby Uses

func (client *Client) Zincrby(key string, value []byte, score float64) (float64, error)

func (*Client) Zmadd Uses

func (client *Client) Zmadd(key string, values map[string]float64) (bool, error)

zadd multiple elements. redis >=2.4

func (*Client) Zrange Uses

func (client *Client) Zrange(key string, start int, end int, WITHSCORES ...string) ([][]byte, error)

func (*Client) Zrangebyscore Uses

func (client *Client) Zrangebyscore(key string, start float64, end float64) ([][]byte, error)

func (*Client) Zrank Uses

func (client *Client) Zrank(key string, value []byte) (int, error)

func (*Client) Zrem Uses

func (client *Client) Zrem(key string, value []byte) (bool, error)

func (*Client) Zremrangebyrank Uses

func (client *Client) Zremrangebyrank(key string, start int, end int) (int, error)

func (*Client) Zremrangebyscore Uses

func (client *Client) Zremrangebyscore(key string, start float64, end float64) (int, error)

func (*Client) Zrevrange Uses

func (client *Client) Zrevrange(key string, start int, end int) ([][]byte, error)

func (*Client) Zrevrank Uses

func (client *Client) Zrevrank(key string, value []byte) (int, error)

func (*Client) Zscore Uses

func (client *Client) Zscore(key string, member []byte) (float64, error)

type Message Uses

type Message struct {
    ChannelMatched string
    Channel        string
    Message        []byte
}

Container for messages received from publishers on channels that we're subscribed to.

type RedisError Uses

type RedisError string

func (RedisError) Error Uses

func (err RedisError) Error() string

type Transaction Uses

type Transaction struct {
    *Client
    // contains filtered or unexported fields
}

func (*Transaction) Discard Uses

func (t *Transaction) Discard() error

func (*Transaction) Exec Uses

func (t *Transaction) Exec() ([][]byte, error)

func (*Transaction) Multi Uses

func (t *Transaction) Multi() error

func (*Transaction) Unwatch Uses

func (t *Transaction) Unwatch() error

func (*Transaction) Watch Uses

func (t *Transaction) Watch(keys []string) error

Directories

PathSynopsis
redis-dump
redis-load

Package goredis imports 11 packages (graph) and is imported by 1 packages. Updated 2016-08-31. Refresh now. Tools for package owners.