redis

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2012 License: MIT Imports: 13 Imported by: 1

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

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 Config) *Client

NewClient creates a new Client.

func (*Client) Append added in v0.2.0

func (c *Client) Append(args ...interface{}) *Reply

Append calls Redis APPEND command.

func (*Client) Asking added in v0.2.0

func (c *Client) Asking(args ...interface{}) *Reply

Asking calls Redis ASKING command.

func (*Client) AsyncAppend added in v0.2.0

func (c *Client) AsyncAppend(args ...interface{}) Future

AsyncAppend calls Redis APPEND asynchronously.

func (*Client) AsyncAsking added in v0.2.0

func (c *Client) AsyncAsking(args ...interface{}) Future

AsyncAsking calls Redis ASKING asynchronously.

func (*Client) AsyncAuth added in v0.2.0

func (c *Client) AsyncAuth(args ...interface{}) Future

AsyncAuth calls Redis AUTH asynchronously.

func (*Client) AsyncBgrewriteaof added in v0.2.0

func (c *Client) AsyncBgrewriteaof(args ...interface{}) Future

AsyncBgrewriteaof calls Redis BGREWRITEAOF asynchronously.

func (*Client) AsyncBgsave added in v0.2.0

func (c *Client) AsyncBgsave(args ...interface{}) Future

AsyncBgsave calls Redis BGSAVE asynchronously.

func (*Client) AsyncBitcount added in v0.3.0

func (c *Client) AsyncBitcount(args ...interface{}) Future

AsyncBitcount calls Redis BITCOUNT asynchronously.

func (*Client) AsyncBitop added in v0.3.0

func (c *Client) AsyncBitop(args ...interface{}) Future

AsyncBitop calls Redis BITOP asynchronously.

func (*Client) AsyncBlpop added in v0.2.0

func (c *Client) AsyncBlpop(args ...interface{}) Future

AsyncBlpop calls Redis BLPOP asynchronously.

func (*Client) AsyncBrpop added in v0.2.0

func (c *Client) AsyncBrpop(args ...interface{}) Future

AsyncBrpop calls Redis BRPOP asynchronously.

func (*Client) AsyncBrpoplpush added in v0.2.0

func (c *Client) AsyncBrpoplpush(args ...interface{}) Future

AsyncBrpoplpush calls Redis BRPOPLPUSH asynchronously.

func (*Client) AsyncCall added in v0.2.1

func (c *Client) AsyncCall(cmd string, args ...interface{}) Future

AsyncCall calls the given Redis command asynchronously.

func (*Client) AsyncClient added in v0.2.0

func (c *Client) AsyncClient(args ...interface{}) Future

AsyncClient calls Redis CLIENT asynchronously.

func (*Client) AsyncCluster added in v0.2.0

func (c *Client) AsyncCluster(args ...interface{}) Future

AsyncCluster calls Redis CLUSTER asynchronously.

func (*Client) AsyncConfig added in v0.2.0

func (c *Client) AsyncConfig(args ...interface{}) Future

AsyncConfig calls Redis CONFIG asynchronously.

func (*Client) AsyncDbsize added in v0.2.0

func (c *Client) AsyncDbsize(args ...interface{}) Future

AsyncDbsize calls Redis DBSIZE asynchronously.

func (*Client) AsyncDebug added in v0.2.0

func (c *Client) AsyncDebug(args ...interface{}) Future

AsyncDebug calls Redis DEBUG asynchronously.

func (*Client) AsyncDecr added in v0.2.0

func (c *Client) AsyncDecr(args ...interface{}) Future

AsyncDecr calls Redis DECR asynchronously.

func (*Client) AsyncDecrby added in v0.2.0

func (c *Client) AsyncDecrby(args ...interface{}) Future

AsyncDecrby calls Redis DECRBY asynchronously.

func (*Client) AsyncDel added in v0.2.0

func (c *Client) AsyncDel(args ...interface{}) Future

AsyncDel calls Redis DEL asynchronously.

func (*Client) AsyncDiscard added in v0.2.0

func (c *Client) AsyncDiscard(args ...interface{}) Future

AsyncDiscard calls Redis DISCARD asynchronously.

func (*Client) AsyncDump added in v0.2.0

func (c *Client) AsyncDump(args ...interface{}) Future

AsyncDump calls Redis DUMP asynchronously.

func (*Client) AsyncEcho added in v0.2.0

func (c *Client) AsyncEcho(args ...interface{}) Future

AsyncEcho calls Redis ECHO asynchronously.

func (*Client) AsyncEval added in v0.2.0

func (c *Client) AsyncEval(args ...interface{}) Future

AsyncEval calls Redis EVAL asynchronously.

func (*Client) AsyncExec added in v0.2.0

func (c *Client) AsyncExec(args ...interface{}) Future

AsyncExec calls Redis EXEC asynchronously.

func (*Client) AsyncExists added in v0.2.0

func (c *Client) AsyncExists(args ...interface{}) Future

AsyncExists calls Redis EXISTS asynchronously.

func (*Client) AsyncExpire added in v0.2.0

func (c *Client) AsyncExpire(args ...interface{}) Future

AsyncExpire calls Redis EXPIRE asynchronously.

func (*Client) AsyncExpireat added in v0.2.0

func (c *Client) AsyncExpireat(args ...interface{}) Future

AsyncExpireat calls Redis EXPIREAT asynchronously.

func (*Client) AsyncFlushall added in v0.2.0

func (c *Client) AsyncFlushall(args ...interface{}) Future

AsyncFlushall calls Redis FLUSHALL asynchronously.

func (*Client) AsyncFlushdb added in v0.2.0

func (c *Client) AsyncFlushdb(args ...interface{}) Future

AsyncFlushdb calls Redis FLUSHDB asynchronously.

func (*Client) AsyncGet added in v0.2.0

func (c *Client) AsyncGet(args ...interface{}) Future

AsyncGet calls Redis GET asynchronously.

func (*Client) AsyncGetbit added in v0.2.0

func (c *Client) AsyncGetbit(args ...interface{}) Future

AsyncGetbit calls Redis GETBIT asynchronously.

func (*Client) AsyncGetrange added in v0.2.0

func (c *Client) AsyncGetrange(args ...interface{}) Future

AsyncGetrange calls Redis GETRANGE asynchronously.

