Added subscription interfaces to universal client

This commit is contained in:
Sudhir Jonathan 2017-12-14 22:06:57 +05:30
parent b879d4e0b9
commit 08ae2d0555
2 changed files with 6 additions and 0 deletions

View File

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

View File

@ -113,6 +113,7 @@ func (o *UniversalOptions) simple() *Options {
// applications locally.
type UniversalClient interface {
Cmdable
Subscribable
Process(cmd Cmder) error
Close() error
}