From 9d63d8db545569e442dc19224a05491a4f59227f Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Sun, 14 Apr 2019 10:56:15 +0200 Subject: [PATCH] Added WrapProcessPipeline to UniversalClient, wrap c.processTxPipeline in cluster client --- cluster.go | 1 + universal.go | 1 + 2 files changed, 2 insertions(+) diff --git a/cluster.go b/cluster.go index c9f1384..bdfdb83 100644 --- a/cluster.go +++ b/cluster.go @@ -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 { diff --git a/universal.go b/universal.go index a607562..03bfa0f 100644 --- a/universal.go +++ b/universal.go @@ -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