func (*Client) AsyncGetset added in v0.2.0

func (c *Client) AsyncGetset(args ...interface{}) Future

AsyncGetset calls Redis GETSET asynchronously.

func (*Client) AsyncHdel added in v0.2.0

func (c *Client) AsyncHdel(args ...interface{}) Future

AsyncHdel calls Redis HDEL asynchronously.

func (*Client) AsyncHexists added in v0.2.0

func (c *Client) AsyncHexists(args ...interface{}) Future

AsyncHexists calls Redis HEXISTS asynchronously.

func (*Client) AsyncHget added in v0.2.0

func (c *Client) AsyncHget(args ...interface{}) Future

AsyncHget calls Redis HGET asynchronously.

func (*Client) AsyncHgetall added in v0.2.0

func (c *Client) AsyncHgetall(args ...interface{}) Future

AsyncHgetall calls Redis HGETALL asynchronously.

func (*Client) AsyncHincrby added in v0.2.0

func (c *Client) AsyncHincrby(args ...interface{}) Future

AsyncHincrby calls Redis HINCRBY asynchronously.

func (*Client) AsyncHincrbyfloat added in v0.2.0

func (c *Client) AsyncHincrbyfloat(args ...interface{}) Future

AsyncHincrbyfloat calls Redis HINCRBYFLOAT asynchronously.

func (*Client) AsyncHkeys added in v0.2.0

func (c *Client) AsyncHkeys(args ...interface{}) Future

AsyncHkeys calls Redis HKEYS asynchronously.

func (*Client) AsyncHlen added in v0.2.0

func (c *Client) AsyncHlen(args ...interface{}) Future

AsyncHlen calls Redis HLEN asynchronously.

func (*Client) AsyncHmget added in v0.2.0

func (c *Client) AsyncHmget(args ...interface{}) Future

AsyncHmget calls Redis HMGET asynchronously.

func (*Client) AsyncHmset added in v0.2.0

func (c *Client) AsyncHmset(args ...interface{}) Future

AsyncHmset calls Redis HMSET asynchronously.

func (*Client) AsyncHset added in v0.2.0

func (c *Client) AsyncHset(args ...interface{}) Future

AsyncHset calls Redis HSET asynchronously.

func (*Client) AsyncHsetnx added in v0.2.0

func (c *Client) AsyncHsetnx(args ...interface{}) Future

AsyncHsetnx calls Redis HSETNX asynchronously.

func (*Client) AsyncHvals added in v0.2.0

func (c *Client) AsyncHvals(args ...interface{}) Future

AsyncHvals calls Redis HVALS asynchronously.

func (*Client) AsyncIncr added in v0.2.0

func (c *Client) AsyncIncr(args ...interface{}) Future

AsyncIncr calls Redis INCR asynchronously.

func (*Client) AsyncIncrby added in v0.2.0

func (c *Client) AsyncIncrby(args ...interface{}) Future

AsyncIncrby calls Redis INCRBY asynchronously.

func (*Client) AsyncIncrbyfloat added in v0.2.0

func (c *Client) AsyncIncrbyfloat(args ...interface{}) Future

AsyncIncrbyfloat calls Redis INCRBYFLOAT asynchronously.

func (*Client) AsyncInfo added in v0.2.0

func (c *Client) AsyncInfo(args ...interface{}) Future

AsyncInfo calls Redis INFO asynchronously.

func (*Client) AsyncKeys added in v0.2.0

func (c *Client) AsyncKeys(args ...interface{}) Future

AsyncKeys calls Redis KEYS asynchronously.

func (*Client) AsyncLastsave added in v0.2.0

func (c *Client) AsyncLastsave(args ...interface{}) Future

AsyncLastsave calls Redis LASTSAVE asynchronously.

func (*Client) AsyncLindex added in v0.2.0

func (c *Client) AsyncLindex(args ...interface{}) Future

AsyncLindex calls Redis LINDEX asynchronously.

func (*Client) AsyncLinsert added in v0.2.0

func (c *Client) AsyncLinsert(args ...interface{}) Future

AsyncLinsert calls Redis LINSERT asynchronously.

func (*Client) AsyncLlen added in v0.2.0

func (c *Client) AsyncLlen(args ...interface{}) Future

AsyncLlen calls Redis LLEN asynchronously.

func (*Client) AsyncLpop added in v0.2.0

func (c *Client) AsyncLpop(args ...interface{}) Future

AsyncLpop calls Redis LPOP asynchronously.

func (*Client) AsyncLpush added in v0.2.0

func (c *Client) AsyncLpush(args ...interface{}) Future

AsyncLpush calls Redis LPUSH asynchronously.

func (*Client) AsyncLpushx added in v0.2.0

func (c *Client) AsyncLpushx(args ...interface{}) Future

AsyncLpushx calls Redis LPUSHX asynchronously.

func (*Client) AsyncLrange added in v0.2.0

func (c *Client) AsyncLrange(args ...interface{}) Future

AsyncLrange calls Redis LRANGE asynchronously.

func (*Client) AsyncLrem added in v0.2.0

func (c *Client) AsyncLrem(args ...interface{}) Future

AsyncLrem calls Redis LREM asynchronously.

func (*Client) AsyncLset added in v0.2.0

func (c *Client) AsyncLset(args ...interface{}) Future

AsyncLset calls Redis LSET asynchronously.

func (*Client) AsyncLtrim added in v0.2.0

func (c *Client) AsyncLtrim(args ...interface{}) Future

AsyncLtrim calls Redis LTRIM asynchronously.

func (*Client) AsyncMget added in v0.2.0

func (c *Client) AsyncMget(args ...interface{}) Future

AsyncMget calls Redis MGET asynchronously.

func (*Client) AsyncMigrate added in v0.2.0

func (c *Client) AsyncMigrate(args ...interface{}) Future

AsyncMigrate calls Redis MIGRATE asynchronously.

func (*Client) AsyncMonitor added in v0.2.0

func (c *Client) AsyncMonitor(args ...interface{}) Future

AsyncMonitor calls Redis MONITOR asynchronously.

func (*Client) AsyncMove added in v0.2.0

func (c *Client) AsyncMove(args ...interface{}) Future

AsyncMove calls Redis MOVE asynchronously.

func (*Client) AsyncMset added in v0.2.0

func (c *Client) AsyncMset(args ...interface{}) Future

