Add AddHook to UniversalClient

This commit is contained in:
Vladimir Mihailenco 2019-05-31 17:40:47 +03:00
parent 43fdab312a
commit 7a91ed0df5
1 changed files with 2 additions and 0 deletions

View File

@ -154,6 +154,7 @@ func (o *UniversalOptions) simple() *Options {
type UniversalClient interface { type UniversalClient interface {
Cmdable Cmdable
Context() context.Context Context() context.Context
AddHook(Hook)
Watch(fn func(*Tx) error, keys ...string) error Watch(fn func(*Tx) error, keys ...string) error
Process(cmd Cmder) error Process(cmd Cmder) error
Subscribe(channels ...string) *PubSub Subscribe(channels ...string) *PubSub
@ -163,6 +164,7 @@ type UniversalClient interface {
var _ UniversalClient = (*Client)(nil) var _ UniversalClient = (*Client)(nil)
var _ UniversalClient = (*ClusterClient)(nil) var _ UniversalClient = (*ClusterClient)(nil)
var _ UniversalClient = (*Ring)(nil)
// NewUniversalClient returns a new multi client. The type of client returned depends // NewUniversalClient returns a new multi client. The type of client returned depends
// on the following three conditions: // on the following three conditions: