mirror of https://github.com/go-redis/redis.git
Added WrapProcessPipeline to UniversalClient, wrap c.processTxPipeline in cluster client
This commit is contained in:
parent
cb1c190bed
commit
9d63d8db54
|
@ -1198,6 +1198,7 @@ func (c *ClusterClient) WrapProcessPipeline(
|
|||
fn func(oldProcess func([]Cmder) error) func([]Cmder) error,
|
||||
) {
|
||||
c.processPipeline = fn(c.processPipeline)
|
||||
c.processTxPipeline = fn(c.processTxPipeline)
|
||||
}
|
||||
|
||||
func (c *ClusterClient) defaultProcessPipeline(cmds []Cmder) error {
|
||||
|
|
|
@ -155,6 +155,7 @@ type UniversalClient interface {
|
|||
Watch(fn func(*Tx) error, keys ...string) error
|
||||
Process(cmd Cmder) error
|
||||
WrapProcess(fn func(oldProcess func(cmd Cmder) error) func(cmd Cmder) error)
|
||||
WrapProcessPipeline(fn func(oldProcess func([]Cmder) error) func([]Cmder) error)
|
||||
Subscribe(channels ...string) *PubSub
|
||||
PSubscribe(channels ...string) *PubSub
|
||||
Close() error
|
||||
|
|
Loading…
Reference in New Issue