AsyncMset calls Redis MSET asynchronously.

func (*Client) AsyncMsetnx added in v0.2.0

func (c *Client) AsyncMsetnx(args ...interface{}) Future

AsyncMsetnx calls Redis MSETNX asynchronously.

func (*Client) AsyncMulti added in v0.2.0

func (c *Client) AsyncMulti(args ...interface{}) Future

AsyncMulti calls Redis MULTI asynchronously.

func (*Client) AsyncMultiCall added in v0.2.1

func (c *Client) AsyncMultiCall(mc func(*MultiCall)) Future

AsyncMultiCall calls an asynchronous MultiCall.

func (*Client) AsyncObject added in v0.2.0

func (c *Client) AsyncObject(args ...interface{}) Future

AsyncObject calls Redis OBJECT asynchronously.

func (*Client) AsyncPersist added in v0.2.0

func (c *Client) AsyncPersist(args ...interface{}) Future

AsyncPersist calls Redis PERSIST asynchronously.

func (*Client) AsyncPexpire added in v0.2.0

func (c *Client) AsyncPexpire(args ...interface{}) Future

AsyncPexpire calls Redis PEXPIRE asynchronously.

func (*Client) AsyncPexpireat added in v0.2.0

func (c *Client) AsyncPexpireat(args ...interface{}) Future

AsyncPexpireat calls Redis PEXPIREAT asynchronously.

func (*Client) AsyncPing added in v0.2.0

func (c *Client) AsyncPing(args ...interface{}) Future

AsyncPing calls Redis PING asynchronously.

func (*Client) AsyncPsetex added in v0.2.0

func (c *Client) AsyncPsetex(args ...interface{}) Future

AsyncPsetex calls Redis PSETEX asynchronously.

func (*Client) AsyncPsubscribe added in v0.2.0

func (c *Client) AsyncPsubscribe(args ...interface{}) Future

AsyncPsubscribe calls Redis PSUBSCRIBE asynchronously.

func (*Client) AsyncPttl added in v0.2.0

func (c *Client) AsyncPttl(args ...interface{}) Future

AsyncPttl calls Redis PTTL asynchronously.

func (*Client) AsyncPublish added in v0.2.0

func (c *Client) AsyncPublish(args ...interface{}) Future

AsyncPublish calls Redis PUBLISH asynchronously.

func (*Client) AsyncPunsubscribe added in v0.2.0

func (c *Client) AsyncPunsubscribe(args ...interface{}) Future

AsyncPunsubscribe calls Redis PUNSUBSCRIBE asynchronously.

func (*Client) AsyncRandomkey added in v0.2.0

func (c *Client) AsyncRandomkey(args ...interface{}) Future

AsyncRandomkey calls Redis RANDOMKEY asynchronously.

func (*Client) AsyncRename added in v0.2.0

func (c *Client) AsyncRename(args ...interface{}) Future

AsyncRename calls Redis RENAME asynchronously.

func (*Client) AsyncRenamenx added in v0.2.0

func (c *Client) AsyncRenamenx(args ...interface{}) Future

AsyncRenamenx calls Redis RENAMENX asynchronously.

func (*Client) AsyncReplconf added in v0.3.0

func (c *Client) AsyncReplconf(args ...interface{}) Future

AsyncReplconf calls Redis REPLCONF asynchronously.

func (*Client) AsyncRestore added in v0.2.0

func (c *Client) AsyncRestore(args ...interface{}) Future

AsyncRestore calls Redis RESTORE asynchronously.

func (*Client) AsyncRpop added in v0.2.0

func (c *Client) AsyncRpop(args ...interface{}) Future

AsyncRpop calls Redis RPOP asynchronously.

func (*Client) AsyncRpoplpush added in v0.2.0

func (c *Client) AsyncRpoplpush(args ...interface{}) Future

AsyncRpoplpush calls Redis RPOPLPUSH asynchronously.

func (*Client) AsyncRpush added in v0.2.0

func (c *Client) AsyncRpush(args ...interface{}) Future

AsyncRpush calls Redis RPUSH asynchronously.

func (*Client) AsyncRpushx added in v0.2.0

func (c *Client) AsyncRpushx(args ...interface{}) Future

AsyncRpushx calls Redis RPUSHX asynchronously.

func (*Client) AsyncSadd added in v0.2.0

func (c *Client) AsyncSadd(args ...interface{}) Future

AsyncSadd calls Redis SADD asynchronously.

func (*Client) AsyncSave added in v0.2.0

func (c *Client) AsyncSave(args ...interface{}) Future

AsyncSave calls Redis SAVE asynchronously.

func (*Client) AsyncScard added in v0.2.0

func (c *Client) AsyncScard(args ...interface{}) Future

AsyncScard calls Redis SCARD asynchronously.

func (*Client) AsyncScript added in v0.2.0

func (c *Client) AsyncScript(args ...interface{}) Future

AsyncScript calls Redis SCRIPT asynchronously.

func (*Client) AsyncSdiff added in v0.2.0

func (c *Client) AsyncSdiff(args ...interface{}) Future

AsyncSdiff calls Redis SDIFF asynchronously.

func (*Client) AsyncSdiffstore added in v0.2.0

func (c *Client) AsyncSdiffstore(args ...interface{}) Future

AsyncSdiffstore calls Redis SDIFFSTORE asynchronously.

func (*Client) AsyncSelect added in v0.2.0

func (c *Client) AsyncSelect(args ...interface{}) Future

AsyncSelect calls Redis SELECT asynchronously.

func (*Client) AsyncSet added in v0.2.0

func (c *Client) AsyncSet(args ...interface{}) Future

AsyncSet calls Redis SET asynchronously.

func (*Client) AsyncSetbit added in v0.2.0

func (c *Client) AsyncSetbit(args ...interface{}) Future

AsyncSetbit calls Redis SETBIT asynchronously.

func (*Client) AsyncSetex added in v0.2.0

func (c *Client) AsyncSetex(args ...interface{}) Future

AsyncSetex calls Redis SETEX asynchronously.

func (*Client) AsyncSetnx added in v0.2.0

func (c *Client) AsyncSetnx(args ...interface{}) Future

AsyncSetnx calls Redis SETNX asynchronously.

func (*Client) AsyncSetrange added in v0.2.0

