Documentation ¶
Overview ¶
This package implements a Redis client.
Client is a structure for accessing a Redis database. Client.MultiCall 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) AsyncBitcount(args ...interface{}) Future
- func (c *Client) AsyncBitop(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) AsyncCall(cmd string, args ...interface{}) Future
- func (c *Client) AsyncClient(args ...interface{}) Future
- func (c *Client) AsyncCluster(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) AsyncMultiCall(mc func(*MultiCall)) 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) AsyncReplconf(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(*MultiCall)) 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) Bitcount(args ...interface{}) *Reply
- func (c *Client) Bitop(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) Call(cmd string, args ...interface{}) *Reply
- func (c *Client) Client(args ...interface{}) *Reply
- func (c *Client) Close()
- func (c *Client) Cluster(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) InfoMap() (map[string]string, error)
- 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) MultiCall(f func(*MultiCall)) *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) Replconf(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(*MultiCall)) *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 Cmd
- type Config
- type Error
- type ErrorFlag
- type Future
- type Message
- type MessageType
- type MultiCall
- func (mc *MultiCall) Append(args ...interface{})
- func (mc *MultiCall) Asking(args ...interface{})
- func (mc *MultiCall) Auth(args ...interface{})
- func (mc *MultiCall) Bgrewriteaof(args ...interface{})
- func (mc *MultiCall) Bgsave(args ...interface{})
- func (mc *MultiCall) Bitcount(args ...interface{})
- func (mc *MultiCall) Bitop(args ...interface{})
- func (mc *MultiCall) Blpop(args ...interface{})
- func (mc *MultiCall) Brpop(args ...interface{})
- func (mc *MultiCall) Brpoplpush(args ...interface{})
- func (mc *MultiCall) Call(cmd string, args ...interface{})
- func (mc *MultiCall) Client(args ...interface{})
- func (mc *MultiCall) Cluster(args ...interface{})
- func (mc *MultiCall) Config(args ...interface{})
- func (mc *MultiCall) Dbsize(args ...interface{})
- func (mc *MultiCall) Debug(args ...interface{})
- func (mc *MultiCall) Decr(args ...interface{})
- func (mc *MultiCall) Decrby(args ...interface{})
- func (mc *MultiCall) Del(args ...interface{})
- func (mc *MultiCall) Discard(args ...interface{})
- func (mc *MultiCall) Dump(args ...interface{})
- func (mc *MultiCall) Echo(args ...interface{})
- func (mc *MultiCall) Eval(args ...interface{})
- func (mc *MultiCall) Exec(args ...interface{})
- func (mc *MultiCall) Exists(args ...interface{})
- func (mc *MultiCall) Expire(args ...interface{})
- func (mc *MultiCall) Expireat(args ...interface{})
- func (mc *MultiCall) Flush() (r *Reply)
- func (mc *MultiCall) Flushall(args ...interface{})
- func (mc *MultiCall) Flushdb(args ...interface{})
- func (mc *MultiCall) Get(args ...interface{})
- func (mc *MultiCall) Getbit(args ...interface{})
- func (mc *MultiCall) Getrange(args ...interface{})
- func (mc *MultiCall) Getset(args ...interface{})
- func (mc *MultiCall) Hdel(args ...interface{})
- func (mc *MultiCall) Hexists(args ...interface{})
- func (mc *MultiCall) Hget(args ...interface{})
- func (mc *MultiCall) Hgetall(args ...interface{})
- func (mc *MultiCall) Hincrby(args ...interface{})
- func (mc *MultiCall) Hincrbyfloat(args ...interface{})
- func (mc *MultiCall) Hkeys(args ...interface{})
- func (mc *MultiCall) Hlen(args ...interface{})
- func (mc *MultiCall) Hmget(args ...interface{})
- func (mc *MultiCall) Hmset(args ...interface{})
- func (mc *MultiCall) Hset(args ...interface{})
- func (mc *MultiCall) Hsetnx(args ...interface{})
- func (mc *MultiCall) Hvals(args ...interface{})
- func (mc *MultiCall) Incr(args ...interface{})
- func (mc *MultiCall) Incrby(args ...interface{})
- func (mc *MultiCall) Incrbyfloat(args ...interface{})
- func (mc *MultiCall) Info(args ...interface{})
- func (mc *MultiCall) Keys(args ...interface{})
- func (mc *MultiCall) Lastsave(args ...interface{})
- func (mc *MultiCall) Lindex(args ...interface{})
- func (mc *MultiCall) Linsert(args ...interface{})
- func (mc *MultiCall) Llen(args ...interface{})
- func (mc *MultiCall) Lpop(args ...interface{})
- func (mc *MultiCall) Lpush(args ...interface{})
- func (mc *MultiCall) Lpushx(args ...interface{})
- func (mc *MultiCall) Lrange(args ...interface{})
- func (mc *MultiCall) Lrem(args ...interface{})
- func (mc *MultiCall) Lset(args ...interface{})
- func (mc *MultiCall) Ltrim(args ...interface{})
- func (mc *MultiCall) Mget(args ...interface{})
- func (mc *MultiCall) Migrate(args ...interface{})
- func (mc *MultiCall) Monitor(args ...interface{})
- func (mc *MultiCall) Move(args ...interface{})
- func (mc *MultiCall) Mset(args ...interface{})
- func (mc *MultiCall) Msetnx(args ...interface{})
- func (mc *MultiCall) Multi(args ...interface{})
- func (mc *MultiCall) Object(args ...interface{})
- func (mc *MultiCall) Persist(args ...interface{})
- func (mc *MultiCall) Pexpire(args ...interface{})
- func (mc *MultiCall) Pexpireat(args ...interface{})
- func (mc *MultiCall) Ping(args ...interface{})
- func (mc *MultiCall) Psetex(args ...interface{})
- func (mc *MultiCall) Psubscribe(args ...interface{})
- func (mc *MultiCall) Pttl(args ...interface{})
- func (mc *MultiCall) Publish(args ...interface{})
- func (mc *MultiCall) Punsubscribe(args ...interface{})
- func (mc *MultiCall) Randomkey(args ...interface{})
- func (mc *MultiCall) Rename(args ...interface{})
- func (mc *MultiCall) Renamenx(args ...interface{})
- func (mc *MultiCall) Replconf(args ...interface{})
- func (mc *MultiCall) Restore(args ...interface{})
- func (mc *MultiCall) Rpop(args ...interface{})
- func (mc *MultiCall) Rpoplpush(args ...interface{})
- func (mc *MultiCall) Rpush(args ...interface{})
- func (mc *MultiCall) Rpushx(args ...interface{})
- func (mc *MultiCall) Sadd(args ...interface{})
- func (mc *MultiCall) Save(args ...interface{})
- func (mc *MultiCall) Scard(args ...interface{})
- func (mc *MultiCall) Script(args ...interface{})
- func (mc *MultiCall) Sdiff(args ...interface{})
- func (mc *MultiCall) Sdiffstore(args ...interface{})
- func (mc *MultiCall) Select(args ...interface{})
- func (mc *MultiCall) Set(args ...interface{})
- func (mc *MultiCall) Setbit(args ...interface{})
- func (mc *MultiCall) Setex(args ...interface{})
- func (mc *MultiCall) Setnx(args ...interface{})
- func (mc *MultiCall) Setrange(args ...interface{})
- func (mc *MultiCall) Shutdown(args ...interface{})
- func (mc *MultiCall) Sinter(args ...interface{})
- func (mc *MultiCall) Sinterstore(args ...interface{})
- func (mc *MultiCall) Sismember(args ...interface{})
- func (mc *MultiCall) Slaveof(args ...interface{})
- func (mc *MultiCall) Smembers(args ...interface{})
- func (mc *MultiCall) Smove(args ...interface{})
- func (mc *MultiCall) Sort(args ...interface{})
- func (mc *MultiCall) Spop(args ...interface{})
- func (mc *MultiCall) Srandmember(args ...interface{})
- func (mc *MultiCall) Srem(args ...interface{})
- func (mc *MultiCall) Strlen(args ...interface{})
- func (mc *MultiCall) Subscribe(args ...interface{})
- func (mc *MultiCall) Sunion(args ...interface{})
- func (mc *MultiCall) Sunionstore(args ...interface{})
- func (mc *MultiCall) Sync(args ...interface{})
- func (mc *MultiCall) Time(args ...interface{})
- func (mc *MultiCall) Ttl(args ...interface{})
- func (mc *MultiCall) Type(args ...interface{})
- func (mc *MultiCall) Unsubscribe(args ...interface{})
- func (mc *MultiCall) Unwatch(args ...interface{})
- func (mc *MultiCall) Watch(args ...interface{})
- func (mc *MultiCall) Zadd(args ...interface{})
- func (mc *MultiCall) Zcard(args ...interface{})
- func (mc *MultiCall) Zcount(args ...interface{})
- func (mc *MultiCall) Zincrby(args ...interface{})
- func (mc *MultiCall) Zinterstore(args ...interface{})
- func (mc *MultiCall) Zrange(args ...interface{})
- func (mc *MultiCall) Zrangebyscore(args ...interface{})
- func (mc *MultiCall) Zrank(args ...interface{})
- func (mc *MultiCall) Zrem(args ...interface{})
- func (mc *MultiCall) Zremrangebyrank(args ...interface{})
- func (mc *MultiCall) Zremrangebyscore(args ...interface{})
- func (mc *MultiCall) Zrevrange(args ...interface{})
- func (mc *MultiCall) Zrevrangebyscore(args ...interface{})
- func (mc *MultiCall) Zrevrank(args ...interface{})
- func (mc *MultiCall) Zscore(args ...interface{})
- func (mc *MultiCall) Zunionstore(args ...interface{})
- type Reply
- func (r *Reply) Bool() (bool, error)
- func (r *Reply) Bytes() ([]byte, error)
- func (r *Reply) Hash() (map[string]string, error)
- func (r *Reply) Int() (int, error)
- func (r *Reply) Int64() (int64, error)
- func (r *Reply) List() ([]string, error)
- func (r *Reply) Str() (string, error)
- func (r *Reply) String() string
- type ReplyType
- type Subscription
- func (s *Subscription) Close()
- func (s *Subscription) Psubscribe(patterns ...string) (err *Error)
- func (s *Subscription) Punsubscribe(patterns ...string) (err *Error)
- func (s *Subscription) Subscribe(channels ...string) (err *Error)
- func (s *Subscription) Unsubscribe(channels ...string) (err *Error)
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 (*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) AsyncBitcount ¶ added in v0.3.0
AsyncBitcount calls Redis BITCOUNT asynchronously.
func (*Client) AsyncBitop ¶ added in v0.3.0
AsyncBitop calls Redis BITOP 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) 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) AsyncMultiCall ¶ added in v0.2.1
AsyncMultiCall calls an asynchronous MultiCall.
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) AsyncReplconf ¶ added in v0.3.0
AsyncReplconf calls Redis REPLCONF 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 ¶
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) InfoMap ¶ added in v0.3.0
InfoMap calls the INFO command, parses and returns the results as a map[string]string or an error. Use Info method for fetching the unparsed INFO results.
func (*Client) MultiCall ¶ added in v0.2.1
MultiCall executes the given MultiCall. Multicall reply is guaranteed to have the same number of sub-replies as calls, if it succeeds.
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 returns a new Subscription instance with the given message handler callback or an error. The message handler is called whenever a new message arrives. Subscriptions create their own dedicated connections, they do not pull connections from the connection pool.
func (*Client) Sunionstore ¶ added in v0.2.0
Sunionstore calls Redis SUNIONSTORE command.
func (*Client) Transaction ¶
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 MultiCall. Transaction reply is guaranteed to have the same number of sub-replies as calls, if it succeeds.
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 Config ¶ added in v0.1.5
type Config struct { // Network and address // "tcp" or "unix". Default: "tcp" Network string // eg. "173.194.32.33:6379". Default: "127.0.0.1:6379" Address string // Database number. Default: 0 Database int // Password for authentication. Leave as "" to not use authentication. // Default: "" Password string // Connection pool capacity. Default: 50 PoolCapacity int // Socket timeout. Default: 0 (no timeouts) Timeout time.Duration // Retry on LOADING error? Default: true RetryLoading bool }
Config is a configuration of a database client.
func DefaultConfig ¶ added in v0.3.0
func DefaultConfig() Config
DefaultConfig returns a new Config with default settings.
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 call.
type Message ¶
type Message struct { Type MessageType Channel string Pattern string Subscriptions int Payload string }
Message describes a pub/sub message
type MessageType ¶
type MessageType int
const ( MessageSubscribe MessageType = iota MessageUnsubscribe MessagePsubscribe MessagePunsubscribe MessageMessage MessagePmessage )
type MultiCall ¶ added in v0.2.1
type MultiCall struct {
// contains filtered or unexported fields
}
MultiCall holds data for multiple command calls.
func (*MultiCall) Append ¶ added in v0.2.1
func (mc *MultiCall) Append(args ...interface{})
Append queues a Redis APPEND command for later execution.
func (*MultiCall) Asking ¶ added in v0.2.1
func (mc *MultiCall) Asking(args ...interface{})
Asking queues a Redis ASKING command for later execution.
func (*MultiCall) Auth ¶ added in v0.2.1
func (mc *MultiCall) Auth(args ...interface{})
Auth queues a Redis AUTH command for later execution.
func (*MultiCall) Bgrewriteaof ¶ added in v0.2.1
func (mc *MultiCall) Bgrewriteaof(args ...interface{})
Bgrewriteaof queues a Redis BGREWRITEAOF command for later execution.
func (*MultiCall) Bgsave ¶ added in v0.2.1
func (mc *MultiCall) Bgsave(args ...interface{})
Bgsave queues a Redis BGSAVE command for later execution.
func (*MultiCall) Bitcount ¶ added in v0.3.0
func (mc *MultiCall) Bitcount(args ...interface{})
Bitcount queues a Redis BITCOUNT command for later execution.
func (*MultiCall) Bitop ¶ added in v0.3.0
func (mc *MultiCall) Bitop(args ...interface{})
Bitop queues a Redis BITOP command for later execution.
func (*MultiCall) Blpop ¶ added in v0.2.1
func (mc *MultiCall) Blpop(args ...interface{})
Blpop queues a Redis BLPOP command for later execution.
func (*MultiCall) Brpop ¶ added in v0.2.1
func (mc *MultiCall) Brpop(args ...interface{})
Brpop queues a Redis BRPOP command for later execution.
func (*MultiCall) Brpoplpush ¶ added in v0.2.1
func (mc *MultiCall) Brpoplpush(args ...interface{})
Brpoplpush queues a Redis BRPOPLPUSH command for later execution.
func (*MultiCall) Client ¶ added in v0.2.1
func (mc *MultiCall) Client(args ...interface{})
Client queues a Redis CLIENT command for later execution.
func (*MultiCall) Cluster ¶ added in v0.2.1
func (mc *MultiCall) Cluster(args ...interface{})
Cluster queues a Redis CLUSTER command for later execution.
func (*MultiCall) Config ¶ added in v0.2.1
func (mc *MultiCall) Config(args ...interface{})
Config queues a Redis CONFIG command for later execution.
func (*MultiCall) Dbsize ¶ added in v0.2.1
func (mc *MultiCall) Dbsize(args ...interface{})
Dbsize queues a Redis DBSIZE command for later execution.
func (*MultiCall) Debug ¶ added in v0.2.1
func (mc *MultiCall) Debug(args ...interface{})
Debug queues a Redis DEBUG command for later execution.
func (*MultiCall) Decr ¶ added in v0.2.1
func (mc *MultiCall) Decr(args ...interface{})
Decr queues a Redis DECR command for later execution.
func (*MultiCall) Decrby ¶ added in v0.2.1
func (mc *MultiCall) Decrby(args ...interface{})
Decrby queues a Redis DECRBY command for later execution.
func (*MultiCall) Del ¶ added in v0.2.1
func (mc *MultiCall) Del(args ...interface{})
Del queues a Redis DEL command for later execution.
func (*MultiCall) Discard ¶ added in v0.2.1
func (mc *MultiCall) Discard(args ...interface{})
Discard queues a Redis DISCARD command for later execution.
func (*MultiCall) Dump ¶ added in v0.2.1
func (mc *MultiCall) Dump(args ...interface{})
Dump queues a Redis DUMP command for later execution.
func (*MultiCall) Echo ¶ added in v0.2.1
func (mc *MultiCall) Echo(args ...interface{})
Echo queues a Redis ECHO command for later execution.
func (*MultiCall) Eval ¶ added in v0.2.1
func (mc *MultiCall) Eval(args ...interface{})
Eval queues a Redis EVAL command for later execution.
func (*MultiCall) Exec ¶ added in v0.2.1
func (mc *MultiCall) Exec(args ...interface{})
Exec queues a Redis EXEC command for later execution.
func (*MultiCall) Exists ¶ added in v0.2.1
func (mc *MultiCall) Exists(args ...interface{})
Exists queues a Redis EXISTS command for later execution.
func (*MultiCall) Expire ¶ added in v0.2.1
func (mc *MultiCall) Expire(args ...interface{})
Expire queues a Redis EXPIRE command for later execution.
func (*MultiCall) Expireat ¶ added in v0.2.1
func (mc *MultiCall) Expireat(args ...interface{})
Expireat queues a Redis EXPIREAT command for later execution.
func (*MultiCall) Flush ¶ added in v0.2.1
Flush sends queued calls to the server for execution and returns the returned Reply.
func (*MultiCall) Flushall ¶ added in v0.2.1
func (mc *MultiCall) Flushall(args ...interface{})
Flushall queues a Redis FLUSHALL command for later execution.
func (*MultiCall) Flushdb ¶ added in v0.2.1
func (mc *MultiCall) Flushdb(args ...interface{})
Flushdb queues a Redis FLUSHDB command for later execution.
func (*MultiCall) Get ¶ added in v0.2.1
func (mc *MultiCall) Get(args ...interface{})
Get queues a Redis GET command for later execution.
func (*MultiCall) Getbit ¶ added in v0.2.1
func (mc *MultiCall) Getbit(args ...interface{})
Getbit queues a Redis GETBIT command for later execution.
func (*MultiCall) Getrange ¶ added in v0.2.1
func (mc *MultiCall) Getrange(args ...interface{})
Getrange queues a Redis GETRANGE command for later execution.
func (*MultiCall) Getset ¶ added in v0.2.1
func (mc *MultiCall) Getset(args ...interface{})
Getset queues a Redis GETSET command for later execution.
func (*MultiCall) Hdel ¶ added in v0.2.1
func (mc *MultiCall) Hdel(args ...interface{})
Hdel queues a Redis HDEL command for later execution.
func (*MultiCall) Hexists ¶ added in v0.2.1
func (mc *MultiCall) Hexists(args ...interface{})
Hexists queues a Redis HEXISTS command for later execution.
func (*MultiCall) Hget ¶ added in v0.2.1
func (mc *MultiCall) Hget(args ...interface{})
Hget queues a Redis HGET command for later execution.
func (*MultiCall) Hgetall ¶ added in v0.2.1
func (mc *MultiCall) Hgetall(args ...interface{})
Hgetall queues a Redis HGETALL command for later execution.
func (*MultiCall) Hincrby ¶ added in v0.2.1
func (mc *MultiCall) Hincrby(args ...interface{})
Hincrby queues a Redis HINCRBY command for later execution.
func (*MultiCall) Hincrbyfloat ¶ added in v0.2.1
func (mc *MultiCall) Hincrbyfloat(args ...interface{})
Hincrbyfloat queues a Redis HINCRBYFLOAT command for later execution.
func (*MultiCall) Hkeys ¶ added in v0.2.1
func (mc *MultiCall) Hkeys(args ...interface{})
Hkeys queues a Redis HKEYS command for later execution.
func (*MultiCall) Hlen ¶ added in v0.2.1
func (mc *MultiCall) Hlen(args ...interface{})
Hlen queues a Redis HLEN command for later execution.
func (*MultiCall) Hmget ¶ added in v0.2.1
func (mc *MultiCall) Hmget(args ...interface{})
Hmget queues a Redis HMGET command for later execution.
func (*MultiCall) Hmset ¶ added in v0.2.1
func (mc *MultiCall) Hmset(args ...interface{})
Hmset queues a Redis HMSET command for later execution.
func (*MultiCall) Hset ¶ added in v0.2.1
func (mc *MultiCall) Hset(args ...interface{})
Hset queues a Redis HSET command for later execution.
func (*MultiCall) Hsetnx ¶ added in v0.2.1
func (mc *MultiCall) Hsetnx(args ...interface{})
Hsetnx queues a Redis HSETNX command for later execution.
func (*MultiCall) Hvals ¶ added in v0.2.1
func (mc *MultiCall) Hvals(args ...interface{})
Hvals queues a Redis HVALS command for later execution.
func (*MultiCall) Incr ¶ added in v0.2.1
func (mc *MultiCall) Incr(args ...interface{})
Incr queues a Redis INCR command for later execution.
func (*MultiCall) Incrby ¶ added in v0.2.1
func (mc *MultiCall) Incrby(args ...interface{})
Incrby queues a Redis INCRBY command for later execution.
func (*MultiCall) Incrbyfloat ¶ added in v0.2.1
func (mc *MultiCall) Incrbyfloat(args ...interface{})
Incrbyfloat queues a Redis INCRBYFLOAT command for later execution.
func (*MultiCall) Info ¶ added in v0.2.1
func (mc *MultiCall) Info(args ...interface{})
Info queues a Redis INFO command for later execution.
func (*MultiCall) Keys ¶ added in v0.2.1
func (mc *MultiCall) Keys(args ...interface{})
Keys queues a Redis KEYS command for later execution.
func (*MultiCall) Lastsave ¶ added in v0.2.1
func (mc *MultiCall) Lastsave(args ...interface{})
Lastsave queues a Redis LASTSAVE command for later execution.
func (*MultiCall) Lindex ¶ added in v0.2.1
func (mc *MultiCall) Lindex(args ...interface{})
Lindex queues a Redis LINDEX command for later execution.
func (*MultiCall) Linsert ¶ added in v0.2.1
func (mc *MultiCall) Linsert(args ...interface{})
Linsert queues a Redis LINSERT command for later execution.
func (*MultiCall) Llen ¶ added in v0.2.1
func (mc *MultiCall) Llen(args ...interface{})
Llen queues a Redis LLEN command for later execution.
func (*MultiCall) Lpop ¶ added in v0.2.1
func (mc *MultiCall) Lpop(args ...interface{})
Lpop queues a Redis LPOP command for later execution.
func (*MultiCall) Lpush ¶ added in v0.2.1
func (mc *MultiCall) Lpush(args ...interface{})
Lpush queues a Redis LPUSH command for later execution.
func (*MultiCall) Lpushx ¶ added in v0.2.1
func (mc *MultiCall) Lpushx(args ...interface{})
Lpushx queues a Redis LPUSHX command for later execution.
func (*MultiCall) Lrange ¶ added in v0.2.1
func (mc *MultiCall) Lrange(args ...interface{})
Lrange queues a Redis LRANGE command for later execution.
func (*MultiCall) Lrem ¶ added in v0.2.1
func (mc *MultiCall) Lrem(args ...interface{})
Lrem queues a Redis LREM command for later execution.
func (*MultiCall) Lset ¶ added in v0.2.1
func (mc *MultiCall) Lset(args ...interface{})
Lset queues a Redis LSET command for later execution.
func (*MultiCall) Ltrim ¶ added in v0.2.1
func (mc *MultiCall) Ltrim(args ...interface{})
Ltrim queues a Redis LTRIM command for later execution.
func (*MultiCall) Mget ¶ added in v0.2.1
func (mc *MultiCall) Mget(args ...interface{})
Mget queues a Redis MGET command for later execution.
func (*MultiCall) Migrate ¶ added in v0.2.1
func (mc *MultiCall) Migrate(args ...interface{})
Migrate queues a Redis MIGRATE command for later execution.
func (*MultiCall) Monitor ¶ added in v0.2.1
func (mc *MultiCall) Monitor(args ...interface{})
Monitor queues a Redis MONITOR command for later execution.
func (*MultiCall) Move ¶ added in v0.2.1
func (mc *MultiCall) Move(args ...interface{})
Move queues a Redis MOVE command for later execution.
func (*MultiCall) Mset ¶ added in v0.2.1
func (mc *MultiCall) Mset(args ...interface{})
Mset queues a Redis MSET command for later execution.
func (*MultiCall) Msetnx ¶ added in v0.2.1
func (mc *MultiCall) Msetnx(args ...interface{})
Msetnx queues a Redis MSETNX command for later execution.
func (*MultiCall) Multi ¶ added in v0.2.1
func (mc *MultiCall) Multi(args ...interface{})
Multi queues a Redis MULTI command for later execution.
func (*MultiCall) Object ¶ added in v0.2.1
func (mc *MultiCall) Object(args ...interface{})
Object queues a Redis OBJECT command for later execution.
func (*MultiCall) Persist ¶ added in v0.2.1
func (mc *MultiCall) Persist(args ...interface{})
Persist queues a Redis PERSIST command for later execution.
func (*MultiCall) Pexpire ¶ added in v0.2.1
func (mc *MultiCall) Pexpire(args ...interface{})
Pexpire queues a Redis PEXPIRE command for later execution.
func (*MultiCall) Pexpireat ¶ added in v0.2.1
func (mc *MultiCall) Pexpireat(args ...interface{})
Pexpireat queues a Redis PEXPIREAT command for later execution.
func (*MultiCall) Ping ¶ added in v0.2.1
func (mc *MultiCall) Ping(args ...interface{})
Ping queues a Redis PING command for later execution.
func (*MultiCall) Psetex ¶ added in v0.2.1
func (mc *MultiCall) Psetex(args ...interface{})
Psetex queues a Redis PSETEX command for later execution.
func (*MultiCall) Psubscribe ¶ added in v0.2.1
func (mc *MultiCall) Psubscribe(args ...interface{})
Psubscribe queues a Redis PSUBSCRIBE command for later execution.
func (*MultiCall) Pttl ¶ added in v0.2.1
func (mc *MultiCall) Pttl(args ...interface{})
Pttl queues a Redis PTTL command for later execution.
func (*MultiCall) Publish ¶ added in v0.2.1
func (mc *MultiCall) Publish(args ...interface{})
Publish queues a Redis PUBLISH command for later execution.
func (*MultiCall) Punsubscribe ¶ added in v0.2.1
func (mc *MultiCall) Punsubscribe(args ...interface{})
Punsubscribe queues a Redis PUNSUBSCRIBE command for later execution.
func (*MultiCall) Randomkey ¶ added in v0.2.1
func (mc *MultiCall) Randomkey(args ...interface{})
Randomkey queues a Redis RANDOMKEY command for later execution.
func (*MultiCall) Rename ¶ added in v0.2.1
func (mc *MultiCall) Rename(args ...interface{})
Rename queues a Redis RENAME command for later execution.
func (*MultiCall) Renamenx ¶ added in v0.2.1
func (mc *MultiCall) Renamenx(args ...interface{})
Renamenx queues a Redis RENAMENX command for later execution.
func (*MultiCall) Replconf ¶ added in v0.3.0
func (mc *MultiCall) Replconf(args ...interface{})
Replconf queues a Redis REPLCONF command for later execution.
func (*MultiCall) Restore ¶ added in v0.2.1
func (mc *MultiCall) Restore(args ...interface{})
Restore queues a Redis RESTORE command for later execution.
func (*MultiCall) Rpop ¶ added in v0.2.1
func (mc *MultiCall) Rpop(args ...interface{})
Rpop queues a Redis RPOP command for later execution.
func (*MultiCall) Rpoplpush ¶ added in v0.2.1
func (mc *MultiCall) Rpoplpush(args ...interface{})
Rpoplpush queues a Redis RPOPLPUSH command for later execution.
func (*MultiCall) Rpush ¶ added in v0.2.1
func (mc *MultiCall) Rpush(args ...interface{})
Rpush queues a Redis RPUSH command for later execution.
func (*MultiCall) Rpushx ¶ added in v0.2.1
func (mc *MultiCall) Rpushx(args ...interface{})
Rpushx queues a Redis RPUSHX command for later execution.
func (*MultiCall) Sadd ¶ added in v0.2.1
func (mc *MultiCall) Sadd(args ...interface{})
Sadd queues a Redis SADD command for later execution.
func (*MultiCall) Save ¶ added in v0.2.1
func (mc *MultiCall) Save(args ...interface{})
Save queues a Redis SAVE command for later execution.
func (*MultiCall) Scard ¶ added in v0.2.1
func (mc *MultiCall) Scard(args ...interface{})
Scard queues a Redis SCARD command for later execution.
func (*MultiCall) Script ¶ added in v0.2.1
func (mc *MultiCall) Script(args ...interface{})
Script queues a Redis SCRIPT command for later execution.
func (*MultiCall) Sdiff ¶ added in v0.2.1
func (mc *MultiCall) Sdiff(args ...interface{})
Sdiff queues a Redis SDIFF command for later execution.
func (*MultiCall) Sdiffstore ¶ added in v0.2.1
func (mc *MultiCall) Sdiffstore(args ...interface{})
Sdiffstore queues a Redis SDIFFSTORE command for later execution.
func (*MultiCall) Select ¶ added in v0.2.1
func (mc *MultiCall) Select(args ...interface{})
Select queues a Redis SELECT command for later execution.
func (*MultiCall) Set ¶ added in v0.2.1
func (mc *MultiCall) Set(args ...interface{})
Set queues a Redis SET command for later execution.
func (*MultiCall) Setbit ¶ added in v0.2.1
func (mc *MultiCall) Setbit(args ...interface{})
Setbit queues a Redis SETBIT command for later execution.
func (*MultiCall) Setex ¶ added in v0.2.1
func (mc *MultiCall) Setex(args ...interface{})
Setex queues a Redis SETEX command for later execution.
func (*MultiCall) Setnx ¶ added in v0.2.1
func (mc *MultiCall) Setnx(args ...interface{})
Setnx queues a Redis SETNX command for later execution.
func (*MultiCall) Setrange ¶ added in v0.2.1
func (mc *MultiCall) Setrange(args ...interface{})
Setrange queues a Redis SETRANGE command for later execution.
func (*MultiCall) Shutdown ¶ added in v0.2.1
func (mc *MultiCall) Shutdown(args ...interface{})
Shutdown queues a Redis SHUTDOWN command for later execution.
func (*MultiCall) Sinter ¶ added in v0.2.1
func (mc *MultiCall) Sinter(args ...interface{})
Sinter queues a Redis SINTER command for later execution.
func (*MultiCall) Sinterstore ¶ added in v0.2.1
func (mc *MultiCall) Sinterstore(args ...interface{})
Sinterstore queues a Redis SINTERSTORE command for later execution.
func (*MultiCall) Sismember ¶ added in v0.2.1
func (mc *MultiCall) Sismember(args ...interface{})
Sismember queues a Redis SISMEMBER command for later execution.
func (*MultiCall) Slaveof ¶ added in v0.2.1
func (mc *MultiCall) Slaveof(args ...interface{})
Slaveof queues a Redis SLAVEOF command for later execution.
func (*MultiCall) Smembers ¶ added in v0.2.1
func (mc *MultiCall) Smembers(args ...interface{})
Smembers queues a Redis SMEMBERS command for later execution.
func (*MultiCall) Smove ¶ added in v0.2.1
func (mc *MultiCall) Smove(args ...interface{})
Smove queues a Redis SMOVE command for later execution.
func (*MultiCall) Sort ¶ added in v0.2.1
func (mc *MultiCall) Sort(args ...interface{})
Sort queues a Redis SORT command for later execution.
func (*MultiCall) Spop ¶ added in v0.2.1
func (mc *MultiCall) Spop(args ...interface{})
Spop queues a Redis SPOP command for later execution.
func (*MultiCall) Srandmember ¶ added in v0.2.1
func (mc *MultiCall) Srandmember(args ...interface{})
Srandmember queues a Redis SRANDMEMBER command for later execution.
func (*MultiCall) Srem ¶ added in v0.2.1
func (mc *MultiCall) Srem(args ...interface{})
Srem queues a Redis SREM command for later execution.
func (*MultiCall) Strlen ¶ added in v0.2.1
func (mc *MultiCall) Strlen(args ...interface{})
Strlen queues a Redis STRLEN command for later execution.
func (*MultiCall) Subscribe ¶ added in v0.2.1
func (mc *MultiCall) Subscribe(args ...interface{})
Subscribe queues a Redis SUBSCRIBE command for later execution.
func (*MultiCall) Sunion ¶ added in v0.2.1
func (mc *MultiCall) Sunion(args ...interface{})
Sunion queues a Redis SUNION command for later execution.
func (*MultiCall) Sunionstore ¶ added in v0.2.1
func (mc *MultiCall) Sunionstore(args ...interface{})
Sunionstore queues a Redis SUNIONSTORE command for later execution.
func (*MultiCall) Sync ¶ added in v0.2.1
func (mc *MultiCall) Sync(args ...interface{})
Sync queues a Redis SYNC command for later execution.
func (*MultiCall) Time ¶ added in v0.2.1
func (mc *MultiCall) Time(args ...interface{})
Time queues a Redis TIME command for later execution.
func (*MultiCall) Ttl ¶ added in v0.2.1
func (mc *MultiCall) Ttl(args ...interface{})
Ttl queues a Redis TTL command for later execution.
func (*MultiCall) Type ¶ added in v0.2.1
func (mc *MultiCall) Type(args ...interface{})
Type queues a Redis TYPE command for later execution.
func (*MultiCall) Unsubscribe ¶ added in v0.2.1
func (mc *MultiCall) Unsubscribe(args ...interface{})
Unsubscribe queues a Redis UNSUBSCRIBE command for later execution.
func (*MultiCall) Unwatch ¶ added in v0.2.1
func (mc *MultiCall) Unwatch(args ...interface{})
Unwatch queues a Redis UNWATCH command for later execution.
func (*MultiCall) Watch ¶ added in v0.2.1
func (mc *MultiCall) Watch(args ...interface{})
Watch queues a Redis WATCH command for later execution.
func (*MultiCall) Zadd ¶ added in v0.2.1
func (mc *MultiCall) Zadd(args ...interface{})
Zadd queues a Redis ZADD command for later execution.
func (*MultiCall) Zcard ¶ added in v0.2.1
func (mc *MultiCall) Zcard(args ...interface{})
Zcard queues a Redis ZCARD command for later execution.
func (*MultiCall) Zcount ¶ added in v0.2.1
func (mc *MultiCall) Zcount(args ...interface{})
Zcount queues a Redis ZCOUNT command for later execution.
func (*MultiCall) Zincrby ¶ added in v0.2.1
func (mc *MultiCall) Zincrby(args ...interface{})
Zincrby queues a Redis ZINCRBY command for later execution.
func (*MultiCall) Zinterstore ¶ added in v0.2.1
func (mc *MultiCall) Zinterstore(args ...interface{})
Zinterstore queues a Redis ZINTERSTORE command for later execution.
func (*MultiCall) Zrange ¶ added in v0.2.1
func (mc *MultiCall) Zrange(args ...interface{})
Zrange queues a Redis ZRANGE command for later execution.
func (*MultiCall) Zrangebyscore ¶ added in v0.2.1
func (mc *MultiCall) Zrangebyscore(args ...interface{})
Zrangebyscore queues a Redis ZRANGEBYSCORE command for later execution.
func (*MultiCall) Zrank ¶ added in v0.2.1
func (mc *MultiCall) Zrank(args ...interface{})
Zrank queues a Redis ZRANK command for later execution.
func (*MultiCall) Zrem ¶ added in v0.2.1
func (mc *MultiCall) Zrem(args ...interface{})
Zrem queues a Redis ZREM command for later execution.
func (*MultiCall) Zremrangebyrank ¶ added in v0.2.1
func (mc *MultiCall) Zremrangebyrank(args ...interface{})
Zremrangebyrank queues a Redis ZREMRANGEBYRANK command for later execution.
func (*MultiCall) Zremrangebyscore ¶ added in v0.2.1
func (mc *MultiCall) Zremrangebyscore(args ...interface{})
Zremrangebyscore queues a Redis ZREMRANGEBYSCORE command for later execution.
func (*MultiCall) Zrevrange ¶ added in v0.2.1
func (mc *MultiCall) Zrevrange(args ...interface{})
Zrevrange queues a Redis ZREVRANGE command for later execution.
func (*MultiCall) Zrevrangebyscore ¶ added in v0.2.1
func (mc *MultiCall) Zrevrangebyscore(args ...interface{})
Zrevrangebyscore queues a Redis ZREVRANGEBYSCORE command for later execution.
func (*MultiCall) Zrevrank ¶ added in v0.2.1
func (mc *MultiCall) Zrevrank(args ...interface{})
Zrevrank queues a Redis ZREVRANK command for later execution.
func (*MultiCall) Zscore ¶ added in v0.2.1
func (mc *MultiCall) Zscore(args ...interface{})
Zscore queues a Redis ZSCORE command for later execution.
func (*MultiCall) Zunionstore ¶ added in v0.2.1
func (mc *MultiCall) Zunionstore(args ...interface{})
Zunionstore queues a Redis ZUNIONSTORE command for later execution.
type Reply ¶
type Reply struct { Type ReplyType // Reply type Elems []*Reply // Sub-replies Err *Error // Reply error // contains filtered or unexported fields }
Reply holds a Redis reply.
func (*Reply) Bool ¶
Bool returns true, if the reply value equals to 1 or "1", otherwise false; or an error, if the reply type is not ReplyInteger or ReplyString.
func (*Reply) Bytes ¶
Bytes is a convenience method for calling Reply.Str() and converting it to []byte.
func (*Reply) Hash ¶ added in v0.3.0
Map returns a multi-bulk reply as a map[string]string or an error. The reply type must be ReplyMulti, it must have an even number of elements, they must be in a "key value key value..." order and values must all be either ReplyString or ReplyNil. Nil values are returned as empty strings. Useful for hash commands.
func (*Reply) Int64 ¶
Int64 returns the reply value as a int64 or an error, if the reply type is not ReplyInteger or the reply type ReplyString could not be parsed to an int64.
func (*Reply) List ¶ added in v0.3.0
List returns a multi-bulk reply as a slice of strings or an error. The reply type must be ReplyMulti and its elements' types must all be either ReplyString or ReplyNil. Nil elements are returned as empty strings. Useful for list commands.
type ReplyType ¶
type ReplyType uint8
ReplyType describes type of a reply.
Possbile values are:
ReplyStatus -- status reply ReplyError -- error reply ReplyInteger -- integer reply ReplyNil -- nil reply ReplyString -- string reply (bulk reply) ReplyMulti -- multi-bulk or multicall 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) Psubscribe ¶ added in v0.2.0
func (s *Subscription) Psubscribe(patterns ...string) (err *Error)
Psubscribe subscribes to given patterns or returns an error.
func (*Subscription) Punsubscribe ¶ added in v0.2.0
func (s *Subscription) Punsubscribe(patterns ...string) (err *Error)
Punsubscribe unsubscribes from given patterns or returns an error.
func (*Subscription) Subscribe ¶
func (s *Subscription) Subscribe(channels ...string) (err *Error)
Subscribe subscribes to given channels or returns an error.
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe(channels ...string) (err *Error)
Unsubscribe unsubscribes from given channels or returns an error.