mirror of https://github.com/go-redis/redis.git
Merge pull request #1011 from aspacca/master
Added WrapProcessPipeline to UniversalClient, wrap c.processTxPipelin…
This commit is contained in:
commit
6b2a39a436
|
@ -1198,6 +1198,7 @@ func (c *ClusterClient) WrapProcessPipeline(
|
||||||
fn func(oldProcess func([]Cmder) error) func([]Cmder) error,
|
fn func(oldProcess func([]Cmder) error) func([]Cmder) error,
|
||||||
) {
|
) {
|
||||||
c.processPipeline = fn(c.processPipeline)
|
c.processPipeline = fn(c.processPipeline)
|
||||||
|
c.processTxPipeline = fn(c.processTxPipeline)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ClusterClient) defaultProcessPipeline(cmds []Cmder) error {
|
func (c *ClusterClient) defaultProcessPipeline(cmds []Cmder) error {
|
||||||
|
|
|
@ -155,6 +155,7 @@ type UniversalClient interface {
|
||||||
Watch(fn func(*Tx) error, keys ...string) error
|
Watch(fn func(*Tx) error, keys ...string) error
|
||||||
Process(cmd Cmder) error
|
Process(cmd Cmder) error
|
||||||
WrapProcess(fn func(oldProcess func(cmd Cmder) error) func(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
|
Subscribe(channels ...string) *PubSub
|
||||||
PSubscribe(channels ...string) *PubSub
|
PSubscribe(channels ...string) *PubSub
|
||||||
Close() error
|
Close() error
|
||||||
|
|
Loading…
Reference in New Issue