func (c *Client) AsyncSetrange(args ...interface{}) Future

AsyncSetrange calls Redis SETRANGE asynchronously.

func (*Client) AsyncShutdown added in v0.2.0

func (c *Client) AsyncShutdown(args ...interface{}) Future

AsyncShutdown calls Redis SHUTDOWN asynchronously.

func (*Client) AsyncSinter added in v0.2.0

func (c *Client) AsyncSinter(args ...interface{}) Future

AsyncSinter calls Redis SINTER asynchronously.

func (*Client) AsyncSinterstore added in v0.2.0

func (c *Client) AsyncSinterstore(args ...interface{}) Future

AsyncSinterstore calls Redis SINTERSTORE asynchronously.

func (*Client) AsyncSismember added in v0.2.0

func (c *Client) AsyncSismember(args ...interface{}) Future

AsyncSismember calls Redis SISMEMBER asynchronously.

func (*Client) AsyncSlaveof added in v0.2.0

func (c *Client) AsyncSlaveof(args ...interface{}) Future

AsyncSlaveof calls Redis SLAVEOF asynchronously.

func (*Client) AsyncSmembers added in v0.2.0

func (c *Client) AsyncSmembers(args ...interface{}) Future

AsyncSmembers calls Redis SMEMBERS asynchronously.

func (*Client) AsyncSmove added in v0.2.0

func (c *Client) AsyncSmove(args ...interface{}) Future

AsyncSmove calls Redis SMOVE asynchronously.

func (*Client) AsyncSort added in v0.2.0

func (c *Client) AsyncSort(args ...interface{}) Future

AsyncSort calls Redis SORT asynchronously.

func (*Client) AsyncSpop added in v0.2.0

func (c *Client) AsyncSpop(args ...interface{}) Future

AsyncSpop calls Redis SPOP asynchronously.

func (*Client) AsyncSrandmember added in v0.2.0

func (c *Client) AsyncSrandmember(args ...interface{}) Future

AsyncSrandmember calls Redis SRANDMEMBER asynchronously.

func (*Client) AsyncSrem added in v0.2.0

func (c *Client) AsyncSrem(args ...interface{}) Future

AsyncSrem calls Redis SREM asynchronously.

func (*Client) AsyncStrlen added in v0.2.0

func (c *Client) AsyncStrlen(args ...interface{}) Future

AsyncStrlen calls Redis STRLEN asynchronously.

func (*Client) AsyncSubscribe added in v0.2.0

func (c *Client) AsyncSubscribe(args ...interface{}) Future

AsyncSubscribe calls Redis SUBSCRIBE asynchronously.

func (*Client) AsyncSunion added in v0.2.0

func (c *Client) AsyncSunion(args ...interface{}) Future

AsyncSunion calls Redis SUNION asynchronously.

func (*Client) AsyncSunionstore added in v0.2.0

func (c *Client) AsyncSunionstore(args ...interface{}) Future

AsyncSunionstore calls Redis SUNIONSTORE asynchronously.

func (*Client) AsyncSync added in v0.2.0

func (c *Client) AsyncSync(args ...interface{}) Future

AsyncSync calls Redis SYNC asynchronously.

func (*Client) AsyncTime added in v0.2.0

func (c *Client) AsyncTime(args ...interface{}) Future

AsyncTime calls Redis TIME asynchronously.

func (*Client) AsyncTransaction

func (c *Client) AsyncTransaction(mc func(*MultiCall)) Future

AsyncTransaction performs a simple asynchronous transaction.

func (*Client) AsyncTtl added in v0.2.0

func (c *Client) AsyncTtl(args ...interface{}) Future

AsyncTtl calls Redis TTL asynchronously.

func (*Client) AsyncType added in v0.2.0

func (c *Client) AsyncType(args ...interface{}) Future

AsyncType calls Redis TYPE asynchronously.

func (*Client) AsyncUnsubscribe added in v0.2.0

func (c *Client) AsyncUnsubscribe(args ...interface{}) Future

AsyncUnsubscribe calls Redis UNSUBSCRIBE asynchronously.

func (*Client) AsyncUnwatch added in v0.2.0

func (c *Client) AsyncUnwatch(args ...interface{}) Future

AsyncUnwatch calls Redis UNWATCH asynchronously.

func (*Client) AsyncWatch added in v0.2.0

func (c *Client) AsyncWatch(args ...interface{}) Future

AsyncWatch calls Redis WATCH asynchronously.

func (*Client) AsyncZadd added in v0.2.0

func (c *Client) AsyncZadd(args ...interface{}) Future

AsyncZadd calls Redis ZADD asynchronously.

func (*Client) AsyncZcard added in v0.2.0

func (c *Client) AsyncZcard(args ...interface{}) Future

AsyncZcard calls Redis ZCARD asynchronously.

func (*Client) AsyncZcount added in v0.2.0

func (c *Client) AsyncZcount(args ...interface{}) Future

AsyncZcount calls Redis ZCOUNT asynchronously.

func (*Client) AsyncZincrby added in v0.2.0

func (c *Client) AsyncZincrby(args ...interface{}) Future

AsyncZincrby calls Redis ZINCRBY asynchronously.

func (*Client) AsyncZinterstore added in v0.2.0

func (c *Client) AsyncZinterstore(args ...interface{}) Future

AsyncZinterstore calls Redis ZINTERSTORE asynchronously.

func (*Client) AsyncZrange added in v0.2.0

func (c *Client) AsyncZrange(args ...interface{}) Future

AsyncZrange calls Redis ZRANGE asynchronously.

func (*Client) AsyncZrangebyscore added in v0.2.0

func (c *Client) AsyncZrangebyscore(args ...interface{}) Future

AsyncZrangebyscore calls Redis ZRANGEBYSCORE asynchronously.

func (*Client) AsyncZrank added in v0.2.0

func (c *Client) AsyncZrank(args ...interface{}) Future

AsyncZrank calls Redis ZRANK asynchronously.

func (*Client) AsyncZrem added in v0.2.0

func (c *Client) AsyncZrem(args ...interface{}) Future

AsyncZrem calls Redis ZREM asynchronously.

func (*Client) AsyncZremrangebyrank added in v0.2.0

func (c *Client) AsyncZremrangebyrank(args ...interface{}) Future

AsyncZremrangebyrank calls Redis ZREMRANGEBYRANK asynchronously.

