diff --git a/commands.go b/commands.go index aa98aa7..d6e6f2a 100644 --- a/commands.go +++ b/commands.go @@ -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) diff --git a/universal.go b/universal.go index 29eb12b..339bb4e 100644 --- a/universal.go +++ b/universal.go @@ -113,6 +113,7 @@ func (o *UniversalOptions) simple() *Options { // applications locally. type UniversalClient interface { Cmdable + Subscribable Process(cmd Cmder) error Close() error }