Documentation ¶
Overview ¶
This package implements an asynchronous Redis client.
Client is a structure for accessing a Redis database. Client.MultiCommand can be used for sending multiple commands in a single request and Client.Transaction offers a simple way for executing atomic requests. Client.Subscription returns a Subscription that can be used for listening published messages.
Index ¶
- type Client
- func (c *Client) Append(args ...interface{}) *Reply
- func (c *Client) Asking(args ...interface{}) *Reply
- func (c *Client) AsyncAppend(args ...interface{}) Future
- func (c *Client) AsyncAsking(args ...interface{}) Future
- func (c *Client) AsyncAuth(args ...interface{}) Future
- func (c *Client) AsyncBgrewriteaof(args ...interface{}) Future
- func (c *Client) AsyncBgsave(args ...interface{}) Future
- func (c *Client) AsyncBlpop(args ...interface{}) Future
- func (c *Client) AsyncBrpop(args ...interface{}) Future
- func (c *Client) AsyncBrpoplpush(args ...interface{}) Future
- func (c *Client) AsyncClient(args ...interface{}) Future
- func (c *Client) AsyncCluster(args ...interface{}) Future
- func (c *Client) AsyncCommand(cmd string, args ...interface{}) Future
- func (c *Client) AsyncConfig(args ...interface{}) Future
- func (c *Client) AsyncDbsize(args ...interface{}) Future
- func (c *Client) AsyncDebug(args ...interface{}) Future
- func (c *Client) AsyncDecr(args ...interface{}) Future
- func (c *Client) AsyncDecrby(args ...interface{}) Future
- func (c *Client) AsyncDel(args ...interface{}) Future
- func (c *Client) AsyncDiscard(args ...interface{}) Future
- func (c *Client) AsyncDump(args ...interface{}) Future
- func (c *Client) AsyncEcho(args ...interface{}) Future
- func (c *Client) AsyncEval(args ...interface{}) Future
- func (c *Client) AsyncExec(args ...interface{}) Future
- func (c *Client) AsyncExists(args ...interface{}) Future
- func (c *Client) AsyncExpire(args ...interface{}) Future
- func (c *Client) AsyncExpireat(args ...interface{}) Future
- func (c *Client) AsyncFlushall(args ...interface{}) Future
- func (c *Client) AsyncFlushdb(args ...interface{}) Future
- func (c *Client) AsyncGet(args ...interface{}) Future
- func (c *Client) AsyncGetbit(args ...interface{}) Future
- func (c *Client) AsyncGetrange(args ...interface{}) Future
- func (c *Client) AsyncGetset(args ...interface{}) Future
- func (c *Client) AsyncHdel(args ...interface{}) Future
- func (c *Client) AsyncHexists(args ...interface{}) Future
- func (c *Client) AsyncHget(args ...interface{}) Future
- func (c *Client) AsyncHgetall(args ...interface{}) Future
- func (c *Client) AsyncHincrby(args ...interface{}) Future
- func (c *Client) AsyncHincrbyfloat(args ...interface{}) Future
- func (c *Client) AsyncHkeys(args ...interface{}) Future
- func (c *Client) AsyncHlen(args ...interface{}) Future
- func (c *Client) AsyncHmget(args ...interface{}) Future
- func (c *Client) AsyncHmset(args ...interface{}) Future
- func (c *Client) AsyncHset(args ...interface{}) Future
- func (c *Client) AsyncHsetnx(args ...interface{}) Future
- func (c *Client) AsyncHvals(args ...interface{}) Future
- func (c *Client) AsyncIncr(args ...interface{}) Future
- func (c *Client) AsyncIncrby(args ...interface{}) Future
- func (c *Client) AsyncIncrbyfloat(args ...interface{}) Future
- func (c *Client) AsyncInfo(args ...interface{}) Future
- func (c *Client) AsyncKeys(args ...interface{}) Future
- func (c *Client) AsyncLastsave(args ...interface{}) Future
- func (c *Client) AsyncLindex(args ...interface{}) Future
- func (c *Client) AsyncLinsert(args ...interface{}) Future
- func (c *Client) AsyncLlen(args ...interface{}) Future
- func (c *Client) AsyncLpop(args ...interface{}) Future
- func (c *Client) AsyncLpush(args ...interface{}) Future
- func (c *Client) AsyncLpushx(args ...interface{}) Future
- func (c *Client) AsyncLrange(args ...interface{}) Future
- func (c *Client) AsyncLrem(args ...interface{}) Future
- func (c *Client) AsyncLset(args ...interface{}) Future
- func (c *Client) AsyncLtrim(args ...interface{}) Future
- func (c *Client) AsyncMget(args ...interface{}) Future
- func (c *Client) AsyncMigrate(args ...interface{}) Future
- func (c *Client) AsyncMonitor(args ...interface{}) Future
- func (c *Client) AsyncMove(args ...interface{}) Future
- func (c *Client) AsyncMset(args ...interface{}) Future
- func (c *Client) AsyncMsetnx(args ...interface{}) Future
- func (c *Client) AsyncMulti(args ...interface{}) Future
- func (c *Client) AsyncMultiCommand(mc func(*MultiCommand)) Future
- func (c *Client) AsyncObject(args ...interface{}) Future
- func (c *Client) AsyncPersist(args ...interface{}) Future
- func (c *Client) AsyncPexpire(args ...interface{}) Future
- func (c *Client) AsyncPexpireat(args ...interface{}) Future
- func (c *Client) AsyncPing(args ...interface{}) Future
- func (c *Client) AsyncPsetex(args ...interface{}) Future
- func (c *Client) AsyncPsubscribe(args ...interface{}) Future
- func (c *Client) AsyncPttl(args ...interface{}) Future
- func (c *Client) AsyncPublish(args ...interface{}) Future
- func (c *Client) AsyncPunsubscribe(args ...interface{}) Future
- func (c *Client) AsyncRandomkey(args ...interface{}) Future
- func (c *Client) AsyncRename(args ...interface{}) Future
- func (c *Client) AsyncRenamenx(args ...interface{}) Future
- func (c *Client) AsyncRestore(args ...interface{}) Future
- func (c *Client) AsyncRpop(args ...interface{}) Future
- func (c *Client) AsyncRpoplpush(args ...interface{}) Future
- func (c *Client) AsyncRpush(args ...interface{}) Future
- func (c *Client) AsyncRpushx(args ...interface{}) Future
- func (c *Client) AsyncSadd(args ...interface{}) Future
- func (c *Client) AsyncSave(args ...interface{}) Future
- func (c *Client) AsyncScard(args ...interface{}) Future
- func (c *Client) AsyncScript(args ...interface{}) Future
- func (c *Client) AsyncSdiff(args ...interface{}) Future
- func (c *Client) AsyncSdiffstore(args ...interface{}) Future
- func (c *Client) AsyncSelect(args ...interface{}) Future
- func (c *Client) AsyncSet(args ...interface{}) Future
- func (c *Client) AsyncSetbit(args ...interface{}) Future
- func (c *Client) AsyncSetex(args ...interface{}) Future
- func (c *Client) AsyncSetnx(args ...interface{}) Future
- func (c *Client) AsyncSetrange(args ...interface{}) Future
- func (c *Client) AsyncShutdown(args ...interface{}) Future
- func (c *Client) AsyncSinter(args ...interface{}) Future
- func (c *Client) AsyncSinterstore(args ...interface{}) Future
- func (c *Client) AsyncSismember(args ...interface{}) Future
- func (c *Client) AsyncSlaveof(args ...interface{}) Future
- func (c *Client) AsyncSmembers(args ...interface{}) Future
- func (c *Client) AsyncSmove(args ...interface{}) Future
- func (c *Client) AsyncSort(args ...interface{}) Future
- func (c *Client) AsyncSpop(args ...interface{}) Future
- func (c *Client) AsyncSrandmember(args ...interface{}) Future
- func (c *Client) AsyncSrem(args ...interface{}) Future
- func (c *Client) AsyncStrlen(args ...interface{}) Future
- func (c *Client) AsyncSubscribe(args ...interface{}) Future
- func (c *Client) AsyncSunion(args ...interface{}) Future
- func (c *Client) AsyncSunionstore(args ...interface{}) Future
- func (c *Client) AsyncSync(args ...interface{}) Future
- func (c *Client) AsyncTime(args ...interface{}) Future
- func (c *Client) AsyncTransaction(mc func(*MultiCommand)) Future
- func (c *Client) AsyncTtl(args ...interface{}) Future
- func (c *Client) AsyncType(args ...interface{}) Future
- func (c *Client) AsyncUnsubscribe(args ...interface{}) Future
- func (c *Client) AsyncUnwatch(args ...interface{}) Future
- func (c *Client) AsyncWatch(args ...interface{}) Future
- func (c *Client) AsyncZadd(args ...interface{}) Future
- func (c *Client) AsyncZcard(args ...interface{}) Future
- func (c *Client) AsyncZcount(args ...interface{}) Future
- func (c *Client) AsyncZincrby(args ...interface{}) Future
- func (c *Client) AsyncZinterstore(args ...interface{}) Future
- func (c *Client) AsyncZrange(args ...interface{}) Future
- func (c *Client) AsyncZrangebyscore(args ...interface{}) Future
- func (c *Client) AsyncZrank(args ...interface{}) Future
- func (c *Client) AsyncZrem(args ...interface{}) Future
- func (c *Client) AsyncZremrangebyrank(args ...interface{}) Future
- func (c *Client) AsyncZremrangebyscore(args ...interface{}) Future
- func (c *Client) AsyncZrevrange(args ...interface{}) Future
- func (c *Client) AsyncZrevrangebyscore(args ...interface{}) Future
- func (c *Client) AsyncZrevrank(args ...interface{}) Future
- func (c *Client) AsyncZscore(args ...interface{}) Future
- func (c *Client) AsyncZunionstore(args ...interface{}) Future
- func (c *Client) Auth(args ...interface{}) *Reply
- func (c *Client) Bgrewriteaof(args ...interface{}) *Reply
- func (c *Client) Bgsave(args ...interface{}) *Reply
- func (c *Client) Blpop(args ...interface{}) *Reply
- func (c *Client) Brpop(args ...interface{}) *Reply
- func (c *Client) Brpoplpush(args ...interface{}) *Reply
- func (c *Client) Client(args ...interface{}) *Reply
- func (c *Client) Close()
- func (c *Client) Cluster(args ...interface{}) *Reply
- func (c *Client) Command(cmd string, args ...interface{}) *Reply
- func (c *Client) Config(args ...interface{}) *Reply
- func (c *Client) Dbsize(args ...interface{}) *Reply
- func (c *Client) Debug(args ...interface{}) *Reply
- func (c *Client) Decr(args ...interface{}) *Reply
- func (c *Client) Decrby(args ...interface{}) *Reply
- func (c *Client) Del(args ...interface{}) *Reply
- func (c *Client) Discard(args ...interface{}) *Reply
- func (c *Client) Dump(args ...interface{}) *Reply
- func (c *Client) Echo(args ...interface{}) *Reply
- func (c *Client) Eval(args ...interface{}) *Reply
- func (c *Client) Exec(args ...interface{}) *Reply
- func (c *Client) Exists(args ...interface{}) *Reply
- func (c *Client) Expire(args ...interface{}) *Reply
- func (c *Client) Expireat(args ...interface{}) *Reply
- func (c *Client) Flushall(args ...interface{}) *Reply
- func (c *Client) Flushdb(args ...interface{}) *Reply
- func (c *Client) Get(args ...interface{}) *Reply
- func (c *Client) Getbit(args ...interface{}) *Reply
- func (c *Client) Getrange(args ...interface{}) *Reply
- func (c *Client) Getset(args ...interface{}) *Reply
- func (c *Client) Hdel(args ...interface{}) *Reply
- func (c *Client) Hexists(args ...interface{}) *Reply
- func (c *Client) Hget(args ...interface{}) *Reply
- func (c *Client) Hgetall(args ...interface{}) *Reply
- func (c *Client) Hincrby(args ...interface{}) *Reply
- func (c *Client) Hincrbyfloat(args ...interface{}) *Reply
- func (c *Client) Hkeys(args ...interface{}) *Reply
- func (c *Client) Hlen(args ...interface{}) *Reply
- func (c *Client) Hmget(args ...interface{}) *Reply
- func (c *Client) Hmset(args ...interface{}) *Reply
- func (c *Client) Hset(args ...interface{}) *Reply
- func (c *Client) Hsetnx(args ...interface{}) *Reply
- func (c *Client) Hvals(args ...interface{}) *Reply
- func (c *Client) Incr(args ...interface{}) *Reply
- func (c *Client) Incrby(args ...interface{}) *Reply
- func (c *Client) Incrbyfloat(args ...interface{}) *Reply
- func (c *Client) Info(args ...interface{}) *Reply
- func (c *Client) Keys(args ...interface{}) *Reply
- func (c *Client) Lastsave(args ...interface{}) *Reply
- func (c *Client) Lindex(args ...interface{}) *Reply
- func (c *Client) Linsert(args ...interface{}) *Reply
- func (c *Client) Llen(args ...interface{}) *Reply
- func (c *Client) Lpop(args ...interface{}) *Reply
- func (c *Client) Lpush(args ...interface{}) *Reply
- func (c *Client) Lpushx(args ...interface{}) *Reply
- func (c *Client) Lrange(args ...interface{}) *Reply
- func (c *Client) Lrem(args ...interface{}) *Reply
- func (c *Client) Lset(args ...interface{}) *Reply
- func (c *Client) Ltrim(args ...interface{}) *Reply
- func (c *Client) Mget(args ...interface{}) *Reply
- func (c *Client) Migrate(args ...interface{}) *Reply
- func (c *Client) Monitor(args ...interface{}) *Reply
- func (c *Client) Move(args ...interface{}) *Reply
- func (c *Client) Mset(args ...interface{}) *Reply
- func (c *Client) Msetnx(args ...interface{}) *Reply
- func (c *Client) Multi(args ...interface{}) *Reply
- func (c *Client) MultiCommand(f func(*MultiCommand)) *Reply
- func (c *Client) Object(args ...interface{}) *Reply
- func (c *Client) Persist(args ...interface{}) *Reply
- func (c *Client) Pexpire(args ...interface{}) *Reply
- func (c *Client) Pexpireat(args ...interface{}) *Reply
- func (c *Client) Ping(args ...interface{}) *Reply
- func (c *Client) Psetex(args ...interface{}) *Reply
- func (c *Client) Psubscribe(args ...interface{}) *Reply
- func (c *Client) Pttl(args ...interface{}) *Reply
- func (c *Client) Publish(args ...interface{}) *Reply
- func (c *Client) Punsubscribe(args ...interface{}) *Reply
- func (c *Client) Randomkey(args ...interface{}) *Reply
- func (c *Client) Rename(args ...interface{}) *Reply
- func (c *Client) Renamenx(args ...interface{}) *Reply
- func (c *Client) Restore(args ...interface{}) *Reply
- func (c *Client) Rpop(args ...interface{}) *Reply
- func (c *Client) Rpoplpush(args ...interface{}) *Reply
- func (c *Client) Rpush(args ...interface{}) *Reply
- func (c *Client) Rpushx(args ...interface{}) *Reply
- func (c *Client) Sadd(args ...interface{}) *Reply
- func (c *Client) Save(args ...interface{}) *Reply
- func (c *Client) Scard(args ...interface{}) *Reply
- func (c *Client) Script(args ...interface{}) *Reply
- func (c *Client) Sdiff(args ...interface{}) *Reply
- func (c *Client) Sdiffstore(args ...interface{}) *Reply
- func (c *Client) Select(args ...interface{}) *Reply
- func (c *Client) Set(args ...interface{}) *Reply
- func (c *Client) Setbit(args ...interface{}) *Reply
- func (c *Client) Setex(args ...interface{}) *Reply
- func (c *Client) Setnx(args ...interface{}) *Reply
- func (c *Client) Setrange(args ...interface{}) *Reply
- func (c *Client) Shutdown(args ...interface{}) *Reply
- func (c *Client) Sinter(args ...interface{}) *Reply
- func (c *Client) Sinterstore(args ...interface{}) *Reply
- func (c *Client) Sismember(args ...interface{}) *Reply
- func (c *Client) Slaveof(args ...interface{}) *Reply
- func (c *Client) Smembers(args ...interface{}) *Reply
- func (c *Client) Smove(args ...interface{}) *Reply
- func (c *Client) Sort(args ...interface{}) *Reply
- func (c *Client) Spop(args ...interface{}) *Reply
- func (c *Client) Srandmember(args ...interface{}) *Reply
- func (c *Client) Srem(args ...interface{}) *Reply
- func (c *Client) Strlen(args ...interface{}) *Reply
- func (c *Client) Subscribe(args ...interface{}) *Reply
- func (c *Client) Subscription(msgHdlr func(msg *Message)) (*Subscription, *Error)
- func (c *Client) Sunion(args ...interface{}) *Reply
- func (c *Client) Sunionstore(args ...interface{}) *Reply
- func (c *Client) Sync(args ...interface{}) *Reply
- func (c *Client) Time(args ...interface{}) *Reply
- func (c *Client) Transaction(f func(*MultiCommand)) *Reply
- func (c *Client) Ttl(args ...interface{}) *Reply
- func (c *Client) Type(args ...interface{}) *Reply
- func (c *Client) Unsubscribe(args ...interface{}) *Reply
- func (c *Client) Unwatch(args ...interface{}) *Reply
- func (c *Client) Watch(args ...interface{}) *Reply
- func (c *Client) Zadd(args ...interface{}) *Reply
- func (c *Client) Zcard(args ...interface{}) *Reply
- func (c *Client) Zcount(args ...interface{}) *Reply
- func (c *Client) Zincrby(args ...interface{}) *Reply
- func (c *Client) Zinterstore(args ...interface{}) *Reply
- func (c *Client) Zrange(args ...interface{}) *Reply
- func (c *Client) Zrangebyscore(args ...interface{}) *Reply
- func (c *Client) Zrank(args ...interface{}) *Reply
- func (c *Client) Zrem(args ...interface{}) *Reply
- func (c *Client) Zremrangebyrank(args ...interface{}) *Reply
- func (c *Client) Zremrangebyscore(args ...interface{}) *Reply
- func (c *Client) Zrevrange(args ...interface{}) *Reply
- func (c *Client) Zrevrangebyscore(args ...interface{}) *Reply
- func (c *Client) Zrevrank(args ...interface{}) *Reply
- func (c *Client) Zscore(args ...interface{}) *Reply
- func (c *Client) Zunionstore(args ...interface{}) *Reply
- type Configuration
- type Error
- type ErrorFlag
- type Future
- type Message
- type MessageType
- type MultiCommand
- func (mc *MultiCommand) Append(args ...interface{})
- func (mc *MultiCommand) Asking(args ...interface{})
- func (mc *MultiCommand) Auth(args ...interface{})
- func (mc *MultiCommand) Bgrewriteaof(args ...interface{})
- func (mc *MultiCommand) Bgsave(args ...interface{})
- func (mc *MultiCommand) Blpop(args ...interface{})
- func (mc *MultiCommand) Brpop(args ...interface{})
- func (mc *MultiCommand) Brpoplpush(args ...interface{})
- func (mc *MultiCommand) Client(args ...interface{})
- func (mc *MultiCommand) Cluster(args ...interface{})
- func (mc *MultiCommand) Command(cmd string, args ...interface{})
- func (mc *MultiCommand) Config(args ...interface{})
- func (mc *MultiCommand) Dbsize(args ...interface{})
- func (mc *MultiCommand) Debug(args ...interface{})
- func (mc *MultiCommand) Decr(args ...interface{})
- func (mc *MultiCommand) Decrby(args ...interface{})
- func (mc *MultiCommand) Del(args ...interface{})
- func (mc *MultiCommand) Discard(args ...interface{})
- func (mc *MultiCommand) Dump(args ...interface{})
- func (mc *MultiCommand) Echo(args ...interface{})
- func (mc *MultiCommand) Eval(args ...interface{})
- func (mc *MultiCommand) Exec(args ...interface{})
- func (mc *MultiCommand) Exists(args ...interface{})
- func (mc *MultiCommand) Expire(args ...interface{})
- func (mc *MultiCommand) Expireat(args ...interface{})
- func (mc *MultiCommand) Flush() (r *Reply)
- func (mc *MultiCommand) Flushall(args ...interface{})
- func (mc *MultiCommand) Flushdb(args ...interface{})
- func (mc *MultiCommand) Get(args ...interface{})
- func (mc *MultiCommand) Getbit(args ...interface{})
- func (mc *MultiCommand) Getrange(args ...interface{})
- func (mc *MultiCommand) Getset(args ...interface{})
- func (mc *MultiCommand) Hdel(args ...interface{})
- func (mc *MultiCommand) Hexists(args ...interface{})
- func (mc *MultiCommand) Hget(args ...interface{})
- func (mc *MultiCommand) Hgetall(args ...interface{})
- func (mc *MultiCommand) Hincrby(args ...interface{})
- func (mc *MultiCommand) Hincrbyfloat(args ...interface{})
- func (mc *MultiCommand) Hkeys(args ...interface{})
- func (mc *MultiCommand) Hlen(args ...interface{})
- func (mc *MultiCommand) Hmget(args ...interface{})
- func (mc *MultiCommand) Hmset(args ...interface{})
- func (mc *MultiCommand) Hset(args ...interface{})
- func (mc *MultiCommand) Hsetnx(args ...interface{})
- func (mc *MultiCommand) Hvals(args ...interface{})
- func (mc *MultiCommand) Incr(args ...interface{})
- func (mc *MultiCommand) Incrby(args ...interface{})
- func (mc *MultiCommand) Incrbyfloat(args ...interface{})
- func (mc *MultiCommand) Info(args ...interface{})
- func (mc *MultiCommand) Keys(args ...interface{})
- func (mc *MultiCommand) Lastsave(args ...interface{})
- func (mc *MultiCommand) Lindex(args ...interface{})
- func (mc *MultiCommand) Linsert(args ...interface{})
- func (mc *MultiCommand) Llen(args ...interface{})
- func (mc *MultiCommand) Lpop(args ...interface{})
- func (mc *MultiCommand) Lpush(args ...interface{})
- func (mc *MultiCommand) Lpushx(args ...interface{})
- func (mc *MultiCommand) Lrange(args ...interface{})
- func (mc *MultiCommand) Lrem(args ...interface{})
- func (mc *MultiCommand) Lset(args ...interface{})
- func (mc *MultiCommand) Ltrim(args ...interface{})
- func (mc *MultiCommand) Mget(args ...interface{})
- func (mc *MultiCommand) Migrate(args ...interface{})
- func (mc *MultiCommand) Monitor(args ...interface{})
- func (mc *MultiCommand) Move(args ...interface{})
- func (mc *MultiCommand) Mset(args ...interface{})
- func (mc *MultiCommand) Msetnx(args ...interface{})
- func (mc *MultiCommand) Multi(args ...interface{})
- func (mc *MultiCommand) Object(args ...interface{})
- func (mc *MultiCommand) Persist(args ...interface{})
- func (mc *MultiCommand) Pexpire(args ...interface{})
- func (mc *MultiCommand) Pexpireat(args ...interface{})
- func (mc *MultiCommand) Ping(args ...interface{})
- func (mc *MultiCommand) Psetex(args ...interface{})
- func (mc *MultiCommand) Psubscribe(args ...interface{})
- func (mc *MultiCommand) Pttl(args ...interface{})
- func (mc *MultiCommand) Publish(args ...interface{})
- func (mc *MultiCommand) Punsubscribe(args ...interface{})
- func (mc *MultiCommand) Randomkey(args ...interface{})
- func (mc *MultiCommand) Rename(args ...interface{})
- func (mc *MultiCommand) Renamenx(args ...interface{})
- func (mc *MultiCommand) Restore(args ...interface{})
- func (mc *MultiCommand) Rpop(args ...interface{})
- func (mc *MultiCommand) Rpoplpush(args ...interface{})
- func (mc *MultiCommand) Rpush(args ...interface{})
- func (mc *MultiCommand) Rpushx(args ...interface{})
- func (mc *MultiCommand) Sadd(args ...interface{})
- func (mc *MultiCommand) Save(args ...interface{})
- func (mc *MultiCommand) Scard(args ...interface{})
- func (mc *MultiCommand) Script(args ...interface{})
- func (mc *MultiCommand) Sdiff(args ...interface{})
- func (mc *MultiCommand) Sdiffstore(args ...interface{})
- func (mc *MultiCommand) Select(args ...interface{})
- func (mc *MultiCommand) Set(args ...interface{})
- func (mc *MultiCommand) Setbit(args ...interface{})
- func (mc *MultiCommand) Setex(args ...interface{})
- func (mc *MultiCommand) Setnx(args ...interface{})
- func (mc *MultiCommand) Setrange(args ...interface{})
- func (mc *MultiCommand) Shutdown(args ...interface{})
- func (mc *MultiCommand) Sinter(args ...interface{})
- func (mc *MultiCommand) Sinterstore(args ...interface{})
- func (mc *MultiCommand) Sismember(args ...interface{})
- func (mc *MultiCommand) Slaveof(args ...interface{})
- func (mc *MultiCommand) Smembers(args ...interface{})
- func (mc *MultiCommand) Smove(args ...interface{})
- func (mc *MultiCommand) Sort(args ...interface{})
- func (mc *MultiCommand) Spop(args ...interface{})
- func (mc *MultiCommand) Srandmember(args ...interface{})
- func (mc *MultiCommand) Srem(args ...interface{})
- func (mc *MultiCommand) Strlen(args ...interface{})
- func (mc *MultiCommand) Subscribe(args ...interface{})
- func (mc *MultiCommand) Sunion(args ...interface{})
- func (mc *MultiCommand) Sunionstore(args ...interface{})
- func (mc *MultiCommand) Sync(args ...interface{})
- func (mc *MultiCommand) Time(args ...interface{})
- func (mc *MultiCommand) Ttl(args ...interface{})
- func (mc *MultiCommand) Type(args ...interface{})
- func (mc *MultiCommand) Unsubscribe(args ...interface{})
- func (mc *MultiCommand) Unwatch(args ...interface{})
- func (mc *MultiCommand) Watch(args ...interface{})
- func (mc *MultiCommand) Zadd(args ...interface{})
- func (mc *MultiCommand) Zcard(args ...interface{})
- func (mc *MultiCommand) Zcount(args ...interface{})
- func (mc *MultiCommand) Zincrby(args ...interface{})
- func (mc *MultiCommand) Zinterstore(args ...interface{})
- func (mc *MultiCommand) Zrange(args ...interface{})
- func (mc *MultiCommand) Zrangebyscore(args ...interface{})
- func (mc *MultiCommand) Zrank(args ...interface{})
- func (mc *MultiCommand) Zrem(args ...interface{})
- func (mc *MultiCommand) Zremrangebyrank(args ...interface{})
- func (mc *MultiCommand) Zremrangebyscore(args ...interface{})
- func (mc *MultiCommand) Zrevrange(args ...interface{})
- func (mc *MultiCommand) Zrevrangebyscore(args ...interface{})
- func (mc *MultiCommand) Zrevrank(args ...interface{})
- func (mc *MultiCommand) Zscore(args ...interface{})
- func (mc *MultiCommand) Zunionstore(args ...interface{})
- type Reply
- func (r *Reply) At(i int) *Reply
- func (r *Reply) Bool() bool
- func (r *Reply) Bytes() []byte
- func (r *Reply) Elems() []*Reply
- func (r *Reply) Int() int
- func (r *Reply) Int64() int64
- func (r *Reply) Len() int
- func (r *Reply) Map() (map[string]*Reply, error)
- func (r *Reply) Nil() bool
- func (r *Reply) Str() string
- func (r *Reply) String() string
- func (r *Reply) StringMap() (map[string]string, error)
- func (r *Reply) Strings() ([]string, error)
- type ReplyType
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages the access to a database.
func NewClient ¶
func NewClient(config Configuration) (*Client, error)
NewClient creates a new accessor.
func (*Client) AsyncAppend ¶ added in v0.2.0
AsyncAppend calls Redis APPEND asynchronously.
func (*Client) AsyncAsking ¶ added in v0.2.0
AsyncAsking calls Redis ASKING asynchronously.
func (*Client) AsyncBgrewriteaof ¶ added in v0.2.0
AsyncBgrewriteaof calls Redis BGREWRITEAOF asynchronously.
func (*Client) AsyncBgsave ¶ added in v0.2.0
AsyncBgsave calls Redis BGSAVE asynchronously.
func (*Client) AsyncBlpop ¶ added in v0.2.0
AsyncBlpop calls Redis BLPOP asynchronously.
func (*Client) AsyncBrpop ¶ added in v0.2.0
AsyncBrpop calls Redis BRPOP asynchronously.
func (*Client) AsyncBrpoplpush ¶ added in v0.2.0
AsyncBrpoplpush calls Redis BRPOPLPUSH asynchronously.
func (*Client) AsyncClient ¶ added in v0.2.0
AsyncClient calls Redis CLIENT asynchronously.
func (*Client) AsyncCluster ¶ added in v0.2.0
AsyncCluster calls Redis CLUSTER asynchronously.
func (*Client) AsyncCommand ¶
AsyncCommand calls the given Redis command asynchronously.
func (*Client) AsyncConfig ¶ added in v0.2.0
AsyncConfig calls Redis CONFIG asynchronously.
func (*Client) AsyncDbsize ¶ added in v0.2.0
AsyncDbsize calls Redis DBSIZE asynchronously.
func (*Client) AsyncDebug ¶ added in v0.2.0
AsyncDebug calls Redis DEBUG asynchronously.
func (*Client) AsyncDecrby ¶ added in v0.2.0
AsyncDecrby calls Redis DECRBY asynchronously.
func (*Client) AsyncDiscard ¶ added in v0.2.0
AsyncDiscard calls Redis DISCARD asynchronously.
func (*Client) AsyncExists ¶ added in v0.2.0
AsyncExists calls Redis EXISTS asynchronously.
func (*Client) AsyncExpire ¶ added in v0.2.0
AsyncExpire calls Redis EXPIRE asynchronously.
func (*Client) AsyncExpireat ¶ added in v0.2.0
AsyncExpireat calls Redis EXPIREAT asynchronously.
func (*Client) AsyncFlushall ¶ added in v0.2.0
AsyncFlushall calls Redis FLUSHALL asynchronously.
func (*Client) AsyncFlushdb ¶ added in v0.2.0
AsyncFlushdb calls Redis FLUSHDB asynchronously.
func (*Client) AsyncGetbit ¶ added in v0.2.0
AsyncGetbit calls Redis GETBIT asynchronously.
func (*Client) AsyncGetrange ¶ added in v0.2.0
AsyncGetrange calls Redis GETRANGE asynchronously.
func (*Client) AsyncGetset ¶ added in v0.2.0
AsyncGetset calls Redis GETSET asynchronously.
func (*Client) AsyncHexists ¶ added in v0.2.0
AsyncHexists calls Redis HEXISTS asynchronously.
func (*Client) AsyncHgetall ¶ added in v0.2.0
AsyncHgetall calls Redis HGETALL asynchronously.
func (*Client) AsyncHincrby ¶ added in v0.2.0
AsyncHincrby calls Redis HINCRBY asynchronously.
func (*Client) AsyncHincrbyfloat ¶ added in v0.2.0
AsyncHincrbyfloat calls Redis HINCRBYFLOAT asynchronously.
func (*Client) AsyncHkeys ¶ added in v0.2.0
AsyncHkeys calls Redis HKEYS asynchronously.
func (*Client) AsyncHmget ¶ added in v0.2.0
AsyncHmget calls Redis HMGET asynchronously.
func (*Client) AsyncHmset ¶ added in v0.2.0
AsyncHmset calls Redis HMSET asynchronously.
func (*Client) AsyncHsetnx ¶ added in v0.2.0
AsyncHsetnx calls Redis HSETNX asynchronously.
func (*Client) AsyncHvals ¶ added in v0.2.0
AsyncHvals calls Redis HVALS asynchronously.
func (*Client) AsyncIncrby ¶ added in v0.2.0
AsyncIncrby calls Redis INCRBY asynchronously.
func (*Client) AsyncIncrbyfloat ¶ added in v0.2.0
AsyncIncrbyfloat calls Redis INCRBYFLOAT asynchronously.
func (*Client) AsyncLastsave ¶ added in v0.2.0
AsyncLastsave calls Redis LASTSAVE asynchronously.
func (*Client) AsyncLindex ¶ added in v0.2.0
AsyncLindex calls Redis LINDEX asynchronously.
func (*Client) AsyncLinsert ¶ added in v0.2.0
AsyncLinsert calls Redis LINSERT asynchronously.
func (*Client) AsyncLpush ¶ added in v0.2.0
AsyncLpush calls Redis LPUSH asynchronously.
func (*Client) AsyncLpushx ¶ added in v0.2.0
AsyncLpushx calls Redis LPUSHX asynchronously.
func (*Client) AsyncLrange ¶ added in v0.2.0
AsyncLrange calls Redis LRANGE asynchronously.
func (*Client) AsyncLtrim ¶ added in v0.2.0
AsyncLtrim calls Redis LTRIM asynchronously.
func (*Client) AsyncMigrate ¶ added in v0.2.0
AsyncMigrate calls Redis MIGRATE asynchronously.
func (*Client) AsyncMonitor ¶ added in v0.2.0
AsyncMonitor calls Redis MONITOR asynchronously.
func (*Client) AsyncMsetnx ¶ added in v0.2.0
AsyncMsetnx calls Redis MSETNX asynchronously.
func (*Client) AsyncMulti ¶ added in v0.2.0
AsyncMulti calls Redis MULTI asynchronously.
func (*Client) AsyncMultiCommand ¶
func (c *Client) AsyncMultiCommand(mc func(*MultiCommand)) Future
AsyncMultiCommand calls an asynchronous multi-command.
func (*Client) AsyncObject ¶ added in v0.2.0
AsyncObject calls Redis OBJECT asynchronously.
func (*Client) AsyncPersist ¶ added in v0.2.0
AsyncPersist calls Redis PERSIST asynchronously.
func (*Client) AsyncPexpire ¶ added in v0.2.0
AsyncPexpire calls Redis PEXPIRE asynchronously.
func (*Client) AsyncPexpireat ¶ added in v0.2.0
AsyncPexpireat calls Redis PEXPIREAT asynchronously.
func (*Client) AsyncPsetex ¶ added in v0.2.0
AsyncPsetex calls Redis PSETEX asynchronously.
func (*Client) AsyncPsubscribe ¶ added in v0.2.0
AsyncPsubscribe calls Redis PSUBSCRIBE asynchronously.
func (*Client) AsyncPublish ¶ added in v0.2.0
AsyncPublish calls Redis PUBLISH asynchronously.
func (*Client) AsyncPunsubscribe ¶ added in v0.2.0
AsyncPunsubscribe calls Redis PUNSUBSCRIBE asynchronously.
func (*Client) AsyncRandomkey ¶ added in v0.2.0
AsyncRandomkey calls Redis RANDOMKEY asynchronously.
func (*Client) AsyncRename ¶ added in v0.2.0
AsyncRename calls Redis RENAME asynchronously.
func (*Client) AsyncRenamenx ¶ added in v0.2.0
AsyncRenamenx calls Redis RENAMENX asynchronously.
func (*Client) AsyncRestore ¶ added in v0.2.0
AsyncRestore calls Redis RESTORE asynchronously.
func (*Client) AsyncRpoplpush ¶ added in v0.2.0
AsyncRpoplpush calls Redis RPOPLPUSH asynchronously.
func (*Client) AsyncRpush ¶ added in v0.2.0
AsyncRpush calls Redis RPUSH asynchronously.
func (*Client) AsyncRpushx ¶ added in v0.2.0
AsyncRpushx calls Redis RPUSHX asynchronously.
func (*Client) AsyncScard ¶ added in v0.2.0
AsyncScard calls Redis SCARD asynchronously.
func (*Client) AsyncScript ¶ added in v0.2.0
AsyncScript calls Redis SCRIPT asynchronously.
func (*Client) AsyncSdiff ¶ added in v0.2.0
AsyncSdiff calls Redis SDIFF asynchronously.
func (*Client) AsyncSdiffstore ¶ added in v0.2.0
AsyncSdiffstore calls Redis SDIFFSTORE asynchronously.
func (*Client) AsyncSelect ¶ added in v0.2.0
AsyncSelect calls Redis SELECT asynchronously.
func (*Client) AsyncSetbit ¶ added in v0.2.0
AsyncSetbit calls Redis SETBIT asynchronously.
func (*Client) AsyncSetex ¶ added in v0.2.0
AsyncSetex calls Redis SETEX asynchronously.
func (*Client) AsyncSetnx ¶ added in v0.2.0
AsyncSetnx calls Redis SETNX asynchronously.
func (*Client) AsyncSetrange ¶ added in v0.2.0
AsyncSetrange calls Redis SETRANGE asynchronously.
func (*Client) AsyncShutdown ¶ added in v0.2.0
AsyncShutdown calls Redis SHUTDOWN asynchronously.
func (*Client) AsyncSinter ¶ added in v0.2.0
AsyncSinter calls Redis SINTER asynchronously.
func (*Client) AsyncSinterstore ¶ added in v0.2.0
AsyncSinterstore calls Redis SINTERSTORE asynchronously.
func (*Client) AsyncSismember ¶ added in v0.2.0
AsyncSismember calls Redis SISMEMBER asynchronously.
func (*Client) AsyncSlaveof ¶ added in v0.2.0
AsyncSlaveof calls Redis SLAVEOF asynchronously.
func (*Client) AsyncSmembers ¶ added in v0.2.0
AsyncSmembers calls Redis SMEMBERS asynchronously.
func (*Client) AsyncSmove ¶ added in v0.2.0
AsyncSmove calls Redis SMOVE asynchronously.
func (*Client) AsyncSrandmember ¶ added in v0.2.0
AsyncSrandmember calls Redis SRANDMEMBER asynchronously.
func (*Client) AsyncStrlen ¶ added in v0.2.0
AsyncStrlen calls Redis STRLEN asynchronously.
func (*Client) AsyncSubscribe ¶ added in v0.2.0
AsyncSubscribe calls Redis SUBSCRIBE asynchronously.
func (*Client) AsyncSunion ¶ added in v0.2.0
AsyncSunion calls Redis SUNION asynchronously.
func (*Client) AsyncSunionstore ¶ added in v0.2.0
AsyncSunionstore calls Redis SUNIONSTORE asynchronously.
func (*Client) AsyncTransaction ¶
func (c *Client) AsyncTransaction(mc func(*MultiCommand)) Future
AsyncTransaction performs a simple asynchronous transaction.
func (*Client) AsyncUnsubscribe ¶ added in v0.2.0
AsyncUnsubscribe calls Redis UNSUBSCRIBE asynchronously.
func (*Client) AsyncUnwatch ¶ added in v0.2.0
AsyncUnwatch calls Redis UNWATCH asynchronously.
func (*Client) AsyncWatch ¶ added in v0.2.0
AsyncWatch calls Redis WATCH asynchronously.
func (*Client) AsyncZcard ¶ added in v0.2.0
AsyncZcard calls Redis ZCARD asynchronously.
func (*Client) AsyncZcount ¶ added in v0.2.0
AsyncZcount calls Redis ZCOUNT asynchronously.
func (*Client) AsyncZincrby ¶ added in v0.2.0
AsyncZincrby calls Redis ZINCRBY asynchronously.
func (*Client) AsyncZinterstore ¶ added in v0.2.0
AsyncZinterstore calls Redis ZINTERSTORE asynchronously.
func (*Client) AsyncZrange ¶ added in v0.2.0
AsyncZrange calls Redis ZRANGE asynchronously.
func (*Client) AsyncZrangebyscore ¶ added in v0.2.0
AsyncZrangebyscore calls Redis ZRANGEBYSCORE asynchronously.
func (*Client) AsyncZrank ¶ added in v0.2.0
AsyncZrank calls Redis ZRANK asynchronously.
func (*Client) AsyncZremrangebyrank ¶ added in v0.2.0
AsyncZremrangebyrank calls Redis ZREMRANGEBYRANK asynchronously.
func (*Client) AsyncZremrangebyscore ¶ added in v0.2.0
AsyncZremrangebyscore calls Redis ZREMRANGEBYSCORE asynchronously.
func (*Client) AsyncZrevrange ¶ added in v0.2.0
AsyncZrevrange calls Redis ZREVRANGE asynchronously.
func (*Client) AsyncZrevrangebyscore ¶ added in v0.2.0
AsyncZrevrangebyscore calls Redis ZREVRANGEBYSCORE asynchronously.
func (*Client) AsyncZrevrank ¶ added in v0.2.0
AsyncZrevrank calls Redis ZREVRANK asynchronously.
func (*Client) AsyncZscore ¶ added in v0.2.0
AsyncZscore calls Redis ZSCORE asynchronously.
func (*Client) AsyncZunionstore ¶ added in v0.2.0
AsyncZunionstore calls Redis ZUNIONSTORE asynchronously.
func (*Client) Bgrewriteaof ¶ added in v0.2.0
Bgrewriteaof calls Redis BGREWRITEAOF command.
func (*Client) Brpoplpush ¶ added in v0.2.0
Brpoplpush calls Redis BRPOPLPUSH command.
func (*Client) Hincrbyfloat ¶ added in v0.2.0
Hincrbyfloat calls Redis HINCRBYFLOAT command.
func (*Client) Incrbyfloat ¶ added in v0.2.0
Incrbyfloat calls Redis INCRBYFLOAT command.
func (*Client) MultiCommand ¶
func (c *Client) MultiCommand(f func(*MultiCommand)) *Reply
MultiCommand executes the given multi-command.
func (*Client) Psubscribe ¶ added in v0.2.0
Psubscribe calls Redis PSUBSCRIBE command.
func (*Client) Punsubscribe ¶ added in v0.2.0
Punsubscribe calls Redis PUNSUBSCRIBE command.
func (*Client) Sdiffstore ¶ added in v0.2.0
Sdiffstore calls Redis SDIFFSTORE command.
func (*Client) Sinterstore ¶ added in v0.2.0
Sinterstore calls Redis SINTERSTORE command.
func (*Client) Srandmember ¶ added in v0.2.0
Srandmember calls Redis SRANDMEMBER command.
func (*Client) Subscription ¶
func (c *Client) Subscription(msgHdlr func(msg *Message)) (*Subscription, *Error)
Subscription subscribes to given channels and return a Subscription or an error. The msgHdlr function is called whenever a new message arrives.
func (*Client) Sunionstore ¶ added in v0.2.0
Sunionstore calls Redis SUNIONSTORE command.
func (*Client) Transaction ¶
func (c *Client) Transaction(f func(*MultiCommand)) *Reply
Transaction performs a simple transaction. Simple transaction is a multi command that is wrapped in a MULTI-EXEC block. For complex transactions with WATCH, UNWATCH or DISCARD commands use MultiCommand.
func (*Client) Unsubscribe ¶ added in v0.2.0
Unsubscribe calls Redis UNSUBSCRIBE command.
func (*Client) Zinterstore ¶ added in v0.2.0
Zinterstore calls Redis ZINTERSTORE command.
func (*Client) Zrangebyscore ¶ added in v0.2.0
Zrangebyscore calls Redis ZRANGEBYSCORE command.
func (*Client) Zremrangebyrank ¶ added in v0.2.0
Zremrangebyrank calls Redis ZREMRANGEBYRANK command.
func (*Client) Zremrangebyscore ¶ added in v0.2.0
Zremrangebyscore calls Redis ZREMRANGEBYSCORE command.
func (*Client) Zrevrangebyscore ¶ added in v0.2.0
Zrevrangebyscore calls Redis ZREVRANGEBYSCORE command.
func (*Client) Zunionstore ¶ added in v0.2.0
Zunionstore calls Redis ZUNIONSTORE command.
type Configuration ¶
type Configuration struct { Address string Path string Database int Auth string PoolSize int Timeout int NoLoadingRetry bool }
Configuration of a database client.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
type Future ¶
type Future chan *Reply
Future is a channel for fetching the reply of an asynchronous command.
type Message ¶
type Message struct { Type MessageType Channel string Pattern string Subscriptions int Payload string Error error }
Message describes a pub/sub message
type MessageType ¶
type MessageType int
const ( MessageSubscribe MessageType = iota MessageUnsubscribe MessagePsubscribe MessagePunsubscribe MessageMessage MessagePmessage MessageError )
type MultiCommand ¶
type MultiCommand struct {
// contains filtered or unexported fields
}
MultiCommand holds data for a Redis multi command.
func (*MultiCommand) Append ¶ added in v0.2.0
func (mc *MultiCommand) Append(args ...interface{})
Append queues a Redis APPEND command for later execution.
func (*MultiCommand) Asking ¶ added in v0.2.0
func (mc *MultiCommand) Asking(args ...interface{})
Asking queues a Redis ASKING command for later execution.
func (*MultiCommand) Auth ¶ added in v0.2.0
func (mc *MultiCommand) Auth(args ...interface{})
Auth queues a Redis AUTH command for later execution.
func (*MultiCommand) Bgrewriteaof ¶ added in v0.2.0
func (mc *MultiCommand) Bgrewriteaof(args ...interface{})
Bgrewriteaof queues a Redis BGREWRITEAOF command for later execution.
func (*MultiCommand) Bgsave ¶ added in v0.2.0
func (mc *MultiCommand) Bgsave(args ...interface{})
Bgsave queues a Redis BGSAVE command for later execution.
func (*MultiCommand) Blpop ¶ added in v0.2.0
func (mc *MultiCommand) Blpop(args ...interface{})
Blpop queues a Redis BLPOP command for later execution.
func (*MultiCommand) Brpop ¶ added in v0.2.0
func (mc *MultiCommand) Brpop(args ...interface{})
Brpop queues a Redis BRPOP command for later execution.
func (*MultiCommand) Brpoplpush ¶ added in v0.2.0
func (mc *MultiCommand) Brpoplpush(args ...interface{})
Brpoplpush queues a Redis BRPOPLPUSH command for later execution.
func (*MultiCommand) Client ¶ added in v0.2.0
func (mc *MultiCommand) Client(args ...interface{})
Client queues a Redis CLIENT command for later execution.
func (*MultiCommand) Cluster ¶ added in v0.2.0
func (mc *MultiCommand) Cluster(args ...interface{})
Cluster queues a Redis CLUSTER command for later execution.
func (*MultiCommand) Command ¶
func (mc *MultiCommand) Command(cmd string, args ...interface{})
Command queues a command for later execution.
func (*MultiCommand) Config ¶ added in v0.2.0
func (mc *MultiCommand) Config(args ...interface{})
Config queues a Redis CONFIG command for later execution.
func (*MultiCommand) Dbsize ¶ added in v0.2.0
func (mc *MultiCommand) Dbsize(args ...interface{})
Dbsize queues a Redis DBSIZE command for later execution.
func (*MultiCommand) Debug ¶ added in v0.2.0
func (mc *MultiCommand) Debug(args ...interface{})
Debug queues a Redis DEBUG command for later execution.
func (*MultiCommand) Decr ¶ added in v0.2.0
func (mc *MultiCommand) Decr(args ...interface{})
Decr queues a Redis DECR command for later execution.
func (*MultiCommand) Decrby ¶ added in v0.2.0
func (mc *MultiCommand) Decrby(args ...interface{})
Decrby queues a Redis DECRBY command for later execution.
func (*MultiCommand) Del ¶ added in v0.2.0
func (mc *MultiCommand) Del(args ...interface{})
Del queues a Redis DEL command for later execution.
func (*MultiCommand) Discard ¶ added in v0.2.0
func (mc *MultiCommand) Discard(args ...interface{})
Discard queues a Redis DISCARD command for later execution.
func (*MultiCommand) Dump ¶ added in v0.2.0
func (mc *MultiCommand) Dump(args ...interface{})
Dump queues a Redis DUMP command for later execution.
func (*MultiCommand) Echo ¶ added in v0.2.0
func (mc *MultiCommand) Echo(args ...interface{})
Echo queues a Redis ECHO command for later execution.
func (*MultiCommand) Eval ¶ added in v0.2.0
func (mc *MultiCommand) Eval(args ...interface{})
Eval queues a Redis EVAL command for later execution.
func (*MultiCommand) Exec ¶ added in v0.2.0
func (mc *MultiCommand) Exec(args ...interface{})
Exec queues a Redis EXEC command for later execution.
func (*MultiCommand) Exists ¶ added in v0.2.0
func (mc *MultiCommand) Exists(args ...interface{})
Exists queues a Redis EXISTS command for later execution.
func (*MultiCommand) Expire ¶ added in v0.2.0
func (mc *MultiCommand) Expire(args ...interface{})
Expire queues a Redis EXPIRE command for later execution.
func (*MultiCommand) Expireat ¶ added in v0.2.0
func (mc *MultiCommand) Expireat(args ...interface{})
Expireat queues a Redis EXPIREAT command for later execution.
func (*MultiCommand) Flush ¶
func (mc *MultiCommand) Flush() (r *Reply)
Flush sends queued commands to the Redis server for execution and returns the returned Reply.
func (*MultiCommand) Flushall ¶ added in v0.2.0
func (mc *MultiCommand) Flushall(args ...interface{})
Flushall queues a Redis FLUSHALL command for later execution.
func (*MultiCommand) Flushdb ¶ added in v0.2.0
func (mc *MultiCommand) Flushdb(args ...interface{})
Flushdb queues a Redis FLUSHDB command for later execution.
func (*MultiCommand) Get ¶ added in v0.2.0
func (mc *MultiCommand) Get(args ...interface{})
Get queues a Redis GET command for later execution.
func (*MultiCommand) Getbit ¶ added in v0.2.0
func (mc *MultiCommand) Getbit(args ...interface{})
Getbit queues a Redis GETBIT command for later execution.
func (*MultiCommand) Getrange ¶ added in v0.2.0
func (mc *MultiCommand) Getrange(args ...interface{})
Getrange queues a Redis GETRANGE command for later execution.
func (*MultiCommand) Getset ¶ added in v0.2.0
func (mc *MultiCommand) Getset(args ...interface{})
Getset queues a Redis GETSET command for later execution.
func (*MultiCommand) Hdel ¶ added in v0.2.0
func (mc *MultiCommand) Hdel(args ...interface{})
Hdel queues a Redis HDEL command for later execution.
func (*MultiCommand) Hexists ¶ added in v0.2.0
func (mc *MultiCommand) Hexists(args ...interface{})
Hexists queues a Redis HEXISTS command for later execution.
func (*MultiCommand) Hget ¶ added in v0.2.0
func (mc *MultiCommand) Hget(args ...interface{})
Hget queues a Redis HGET command for later execution.
func (*MultiCommand) Hgetall ¶ added in v0.2.0
func (mc *MultiCommand) Hgetall(args ...interface{})
Hgetall queues a Redis HGETALL command for later execution.
func (*MultiCommand) Hincrby ¶ added in v0.2.0
func (mc *MultiCommand) Hincrby(args ...interface{})
Hincrby queues a Redis HINCRBY command for later execution.
func (*MultiCommand) Hincrbyfloat ¶ added in v0.2.0
func (mc *MultiCommand) Hincrbyfloat(args ...interface{})
Hincrbyfloat queues a Redis HINCRBYFLOAT command for later execution.
func (*MultiCommand) Hkeys ¶ added in v0.2.0
func (mc *MultiCommand) Hkeys(args ...interface{})
Hkeys queues a Redis HKEYS command for later execution.
func (*MultiCommand) Hlen ¶ added in v0.2.0
func (mc *MultiCommand) Hlen(args ...interface{})
Hlen queues a Redis HLEN command for later execution.
func (*MultiCommand) Hmget ¶ added in v0.2.0
func (mc *MultiCommand) Hmget(args ...interface{})
Hmget queues a Redis HMGET command for later execution.
func (*MultiCommand) Hmset ¶ added in v0.2.0
func (mc *MultiCommand) Hmset(args ...interface{})
Hmset queues a Redis HMSET command for later execution.
func (*MultiCommand) Hset ¶ added in v0.2.0
func (mc *MultiCommand) Hset(args ...interface{})
Hset queues a Redis HSET command for later execution.
func (*MultiCommand) Hsetnx ¶ added in v0.2.0
func (mc *MultiCommand) Hsetnx(args ...interface{})
Hsetnx queues a Redis HSETNX command for later execution.
func (*MultiCommand) Hvals ¶ added in v0.2.0
func (mc *MultiCommand) Hvals(args ...interface{})
Hvals queues a Redis HVALS command for later execution.
func (*MultiCommand) Incr ¶ added in v0.2.0
func (mc *MultiCommand) Incr(args ...interface{})
Incr queues a Redis INCR command for later execution.
func (*MultiCommand) Incrby ¶ added in v0.2.0
func (mc *MultiCommand) Incrby(args ...interface{})
Incrby queues a Redis INCRBY command for later execution.
func (*MultiCommand) Incrbyfloat ¶ added in v0.2.0
func (mc *MultiCommand) Incrbyfloat(args ...interface{})
Incrbyfloat queues a Redis INCRBYFLOAT command for later execution.
func (*MultiCommand) Info ¶ added in v0.2.0
func (mc *MultiCommand) Info(args ...interface{})
Info queues a Redis INFO command for later execution.
func (*MultiCommand) Keys ¶ added in v0.2.0
func (mc *MultiCommand) Keys(args ...interface{})
Keys queues a Redis KEYS command for later execution.
func (*MultiCommand) Lastsave ¶ added in v0.2.0
func (mc *MultiCommand) Lastsave(args ...interface{})
Lastsave queues a Redis LASTSAVE command for later execution.
func (*MultiCommand) Lindex ¶ added in v0.2.0
func (mc *MultiCommand) Lindex(args ...interface{})
Lindex queues a Redis LINDEX command for later execution.
func (*MultiCommand) Linsert ¶ added in v0.2.0
func (mc *MultiCommand) Linsert(args ...interface{})
Linsert queues a Redis LINSERT command for later execution.
func (*MultiCommand) Llen ¶ added in v0.2.0
func (mc *MultiCommand) Llen(args ...interface{})
Llen queues a Redis LLEN command for later execution.
func (*MultiCommand) Lpop ¶ added in v0.2.0
func (mc *MultiCommand) Lpop(args ...interface{})
Lpop queues a Redis LPOP command for later execution.
func (*MultiCommand) Lpush ¶ added in v0.2.0
func (mc *MultiCommand) Lpush(args ...interface{})
Lpush queues a Redis LPUSH command for later execution.
func (*MultiCommand) Lpushx ¶ added in v0.2.0
func (mc *MultiCommand) Lpushx(args ...interface{})
Lpushx queues a Redis LPUSHX command for later execution.
func (*MultiCommand) Lrange ¶ added in v0.2.0
func (mc *MultiCommand) Lrange(args ...interface{})
Lrange queues a Redis LRANGE command for later execution.
func (*MultiCommand) Lrem ¶ added in v0.2.0
func (mc *MultiCommand) Lrem(args ...interface{})
Lrem queues a Redis LREM command for later execution.
func (*MultiCommand) Lset ¶ added in v0.2.0
func (mc *MultiCommand) Lset(args ...interface{})
Lset queues a Redis LSET command for later execution.
func (*MultiCommand) Ltrim ¶ added in v0.2.0
func (mc *MultiCommand) Ltrim(args ...interface{})
Ltrim queues a Redis LTRIM command for later execution.
func (*MultiCommand) Mget ¶ added in v0.2.0
func (mc *MultiCommand) Mget(args ...interface{})
Mget queues a Redis MGET command for later execution.
func (*MultiCommand) Migrate ¶ added in v0.2.0
func (mc *MultiCommand) Migrate(args ...interface{})
Migrate queues a Redis MIGRATE command for later execution.
func (*MultiCommand) Monitor ¶ added in v0.2.0
func (mc *MultiCommand) Monitor(args ...interface{})
Monitor queues a Redis MONITOR command for later execution.
func (*MultiCommand) Move ¶ added in v0.2.0
func (mc *MultiCommand) Move(args ...interface{})
Move queues a Redis MOVE command for later execution.
func (*MultiCommand) Mset ¶ added in v0.2.0
func (mc *MultiCommand) Mset(args ...interface{})
Mset queues a Redis MSET command for later execution.
func (*MultiCommand) Msetnx ¶ added in v0.2.0
func (mc *MultiCommand) Msetnx(args ...interface{})
Msetnx queues a Redis MSETNX command for later execution.
func (*MultiCommand) Multi ¶ added in v0.2.0
func (mc *MultiCommand) Multi(args ...interface{})
Multi queues a Redis MULTI command for later execution.
func (*MultiCommand) Object ¶ added in v0.2.0
func (mc *MultiCommand) Object(args ...interface{})
Object queues a Redis OBJECT command for later execution.
func (*MultiCommand) Persist ¶ added in v0.2.0
func (mc *MultiCommand) Persist(args ...interface{})
Persist queues a Redis PERSIST command for later execution.
func (*MultiCommand) Pexpire ¶ added in v0.2.0
func (mc *MultiCommand) Pexpire(args ...interface{})
Pexpire queues a Redis PEXPIRE command for later execution.
func (*MultiCommand) Pexpireat ¶ added in v0.2.0
func (mc *MultiCommand) Pexpireat(args ...interface{})
Pexpireat queues a Redis PEXPIREAT command for later execution.
func (*MultiCommand) Ping ¶ added in v0.2.0
func (mc *MultiCommand) Ping(args ...interface{})
Ping queues a Redis PING command for later execution.
func (*MultiCommand) Psetex ¶ added in v0.2.0
func (mc *MultiCommand) Psetex(args ...interface{})
Psetex queues a Redis PSETEX command for later execution.
func (*MultiCommand) Psubscribe ¶ added in v0.2.0
func (mc *MultiCommand) Psubscribe(args ...interface{})
Psubscribe queues a Redis PSUBSCRIBE command for later execution.
func (*MultiCommand) Pttl ¶ added in v0.2.0
func (mc *MultiCommand) Pttl(args ...interface{})
Pttl queues a Redis PTTL command for later execution.
func (*MultiCommand) Publish ¶ added in v0.2.0
func (mc *MultiCommand) Publish(args ...interface{})
Publish queues a Redis PUBLISH command for later execution.
func (*MultiCommand) Punsubscribe ¶ added in v0.2.0
func (mc *MultiCommand) Punsubscribe(args ...interface{})
Punsubscribe queues a Redis PUNSUBSCRIBE command for later execution.
func (*MultiCommand) Randomkey ¶ added in v0.2.0
func (mc *MultiCommand) Randomkey(args ...interface{})
Randomkey queues a Redis RANDOMKEY command for later execution.
func (*MultiCommand) Rename ¶ added in v0.2.0
func (mc *MultiCommand) Rename(args ...interface{})
Rename queues a Redis RENAME command for later execution.
func (*MultiCommand) Renamenx ¶ added in v0.2.0
func (mc *MultiCommand) Renamenx(args ...interface{})
Renamenx queues a Redis RENAMENX command for later execution.
func (*MultiCommand) Restore ¶ added in v0.2.0
func (mc *MultiCommand) Restore(args ...interface{})
Restore queues a Redis RESTORE command for later execution.
func (*MultiCommand) Rpop ¶ added in v0.2.0
func (mc *MultiCommand) Rpop(args ...interface{})
Rpop queues a Redis RPOP command for later execution.
func (*MultiCommand) Rpoplpush ¶ added in v0.2.0
func (mc *MultiCommand) Rpoplpush(args ...interface{})
Rpoplpush queues a Redis RPOPLPUSH command for later execution.
func (*MultiCommand) Rpush ¶ added in v0.2.0
func (mc *MultiCommand) Rpush(args ...interface{})
Rpush queues a Redis RPUSH command for later execution.
func (*MultiCommand) Rpushx ¶ added in v0.2.0
func (mc *MultiCommand) Rpushx(args ...interface{})
Rpushx queues a Redis RPUSHX command for later execution.
func (*MultiCommand) Sadd ¶ added in v0.2.0
func (mc *MultiCommand) Sadd(args ...interface{})
Sadd queues a Redis SADD command for later execution.
func (*MultiCommand) Save ¶ added in v0.2.0
func (mc *MultiCommand) Save(args ...interface{})
Save queues a Redis SAVE command for later execution.
func (*MultiCommand) Scard ¶ added in v0.2.0
func (mc *MultiCommand) Scard(args ...interface{})
Scard queues a Redis SCARD command for later execution.
func (*MultiCommand) Script ¶ added in v0.2.0
func (mc *MultiCommand) Script(args ...interface{})
Script queues a Redis SCRIPT command for later execution.
func (*MultiCommand) Sdiff ¶ added in v0.2.0
func (mc *MultiCommand) Sdiff(args ...interface{})
Sdiff queues a Redis SDIFF command for later execution.
func (*MultiCommand) Sdiffstore ¶ added in v0.2.0
func (mc *MultiCommand) Sdiffstore(args ...interface{})
Sdiffstore queues a Redis SDIFFSTORE command for later execution.
func (*MultiCommand) Select ¶ added in v0.2.0
func (mc *MultiCommand) Select(args ...interface{})
Select queues a Redis SELECT command for later execution.
func (*MultiCommand) Set ¶ added in v0.2.0
func (mc *MultiCommand) Set(args ...interface{})
Set queues a Redis SET command for later execution.
func (*MultiCommand) Setbit ¶ added in v0.2.0
func (mc *MultiCommand) Setbit(args ...interface{})
Setbit queues a Redis SETBIT command for later execution.
func (*MultiCommand) Setex ¶ added in v0.2.0
func (mc *MultiCommand) Setex(args ...interface{})
Setex queues a Redis SETEX command for later execution.
func (*MultiCommand) Setnx ¶ added in v0.2.0
func (mc *MultiCommand) Setnx(args ...interface{})
Setnx queues a Redis SETNX command for later execution.
func (*MultiCommand) Setrange ¶ added in v0.2.0
func (mc *MultiCommand) Setrange(args ...interface{})
Setrange queues a Redis SETRANGE command for later execution.
func (*MultiCommand) Shutdown ¶ added in v0.2.0
func (mc *MultiCommand) Shutdown(args ...interface{})
Shutdown queues a Redis SHUTDOWN command for later execution.
func (*MultiCommand) Sinter ¶ added in v0.2.0
func (mc *MultiCommand) Sinter(args ...interface{})
Sinter queues a Redis SINTER command for later execution.
func (*MultiCommand) Sinterstore ¶ added in v0.2.0
func (mc *MultiCommand) Sinterstore(args ...interface{})
Sinterstore queues a Redis SINTERSTORE command for later execution.
func (*MultiCommand) Sismember ¶ added in v0.2.0
func (mc *MultiCommand) Sismember(args ...interface{})
Sismember queues a Redis SISMEMBER command for later execution.
func (*MultiCommand) Slaveof ¶ added in v0.2.0
func (mc *MultiCommand) Slaveof(args ...interface{})
Slaveof queues a Redis SLAVEOF command for later execution.
func (*MultiCommand) Smembers ¶ added in v0.2.0
func (mc *MultiCommand) Smembers(args ...interface{})
Smembers queues a Redis SMEMBERS command for later execution.
func (*MultiCommand) Smove ¶ added in v0.2.0
func (mc *MultiCommand) Smove(args ...interface{})
Smove queues a Redis SMOVE command for later execution.
func (*MultiCommand) Sort ¶ added in v0.2.0
func (mc *MultiCommand) Sort(args ...interface{})
Sort queues a Redis SORT command for later execution.
func (*MultiCommand) Spop ¶ added in v0.2.0
func (mc *MultiCommand) Spop(args ...interface{})
Spop queues a Redis SPOP command for later execution.
func (*MultiCommand) Srandmember ¶ added in v0.2.0
func (mc *MultiCommand) Srandmember(args ...interface{})
Srandmember queues a Redis SRANDMEMBER command for later execution.
func (*MultiCommand) Srem ¶ added in v0.2.0
func (mc *MultiCommand) Srem(args ...interface{})
Srem queues a Redis SREM command for later execution.
func (*MultiCommand) Strlen ¶ added in v0.2.0
func (mc *MultiCommand) Strlen(args ...interface{})
Strlen queues a Redis STRLEN command for later execution.
func (*MultiCommand) Subscribe ¶ added in v0.2.0
func (mc *MultiCommand) Subscribe(args ...interface{})
Subscribe queues a Redis SUBSCRIBE command for later execution.
func (*MultiCommand) Sunion ¶ added in v0.2.0
func (mc *MultiCommand) Sunion(args ...interface{})
Sunion queues a Redis SUNION command for later execution.
func (*MultiCommand) Sunionstore ¶ added in v0.2.0
func (mc *MultiCommand) Sunionstore(args ...interface{})
Sunionstore queues a Redis SUNIONSTORE command for later execution.
func (*MultiCommand) Sync ¶ added in v0.2.0
func (mc *MultiCommand) Sync(args ...interface{})
Sync queues a Redis SYNC command for later execution.
func (*MultiCommand) Time ¶ added in v0.2.0
func (mc *MultiCommand) Time(args ...interface{})
Time queues a Redis TIME command for later execution.
func (*MultiCommand) Ttl ¶ added in v0.2.0
func (mc *MultiCommand) Ttl(args ...interface{})
Ttl queues a Redis TTL command for later execution.
func (*MultiCommand) Type ¶ added in v0.2.0
func (mc *MultiCommand) Type(args ...interface{})
Type queues a Redis TYPE command for later execution.
func (*MultiCommand) Unsubscribe ¶ added in v0.2.0
func (mc *MultiCommand) Unsubscribe(args ...interface{})
Unsubscribe queues a Redis UNSUBSCRIBE command for later execution.
func (*MultiCommand) Unwatch ¶ added in v0.2.0
func (mc *MultiCommand) Unwatch(args ...interface{})
Unwatch queues a Redis UNWATCH command for later execution.
func (*MultiCommand) Watch ¶ added in v0.2.0
func (mc *MultiCommand) Watch(args ...interface{})
Watch queues a Redis WATCH command for later execution.
func (*MultiCommand) Zadd ¶ added in v0.2.0
func (mc *MultiCommand) Zadd(args ...interface{})
Zadd queues a Redis ZADD command for later execution.
func (*MultiCommand) Zcard ¶ added in v0.2.0
func (mc *MultiCommand) Zcard(args ...interface{})
Zcard queues a Redis ZCARD command for later execution.
func (*MultiCommand) Zcount ¶ added in v0.2.0
func (mc *MultiCommand) Zcount(args ...interface{})
Zcount queues a Redis ZCOUNT command for later execution.
func (*MultiCommand) Zincrby ¶ added in v0.2.0
func (mc *MultiCommand) Zincrby(args ...interface{})
Zincrby queues a Redis ZINCRBY command for later execution.
func (*MultiCommand) Zinterstore ¶ added in v0.2.0
func (mc *MultiCommand) Zinterstore(args ...interface{})
Zinterstore queues a Redis ZINTERSTORE command for later execution.
func (*MultiCommand) Zrange ¶ added in v0.2.0
func (mc *MultiCommand) Zrange(args ...interface{})
Zrange queues a Redis ZRANGE command for later execution.
func (*MultiCommand) Zrangebyscore ¶ added in v0.2.0
func (mc *MultiCommand) Zrangebyscore(args ...interface{})
Zrangebyscore queues a Redis ZRANGEBYSCORE command for later execution.
func (*MultiCommand) Zrank ¶ added in v0.2.0
func (mc *MultiCommand) Zrank(args ...interface{})
Zrank queues a Redis ZRANK command for later execution.
func (*MultiCommand) Zrem ¶ added in v0.2.0
func (mc *MultiCommand) Zrem(args ...interface{})
Zrem queues a Redis ZREM command for later execution.
func (*MultiCommand) Zremrangebyrank ¶ added in v0.2.0
func (mc *MultiCommand) Zremrangebyrank(args ...interface{})
Zremrangebyrank queues a Redis ZREMRANGEBYRANK command for later execution.
func (*MultiCommand) Zremrangebyscore ¶ added in v0.2.0
func (mc *MultiCommand) Zremrangebyscore(args ...interface{})
Zremrangebyscore queues a Redis ZREMRANGEBYSCORE command for later execution.
func (*MultiCommand) Zrevrange ¶ added in v0.2.0
func (mc *MultiCommand) Zrevrange(args ...interface{})
Zrevrange queues a Redis ZREVRANGE command for later execution.
func (*MultiCommand) Zrevrangebyscore ¶ added in v0.2.0
func (mc *MultiCommand) Zrevrangebyscore(args ...interface{})
Zrevrangebyscore queues a Redis ZREVRANGEBYSCORE command for later execution.
func (*MultiCommand) Zrevrank ¶ added in v0.2.0
func (mc *MultiCommand) Zrevrank(args ...interface{})
Zrevrank queues a Redis ZREVRANK command for later execution.
func (*MultiCommand) Zscore ¶ added in v0.2.0
func (mc *MultiCommand) Zscore(args ...interface{})
Zscore queues a Redis ZSCORE command for later execution.
func (*MultiCommand) Zunionstore ¶ added in v0.2.0
func (mc *MultiCommand) Zunionstore(args ...interface{})
Zunionstore queues a Redis ZUNIONSTORE command for later execution.
type Reply ¶
Reply holds a Redis reply.
func (*Reply) At ¶
At returns a Reply of a multi reply by its index. It panics, if the reply type is not ReplyMulti or if the index is out of range.
func (*Reply) Bool ¶
Bool returns true, if the reply value equals to 1 or "1", otherwise false. It panics, if the reply type is not ReplyInteger or ReplyString.
func (*Reply) Elems ¶
Elems returns the elements (sub-replies) of a multi reply. It panics, if the reply type is not ReplyMulti.
func (*Reply) Int64 ¶
Int64 returns the reply value as a int64. It panics, if the reply type is not ReplyInteger.
func (*Reply) Len ¶
Len returns the number of elements in a multi reply. Zero is returned when reply type is not ReplyMulti.
func (*Reply) Map ¶
Map returns a multi-bulk reply as a map[string]*Reply or an error. The reply elements must be in a "key value key value..."-style order.
func (*Reply) Str ¶
Str returns the reply value as a string or a nil, if the reply type is ReplyNil. It panics, if the reply type is not ReplyNil, ReplyStatus or ReplyString.
func (*Reply) String ¶
String returns a string representation of the reply and its sub-replies. This method is mainly used for debugging. Use method Reply.Str() for fetching a string reply.
type ReplyType ¶
type ReplyType uint8
ReplyType describes the type of reply.
Possbile values are:
ReplyStatus -- status reply ReplyError -- error reply ReplyInteger -- integer reply ReplyNil -- nil reply ReplyString -- string reply ReplyMulti -- multi-bulk or multi-command reply
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription is a structure for holding a Redis subscription for multiple channels.
func (*Subscription) Close ¶
func (s *Subscription) Close()
Close closes the Subscription and returns its connection to the connection pool.
func (*Subscription) Psubscribe ¶ added in v0.2.0
func (s *Subscription) Psubscribe(patterns ...string) *Error
Psubscribe subscribes to given patterns or returns an error.
func (*Subscription) Punsubscribe ¶ added in v0.2.0
func (s *Subscription) Punsubscribe(patterns ...string) *Error
Punsubscribe unsubscribes from given patterns or returns an error.
func (*Subscription) Subscribe ¶
func (s *Subscription) Subscribe(channels ...string) *Error
Subscribe subscribes to given channels or returns an error.
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe(channels ...string) *Error
Unsubscribe unsubscribes from given channels or returns an error.