func (*Client) AsyncZremrangebyscore added in v0.2.0

func (c *Client) AsyncZremrangebyscore(args ...interface{}) Future

AsyncZremrangebyscore calls Redis ZREMRANGEBYSCORE asynchronously.

func (*Client) AsyncZrevrange added in v0.2.0

func (c *Client) AsyncZrevrange(args ...interface{}) Future

AsyncZrevrange calls Redis ZREVRANGE asynchronously.

func (*Client) AsyncZrevrangebyscore added in v0.2.0

func (c *Client) AsyncZrevrangebyscore(args ...interface{}) Future

AsyncZrevrangebyscore calls Redis ZREVRANGEBYSCORE asynchronously.

func (*Client) AsyncZrevrank added in v0.2.0

func (c *Client) AsyncZrevrank(args ...interface{}) Future

AsyncZrevrank calls Redis ZREVRANK asynchronously.

func (*Client) AsyncZscore added in v0.2.0

func (c *Client) AsyncZscore(args ...interface{}) Future

AsyncZscore calls Redis ZSCORE asynchronously.

func (*Client) AsyncZunionstore added in v0.2.0

func (c *Client) AsyncZunionstore(args ...interface{}) Future

AsyncZunionstore calls Redis ZUNIONSTORE asynchronously.

func (*Client) Auth added in v0.2.0

func (c *Client) Auth(args ...interface{}) *Reply

Auth calls Redis AUTH command.

func (*Client) Bgrewriteaof added in v0.2.0

func (c *Client) Bgrewriteaof(args ...interface{}) *Reply

Bgrewriteaof calls Redis BGREWRITEAOF command.

func (*Client) Bgsave added in v0.2.0

func (c *Client) Bgsave(args ...interface{}) *Reply

Bgsave calls Redis BGSAVE command.

func (*Client) Bitcount added in v0.3.0

func (c *Client) Bitcount(args ...interface{}) *Reply

Bitcount calls Redis BITCOUNT command.

func (*Client) Bitop added in v0.3.0

func (c *Client) Bitop(args ...interface{}) *Reply

Bitop calls Redis BITOP command.

func (*Client) Blpop added in v0.2.0

func (c *Client) Blpop(args ...interface{}) *Reply

Blpop calls Redis BLPOP command.

func (*Client) Brpop added in v0.2.0

func (c *Client) Brpop(args ...interface{}) *Reply

Brpop calls Redis BRPOP command.

func (*Client) Brpoplpush added in v0.2.0

func (c *Client) Brpoplpush(args ...interface{}) *Reply

Brpoplpush calls Redis BRPOPLPUSH command.

func (*Client) Call added in v0.2.1

func (c *Client) Call(cmd string, args ...interface{}) *Reply

Call calls the given Redis command.

func (*Client) Client added in v0.2.0

func (c *Client) Client(args ...interface{}) *Reply

Client calls Redis CLIENT command.

func (*Client) Close

func (c *Client) Close()

Close closes all connections of the client.

func (*Client) Cluster added in v0.2.0

func (c *Client) Cluster(args ...interface{}) *Reply

Cluster calls Redis CLUSTER command.

func (*Client) Config added in v0.2.0

func (c *Client) Config(args ...interface{}) *Reply

Config calls Redis CONFIG command.

func (*Client) Dbsize added in v0.2.0

func (c *Client) Dbsize(args ...interface{}) *Reply

Dbsize calls Redis DBSIZE command.

func (*Client) Debug added in v0.2.0

func (c *Client) Debug(args ...interface{}) *Reply

Debug calls Redis DEBUG command.

func (*Client) Decr added in v0.2.0

func (c *Client) Decr(args ...interface{}) *Reply

Decr calls Redis DECR command.

func (*Client) Decrby added in v0.2.0

func (c *Client) Decrby(args ...interface{}) *Reply

Decrby calls Redis DECRBY command.

func (*Client) Del added in v0.2.0

func (c *Client) Del(args ...interface{}) *Reply

Del calls Redis DEL command.

func (*Client) Discard added in v0.2.0

func (c *Client) Discard(args ...interface{}) *Reply

Discard calls Redis DISCARD command.

func (*Client) Dump added in v0.2.0

func (c *Client) Dump(args ...interface{}) *Reply

Dump calls Redis DUMP command.

func (*Client) Echo added in v0.2.0

func (c *Client) Echo(args ...interface{}) *Reply

Echo calls Redis ECHO command.

func (*Client) Eval added in v0.2.0

func (c *Client) Eval(args ...interface{}) *Reply

Eval calls Redis EVAL command.

func (*Client) Exec added in v0.2.0

func (c *Client) Exec(args ...interface{}) *Reply

Exec calls Redis EXEC command.

func (*Client) Exists added in v0.2.0

func (c *Client) Exists(args ...interface{}) *Reply

Exists calls Redis EXISTS command.

func (*Client) Expire added in v0.2.0

func (c *Client) Expire(args ...interface{}) *Reply

Expire calls Redis EXPIRE command.

func (*Client) Expireat added in v0.2.0

func (c *Client) Expireat(args ...interface{}) *Reply

Expireat calls Redis EXPIREAT command.

func (*Client) Flushall added in v0.2.0

func (c *Client) Flushall(args ...interface{}) *Reply

Flushall calls Redis FLUSHALL command.

func (*Client) Flushdb added in v0.2.0

func (c *Client) Flushdb(args ...interface{}) *Reply

Flushdb calls Redis FLUSHDB command.

func (*Client) Get added in v0.2.0

func (c *Client) Get(args ...interface{}) *Reply

Get calls Redis GET command.

func (*Client) Getbit added in v0.2.0

func (c *Client) Getbit(args ...interface{}) *Reply

Getbit calls Redis GETBIT command.

func (*Client) Getrange added in v0.2.0

func (c *Client) Getrange(args ...interface{}) *Reply

Getrange calls Redis GETRANGE command.

func (*Client) Getset added in v0.2.0

func (c *Client) Getset(args ...interface{}) *Reply

Getset calls Redis GETSET command.

func (*Client) Hdel added in v0.2.0

func (c *Client) Hdel(args ...interface{}) *Reply

Hdel calls Redis HDEL command.

func (*Client) Hexists added in v0.2.0

func (c *Client) Hexists(args ...interface{}) *Reply

