mirror of https://github.com/go-redis/redis.git
Added subscription interfaces to universal client
This commit is contained in:
parent
b879d4e0b9
commit
08ae2d0555
|
@ -257,6 +257,11 @@ type StatefulCmdable interface {
|
|||
ReadWrite() *StatusCmd
|
||||
}
|
||||
|
||||
type Subscribable interface {
|
||||
Subscribe(channels ...string) *PubSub
|
||||
PSubscribe(channels ...string) *PubSub
|
||||
}
|
||||
|
||||
var _ Cmdable = (*Client)(nil)
|
||||
var _ Cmdable = (*Tx)(nil)
|
||||
var _ Cmdable = (*Ring)(nil)
|
||||
|
|
|
@ -113,6 +113,7 @@ func (o *UniversalOptions) simple() *Options {
|
|||
// applications locally.
|
||||
type UniversalClient interface {
|
||||
Cmdable
|
||||
Subscribable
|
||||
Process(cmd Cmder) error
|
||||
Close() error
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue