Documentation ¶
Index ¶
- type RedisGroup
- func (r *RedisGroup) Clone() *RedisGroup
- func (r *RedisGroup) Ctx(ctx context.Context) *RedisGroup
- func (r *RedisGroup) Do(commandName string, args ...interface{}) (interface{}, error)
- func (r *RedisGroup) DoVar(commandName string, args ...interface{}) (*gvar.Var, error)
- func (r *RedisGroup) DoVarWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (*gvar.Var, error)
- func (r *RedisGroup) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (interface{}, error)
- func (r *RedisGroup) Master() *gredis.Redis
- func (r *RedisGroup) Slave() *gredis.Redis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisGroup ¶
type RedisGroup struct {
// contains filtered or unexported fields
}
func Group ¶
func Group(name ...string) *RedisGroup
func New ¶
func New(name ...string) *RedisGroup
func (*RedisGroup) Clone ¶
func (r *RedisGroup) Clone() *RedisGroup
Clone clones and returns a new Redis object, which is a shallow copy of current one.
func (*RedisGroup) Ctx ¶
func (r *RedisGroup) Ctx(ctx context.Context) *RedisGroup
Ctx is a channing function which sets the context for next operation.
func (*RedisGroup) Do ¶
func (r *RedisGroup) Do(commandName string, args ...interface{}) (interface{}, error)
Do sends a command to the server and returns the received reply. Do automatically get a connection from pool, and close it when the reply received. It does not really "close" the connection, but drops it back to the connection pool.
func (*RedisGroup) DoVar ¶
func (r *RedisGroup) DoVar(commandName string, args ...interface{}) (*gvar.Var, error)
DoVar returns value from Do as gvar.Var.
func (*RedisGroup) DoVarWithTimeout ¶
func (r *RedisGroup) DoVarWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (*gvar.Var, error)
DoVarWithTimeout returns value from Do as gvar.Var. The timeout overrides the read timeout set when dialing the connection.
func (*RedisGroup) DoWithTimeout ¶
func (r *RedisGroup) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (interface{}, error)
DoWithTimeout sends a command to the server and returns the received reply. The timeout overrides the read timeout set when dialing the connection.
func (*RedisGroup) Master ¶
func (r *RedisGroup) Master() *gredis.Redis
func (*RedisGroup) Slave ¶
func (r *RedisGroup) Slave() *gredis.Redis