Hexists calls Redis HEXISTS command.

func (*Client) Hget added in v0.2.0

func (c *Client) Hget(args ...interface{}) *Reply

Hget calls Redis HGET command.

func (*Client) Hgetall added in v0.2.0

func (c *Client) Hgetall(args ...interface{}) *Reply

Hgetall calls Redis HGETALL command.

func (*Client) Hincrby added in v0.2.0

func (c *Client) Hincrby(args ...interface{}) *Reply

Hincrby calls Redis HINCRBY command.

func (*Client) Hincrbyfloat added in v0.2.0

func (c *Client) Hincrbyfloat(args ...interface{}) *Reply

Hincrbyfloat calls Redis HINCRBYFLOAT command.

func (*Client) Hkeys added in v0.2.0

func (c *Client) Hkeys(args ...interface{}) *Reply

Hkeys calls Redis HKEYS command.

func (*Client) Hlen added in v0.2.0

func (c *Client) Hlen(args ...interface{}) *Reply

Hlen calls Redis HLEN command.

func (*Client) Hmget added in v0.2.0

func (c *Client) Hmget(args ...interface{}) *Reply

Hmget calls Redis HMGET command.

func (*Client) Hmset added in v0.2.0

func (c *Client) Hmset(args ...interface{}) *Reply

Hmset calls Redis HMSET command.

func (*Client) Hset added in v0.2.0

func (c *Client) Hset(args ...interface{}) *Reply

Hset calls Redis HSET command.

func (*Client) Hsetnx added in v0.2.0

func (c *Client) Hsetnx(args ...interface{}) *Reply

Hsetnx calls Redis HSETNX command.

func (*Client) Hvals added in v0.2.0

func (c *Client) Hvals(args ...interface{}) *Reply

Hvals calls Redis HVALS command.

func (*Client) Incr added in v0.2.0

func (c *Client) Incr(args ...interface{}) *Reply

Incr calls Redis INCR command.

func (*Client) Incrby added in v0.2.0

func (c *Client) Incrby(args ...interface{}) *Reply

Incrby calls Redis INCRBY command.

func (*Client) Incrbyfloat added in v0.2.0

func (c *Client) Incrbyfloat(args ...interface{}) *Reply

Incrbyfloat calls Redis INCRBYFLOAT command.

func (*Client) Info added in v0.2.0

func (c *Client) Info(args ...interface{}) *Reply

Info calls Redis INFO command.

func (*Client) InfoMap added in v0.3.0

func (c *Client) InfoMap() (map[string]string, error)

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) Keys added in v0.2.0

func (c *Client) Keys(args ...interface{}) *Reply

Keys calls Redis KEYS command.

func (*Client) Lastsave added in v0.2.0

func (c *Client) Lastsave(args ...interface{}) *Reply

Lastsave calls Redis LASTSAVE command.

func (*Client) Lindex added in v0.2.0

func (c *Client) Lindex(args ...interface{}) *Reply

Lindex calls Redis LINDEX command.

func (*Client) Linsert added in v0.2.0

func (c *Client) Linsert(args ...interface{}) *Reply

Linsert calls Redis LINSERT command.

func (*Client) Llen added in v0.2.0

func (c *Client) Llen(args ...interface{}) *Reply

Llen calls Redis LLEN command.

func (*Client) Lpop added in v0.2.0

func (c *Client) Lpop(args ...interface{}) *Reply

Lpop calls Redis LPOP command.

func (*Client) Lpush added in v0.2.0

func (c *Client) Lpush(args ...interface{}) *Reply

Lpush calls Redis LPUSH command.

func (*Client) Lpushx added in v0.2.0

func (c *Client) Lpushx(args ...interface{}) *Reply

Lpushx calls Redis LPUSHX command.

func (*Client) Lrange added in v0.2.0

func (c *Client) Lrange(args ...interface{}) *Reply

Lrange calls Redis LRANGE command.

func (*Client) Lrem added in v0.2.0

func (c *Client) Lrem(args ...interface{}) *Reply

Lrem calls Redis LREM command.

func (*Client) Lset added in v0.2.0

func (c *Client) Lset(args ...interface{}) *Reply

Lset calls Redis LSET command.

func (*Client) Ltrim added in v0.2.0

func (c *Client) Ltrim(args ...interface{}) *Reply

Ltrim calls Redis LTRIM command.

func (*Client) Mget added in v0.2.0

func (c *Client) Mget(args ...interface{}) *Reply

Mget calls Redis MGET command.

func (*Client) Migrate added in v0.2.0

func (c *Client) Migrate(args ...interface{}) *Reply

Migrate calls Redis MIGRATE command.

func (*Client) Monitor added in v0.2.0

func (c *Client) Monitor(args ...interface{}) *Reply

Monitor calls Redis MONITOR command.

func (*Client) Move added in v0.2.0

func (c *Client) Move(args ...interface{}) *Reply

Move calls Redis MOVE command.

func (*Client) Mset added in v0.2.0

func (c *Client) Mset(args ...interface{}) *Reply

Mset calls Redis MSET command.

func (*Client) Msetnx added in v0.2.0

func (c *Client) Msetnx(args ...interface{}) *Reply

Msetnx calls Redis MSETNX command.

func (*Client) Multi added in v0.2.0

func (c *Client) Multi(args ...interface{}) *Reply

Multi calls Redis MULTI command.

func (*Client) MultiCall added in v0.2.1

func (c *Client) MultiCall(f func(*MultiCall)) *Reply

MultiCall executes the given MultiCall. Multicall reply is guaranteed to have the same number of sub-replies as calls, if it succeeds.

func (*Client) Object added in v0.2.0

func (c *Client) Object(args ...interface{}) *Reply

Object calls Redis OBJECT command.

func (*Client) Persist added in v0.2.0

func (c *Client) Persist(args ...interface{}) *Reply

Persist calls Redis PERSIST command.

func (*Client) Pexpire added in v0.2.0

func (c *Client) Pexpire(args ...interface{}) *Reply

Pexpire calls Redis PEXPIRE command.

func (*Client) Pexpireat added in v0.2.0

func (c *Client) Pexpireat(args ...interface{}) *Reply

Pexpireat calls Redis PEXPIREAT command.

func (*Client) Ping added in v0.2.0

func (c *Client) Ping(args ...interface{}) *Reply

