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