mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
pipeline now has its own interface "Pipelineable"
This commit is contained in:
13
commands.go
13
commands.go
@ -39,8 +39,8 @@ func formatSec(dur time.Duration) int64 {
|
||||
}
|
||||
|
||||
type Cmdable interface {
|
||||
Pipeline() *Pipeline
|
||||
Pipelined(fn func(*Pipeline) error) ([]Cmder, error)
|
||||
Pipeline() Pipelineable
|
||||
Pipelined(fn func(Pipelineable) error) ([]Cmder, error)
|
||||
|
||||
Echo(message interface{}) *StringCmd
|
||||
Ping() *StatusCmd
|
||||
@ -237,6 +237,15 @@ type Cmdable interface {
|
||||
Command() *CommandsInfoCmd
|
||||
}
|
||||
|
||||
type StatefulCmdable interface {
|
||||
Auth(password string) *StatusCmd
|
||||
Select(index int) *StatusCmd
|
||||
ClientSetName(name string) *BoolCmd
|
||||
ClientGetName() *StringCmd
|
||||
ReadOnly() *StatusCmd
|
||||
ReadWrite() *StatusCmd
|
||||
}
|
||||
|
||||
var _ Cmdable = (*Client)(nil)
|
||||
var _ Cmdable = (*Tx)(nil)
|
||||
var _ Cmdable = (*Ring)(nil)
|
||||
|
Reference in New Issue
Block a user