Ping calls Redis PING command.

func (*Client) Psetex added in v0.2.0

func (c *Client) Psetex(args ...interface{}) *Reply

Psetex calls Redis PSETEX command.

func (*Client) Psubscribe added in v0.2.0

func (c *Client) Psubscribe(args ...interface{}) *Reply

Psubscribe calls Redis PSUBSCRIBE command.

func (*Client) Pttl added in v0.2.0

func (c *Client) Pttl(args ...interface{}) *Reply

Pttl calls Redis PTTL command.

func (*Client) Publish added in v0.2.0

func (c *Client) Publish(args ...interface{}) *Reply

Publish calls Redis PUBLISH command.

func (*Client) Punsubscribe added in v0.2.0

func (c *Client) Punsubscribe(args ...interface{}) *Reply

Punsubscribe calls Redis PUNSUBSCRIBE command.

func (*Client) Randomkey added in v0.2.0

func (c *Client) Randomkey(args ...interface{}) *Reply

Randomkey calls Redis RANDOMKEY command.

func (*Client) Rename added in v0.2.0

func (c *Client) Rename(args ...interface{}) *Reply

Rename calls Redis RENAME command.

func (*Client) Renamenx added in v0.2.0

func (c *Client) Renamenx(args ...interface{}) *Reply

Renamenx calls Redis RENAMENX command.

func (*Client) Replconf added in v0.3.0

func (c *Client) Replconf(args ...interface{}) *Reply

Replconf calls Redis REPLCONF command.

func (*Client) Restore added in v0.2.0

func (c *Client) Restore(args ...interface{}) *Reply

Restore calls Redis RESTORE command.

func (*Client) Rpop added in v0.2.0

func (c *Client) Rpop(args ...interface{}) *Reply

Rpop calls Redis RPOP command.

func (*Client) Rpoplpush added in v0.2.0

func (c *Client) Rpoplpush(args ...interface{}) *Reply

Rpoplpush calls Redis RPOPLPUSH command.

func (*Client) Rpush added in v0.2.0

func (c *Client) Rpush(args ...interface{}) *Reply

Rpush calls Redis RPUSH command.

func (*Client) Rpushx added in v0.2.0

func (c *Client) Rpushx(args ...interface{}) *Reply

Rpushx calls Redis RPUSHX command.

func (*Client) Sadd added in v0.2.0

func (c *Client) Sadd(args ...interface{}) *Reply

Sadd calls Redis SADD command.

func (*Client) Save added in v0.2.0

func (c *Client) Save(args ...interface{}) *Reply

Save calls Redis SAVE command.

func (*Client) Scard added in v0.2.0

func (c *Client) Scard(args ...interface{}) *Reply

Scard calls Redis SCARD command.

func (*Client) Script added in v0.2.0

func (c *Client) Script(args ...interface{}) *Reply

Script calls Redis SCRIPT command.

func (*Client) Sdiff added in v0.2.0

func (c *Client) Sdiff(args ...interface{}) *Reply

Sdiff calls Redis SDIFF command.

func (*Client) Sdiffstore added in v0.2.0

func (c *Client) Sdiffstore(args ...interface{}) *Reply

Sdiffstore calls Redis SDIFFSTORE command.

func (*Client) Select

func (c *Client) Select(args ...interface{}) *Reply

Select calls Redis SELECT command.

func (*Client) Set added in v0.2.0

func (c *Client) Set(args ...interface{}) *Reply

Set calls Redis SET command.

func (*Client) Setbit added in v0.2.0

func (c *Client) Setbit(args ...interface{}) *Reply

Setbit calls Redis SETBIT command.

func (*Client) Setex added in v0.2.0

func (c *Client) Setex(args ...interface{}) *Reply

Setex calls Redis SETEX command.

func (*Client) Setnx added in v0.2.0

func (c *Client) Setnx(args ...interface{}) *Reply

Setnx calls Redis SETNX command.

func (*Client) Setrange added in v0.2.0

func (c *Client) Setrange(args ...interface{}) *Reply

Setrange calls Redis SETRANGE command.

func (*Client) Shutdown added in v0.2.0

func (c *Client) Shutdown(args ...interface{}) *Reply

Shutdown calls Redis SHUTDOWN command.

func (*Client) Sinter added in v0.2.0

func (c *Client) Sinter(args ...interface{}) *Reply

Sinter calls Redis SINTER command.

func (*Client) Sinterstore added in v0.2.0

func (c *Client) Sinterstore(args ...interface{}) *Reply

Sinterstore calls Redis SINTERSTORE command.

func (*Client) Sismember added in v0.2.0

func (c *Client) Sismember(args ...interface{}) *Reply

Sismember calls Redis SISMEMBER command.

func (*Client) Slaveof added in v0.2.0

func (c *Client) Slaveof(args ...interface{}) *Reply

Slaveof calls Redis SLAVEOF command.

func (*Client) Smembers added in v0.2.0

func (c *Client) Smembers(args ...interface{}) *Reply

Smembers calls Redis SMEMBERS command.

func (*Client) Smove added in v0.2.0

func (c *Client) Smove(args ...interface{}) *Reply

Smove calls Redis SMOVE command.

func (*Client) Sort added in v0.2.0

func (c *Client) Sort(args ...interface{}) *Reply

Sort calls Redis SORT command.

func (*Client) Spop added in v0.2.0

func (c *Client) Spop(args ...interface{}) *Reply

Spop calls Redis SPOP command.

func (*Client) Srandmember added in v0.2.0

func (c *Client) Srandmember(args ...interface{}) *Reply

Srandmember calls Redis SRANDMEMBER command.

func (*Client) Srem added in v0.2.0

func (c *Client) Srem(args ...interface{}) *Reply

Srem calls Redis SREM command.

func (*Client) Strlen added in v0.2.0

func (c *Client) Strlen(args ...interface{}) *Reply

Strlen calls Redis STRLEN command.

func (*Client) Subscribe added in v0.2.0

func (c *Client) Subscribe(args ...interface{}) *Reply

Subscribe calls Redis SUBSCRIBE 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) Sunion added in v0.2.0

func (c *Client) Sunion(args ...interface{}) *Reply

Sunion calls Redis SUNION command.

func (*Client) Sunionstore added in v0.2.0

func (c *Client) Sunionstore(args ...interface{}) *Reply

Sunionstore calls Redis SUNIONSTORE command.

func (*Client) Sync added in v0.2.0

func (c *Client) Sync(args ...interface{}) *Reply

Sync calls Redis SYNC command.

func (*Client) Time added in v0.2.0

func (c *Client) Time(args ...interface{}) *Reply

Time calls Redis TIME command.

func (*Client) Transaction

func (c *Client) Transaction(f func(*MultiCall)) *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 MultiCall. Transaction reply is guaranteed to have the same number of sub-replies as calls, if it succeeds.

func (*Client) Ttl added in v0.2.0

func (c *Client) Ttl(args ...interface{}) *Reply

Ttl calls Redis TTL command.

func (*Client) Type added in v0.2.0

func (c *Client) Type(args ...interface{}) *Reply

Type calls Redis TYPE command.

func (*Client) Unsubscribe added in v0.2.0

func (c *Client) Unsubscribe(args ...interface{}) *Reply

Unsubscribe calls Redis UNSUBSCRIBE command.

func (*Client) Unwatch added in v0.2.0

func (c *Client) Unwatch(args ...interface{}) *Reply

Unwatch calls Redis UNWATCH command.

func (*Client) Watch added in v0.2.0

func (c *Client) Watch(args ...interface{}) *Reply

Watch calls Redis WATCH command.

func (*Client) Zadd added in v0.2.0

func (c *Client) Zadd(args ...interface{}) *Reply

Zadd calls Redis ZADD command.

func (*Client) Zcard added in v0.2.0

func (c *Client) Zcard(args ...interface{}) *Reply

Zcard calls Redis ZCARD command.

func (*Client) Zcount added in v0.2.0

func (c *Client) Zcount(args ...interface{}) *Reply

Zcount calls Redis ZCOUNT command.

func (*Client) Zincrby added in v0.2.0

func (c *Client) Zincrby(args ...interface{}) *Reply

Zincrby calls Redis ZINCRBY command.

func (*Client) Zinterstore added in v0.2.0

func (c *Client) Zinterstore(args ...interface{}) *Reply

Zinterstore calls Redis ZINTERSTORE command.

func (*Client) Zrange added in v0.2.0

func (c *Client) Zrange(args ...interface{}) *Reply

Zrange calls Redis ZRANGE command.

func (*Client) Zrangebyscore added in v0.2.0

func (c *Client) Zrangebyscore(args ...interface{}) *Reply

Zrangebyscore calls Redis ZRANGEBYSCORE command.

func (*Client) Zrank added in v0.2.0

func (c *Client) Zrank(args ...interface{}) *Reply

Zrank calls Redis ZRANK command.

func (*Client) Zrem added in v0.2.0

func (c *Client) Zrem(args ...interface{}) *Reply

Zrem calls Redis ZREM command.

func (*Client) Zremrangebyrank added in v0.2.0

func (c *Client) Zremrangebyrank(args ...interface{}) *Reply

Zremrangebyrank calls Redis ZREMRANGEBYRANK command.

func (*Client) Zremrangebyscore added in v0.2.0

func (c *Client) Zremrangebyscore(args ...interface{}) *Reply

Zremrangebyscore calls Redis ZREMRANGEBYSCORE command.

func (*Client) Zrevrange added in v0.2.0

func (c *Client) Zrevrange(args ...interface{}) *Reply

Zrevrange calls Redis ZREVRANGE command.

func (*Client) Zrevrangebyscore added in v0.2.0

func (c *Client) Zrevrangebyscore(args ...interface{}) *Reply

Zrevrangebyscore calls Redis ZREVRANGEBYSCORE command.

func (*Client) Zrevrank added in v0.2.0

func (c *Client) Zrevrank(args ...interface{}) *Reply

Zrevrank calls Redis ZREVRANK command.

func (*Client) Zscore added in v0.2.0

func (c *Client) Zscore(args ...interface{}) *Reply

Zscore calls Redis ZSCORE command.

func (*Client) Zunionstore added in v0.2.0

func (c *Client) Zunionstore(args ...interface{}) *Reply

Zunionstore calls Redis ZUNIONSTORE command.

type Cmd added in v0.2.1

type Cmd string

Cmd is a type for Redis command names.

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
}

func (*Error) Error

func (e *Error) Error() string

Error returns a string representation of the error.

func (*Error) Test

func (e *Error) Test(flags ...ErrorFlag) bool

Test returns true, if any of the given error flags is set in the error, otherwise false.

type ErrorFlag

type ErrorFlag uint8
const (
	ErrorRedis ErrorFlag = 1 << iota
	ErrorConnection
	ErrorLoading
	ErrorAuth
	ErrorParse
	ErrorInvalid
	ErrorTimeout
)

type Future

type Future chan *Reply

Future is a channel for fetching the reply of an asynchronous call.

func (Future) Reply

func (f Future) Reply() *Reply

Reply returns the reply of the Future. It blocks until the reply is available.

type Message

type Message struct {
	Type          MessageType
	Channel       string
	Pattern       string
	Subscriptions int
	Payload       string
}

Message describes a pub/sub message

func (*Message) String

func (m *Message) String() string

String returns a string representation of the 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) Call added in v0.2.1

func (mc *MultiCall) Call(cmd string, args ...interface{})

Call queues a call 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

func (mc *MultiCall) Flush() (r *Reply)

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

func (r *Reply) Bool() (bool, error)

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

func (r *Reply) Bytes() ([]byte, error)

Bytes is a convenience method for calling Reply.Str() and converting it to []byte.

func (*Reply) Hash added in v0.3.0

func (r *Reply) Hash() (map[string]string, error)

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) Int

func (r *Reply) Int() (int, error)

Int is a convenience method for calling Reply.Int64() and converting it to int.

func (*Reply) Int64

func (r *Reply) Int64() (int64, error)

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

func (r *Reply) List() ([]string, error)

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.

func (*Reply) Str

func (r *Reply) Str() (string, error)

Str returns the reply value as a string or an error, if the reply type is not ReplyStatus or ReplyString.

func (*Reply) String

func (r *Reply) String() 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 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

const (
	ReplyStatus ReplyType = iota
	ReplyError
	ReplyInteger
	ReplyNil
	ReplyString
	ReplyMulti
)

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.

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.

Jump to

Keyboard shortcuts

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