summaryrefslogtreecommitdiffstats
path: root/modules/queue
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/queue/backoff.go63
-rw-r--r--modules/queue/base.go42
-rw-r--r--modules/queue/base_channel.go131
-rw-r--r--modules/queue/base_channel_test.go11
-rw-r--r--modules/queue/base_dummy.go38
-rw-r--r--modules/queue/base_levelqueue.go83
-rw-r--r--modules/queue/base_levelqueue_common.go93
-rw-r--r--modules/queue/base_levelqueue_test.go78
-rw-r--r--modules/queue/base_levelqueue_unique.go88
-rw-r--r--modules/queue/base_redis.go162
-rw-r--r--modules/queue/base_redis_test.go138
-rw-r--r--modules/queue/base_redis_with_server_test.go133
-rw-r--r--modules/queue/base_test.go141
-rw-r--r--modules/queue/config.go36
-rw-r--r--modules/queue/lqinternal/lqinternal.go48
-rw-r--r--modules/queue/manager.go113
-rw-r--r--modules/queue/manager_test.go125
-rw-r--r--modules/queue/mock/inmemorymockredis.go133
-rw-r--r--modules/queue/mock/redisuniversalclient.go7201
-rw-r--r--modules/queue/queue.go68
-rw-r--r--modules/queue/testhelper.go40
-rw-r--r--modules/queue/workergroup.go350
-rw-r--r--modules/queue/workerqueue.go260
-rw-r--r--modules/queue/workerqueue_test.go291
24 files changed, 9866 insertions, 0 deletions
diff --git a/modules/queue/backoff.go b/modules/queue/backoff.go
new file mode 100644
index 00000000..cda72335
--- /dev/null
+++ b/modules/queue/backoff.go
@@ -0,0 +1,63 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "time"
+)
+
+const (
+ backoffBegin = 50 * time.Millisecond
+ backoffUpper = 2 * time.Second
+)
+
+type (
+ backoffFuncRetErr[T any] func() (retry bool, ret T, err error)
+ backoffFuncErr func() (retry bool, err error)
+)
+
+func backoffRetErr[T any](ctx context.Context, begin, upper time.Duration, end <-chan time.Time, fn backoffFuncRetErr[T]) (ret T, err error) {
+ d := begin
+ for {
+ // check whether the context has been cancelled or has reached the deadline, return early
+ select {
+ case <-ctx.Done():
+ return ret, ctx.Err()
+ case <-end:
+ return ret, context.DeadlineExceeded
+ default:
+ }
+
+ // call the target function
+ retry, ret, err := fn()
+ if err != nil {
+ return ret, err
+ }
+ if !retry {
+ return ret, nil
+ }
+
+ // wait for a while before retrying, and also respect the context & deadline
+ select {
+ case <-ctx.Done():
+ return ret, ctx.Err()
+ case <-time.After(d):
+ d *= 2
+ if d > upper {
+ d = upper
+ }
+ case <-end:
+ return ret, context.DeadlineExceeded
+ }
+ }
+}
+
+func backoffErr(ctx context.Context, begin, upper time.Duration, end <-chan time.Time, fn backoffFuncErr) error {
+ _, err := backoffRetErr(ctx, begin, upper, end, func() (retry bool, ret any, err error) {
+ retry, err = fn()
+ return retry, nil, err
+ })
+ return err
+}
diff --git a/modules/queue/base.go b/modules/queue/base.go
new file mode 100644
index 00000000..102e79e5
--- /dev/null
+++ b/modules/queue/base.go
@@ -0,0 +1,42 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "time"
+)
+
+var pushBlockTime = 5 * time.Second
+
+type baseQueue interface {
+ PushItem(ctx context.Context, data []byte) error
+ PopItem(ctx context.Context) ([]byte, error)
+ HasItem(ctx context.Context, data []byte) (bool, error)
+ Len(ctx context.Context) (int, error)
+ Close() error
+ RemoveAll(ctx context.Context) error
+}
+
+func popItemByChan(ctx context.Context, popItemFn func(ctx context.Context) ([]byte, error)) (chanItem chan []byte, chanErr chan error) {
+ chanItem = make(chan []byte)
+ chanErr = make(chan error)
+ go func() {
+ for {
+ it, err := popItemFn(ctx)
+ if err != nil {
+ close(chanItem)
+ chanErr <- err
+ return
+ }
+ if it == nil {
+ close(chanItem)
+ close(chanErr)
+ return
+ }
+ chanItem <- it
+ }
+ }()
+ return chanItem, chanErr
+}
diff --git a/modules/queue/base_channel.go b/modules/queue/base_channel.go
new file mode 100644
index 00000000..d03c72bd
--- /dev/null
+++ b/modules/queue/base_channel.go
@@ -0,0 +1,131 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "errors"
+ "sync"
+ "time"
+
+ "code.gitea.io/gitea/modules/container"
+)
+
+var errChannelClosed = errors.New("channel is closed")
+
+type baseChannel struct {
+ c chan []byte
+ set container.Set[string]
+ mu sync.Mutex
+
+ isUnique bool
+}
+
+var _ baseQueue = (*baseChannel)(nil)
+
+func newBaseChannelGeneric(cfg *BaseConfig, unique bool) (baseQueue, error) {
+ q := &baseChannel{c: make(chan []byte, cfg.Length), isUnique: unique}
+ if unique {
+ q.set = container.Set[string]{}
+ }
+ return q, nil
+}
+
+func newBaseChannelSimple(cfg *BaseConfig) (baseQueue, error) {
+ return newBaseChannelGeneric(cfg, false)
+}
+
+func newBaseChannelUnique(cfg *BaseConfig) (baseQueue, error) {
+ return newBaseChannelGeneric(cfg, true)
+}
+
+func (q *baseChannel) PushItem(ctx context.Context, data []byte) error {
+ if q.c == nil {
+ return errChannelClosed
+ }
+
+ if q.isUnique {
+ q.mu.Lock()
+ has := q.set.Contains(string(data))
+ q.mu.Unlock()
+ if has {
+ return ErrAlreadyInQueue
+ }
+ }
+
+ select {
+ case q.c <- data:
+ if q.isUnique {
+ q.mu.Lock()
+ q.set.Add(string(data))
+ q.mu.Unlock()
+ }
+ return nil
+ case <-time.After(pushBlockTime):
+ return context.DeadlineExceeded
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+}
+
+func (q *baseChannel) PopItem(ctx context.Context) ([]byte, error) {
+ select {
+ case data, ok := <-q.c:
+ if !ok {
+ return nil, errChannelClosed
+ }
+ q.mu.Lock()
+ q.set.Remove(string(data))
+ q.mu.Unlock()
+ return data, nil
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ }
+}
+
+func (q *baseChannel) HasItem(ctx context.Context, data []byte) (bool, error) {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ if !q.isUnique {
+ return false, nil
+ }
+ return q.set.Contains(string(data)), nil
+}
+
+func (q *baseChannel) Len(ctx context.Context) (int, error) {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+
+ if q.c == nil {
+ return 0, errChannelClosed
+ }
+
+ return len(q.c), nil
+}
+
+func (q *baseChannel) Close() error {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+
+ close(q.c)
+ if q.isUnique {
+ q.set = container.Set[string]{}
+ }
+
+ return nil
+}
+
+func (q *baseChannel) RemoveAll(ctx context.Context) error {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+
+ for q.c != nil && len(q.c) > 0 {
+ <-q.c
+ }
+
+ if q.isUnique {
+ q.set = container.Set[string]{}
+ }
+ return nil
+}
diff --git a/modules/queue/base_channel_test.go b/modules/queue/base_channel_test.go
new file mode 100644
index 00000000..5d0a2ed0
--- /dev/null
+++ b/modules/queue/base_channel_test.go
@@ -0,0 +1,11 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import "testing"
+
+func TestBaseChannel(t *testing.T) {
+ testQueueBasic(t, newBaseChannelSimple, &BaseConfig{ManagedName: "baseChannel", Length: 10}, false)
+ testQueueBasic(t, newBaseChannelUnique, &BaseConfig{ManagedName: "baseChannel", Length: 10}, true)
+}
diff --git a/modules/queue/base_dummy.go b/modules/queue/base_dummy.go
new file mode 100644
index 00000000..7503568a
--- /dev/null
+++ b/modules/queue/base_dummy.go
@@ -0,0 +1,38 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import "context"
+
+type baseDummy struct{}
+
+var _ baseQueue = (*baseDummy)(nil)
+
+func newBaseDummy(cfg *BaseConfig, unique bool) (baseQueue, error) {
+ return &baseDummy{}, nil
+}
+
+func (q *baseDummy) PushItem(ctx context.Context, data []byte) error {
+ return nil
+}
+
+func (q *baseDummy) PopItem(ctx context.Context) ([]byte, error) {
+ return nil, nil
+}
+
+func (q *baseDummy) Len(ctx context.Context) (int, error) {
+ return 0, nil
+}
+
+func (q *baseDummy) HasItem(ctx context.Context, data []byte) (bool, error) {
+ return false, nil
+}
+
+func (q *baseDummy) Close() error {
+ return nil
+}
+
+func (q *baseDummy) RemoveAll(ctx context.Context) error {
+ return nil
+}
diff --git a/modules/queue/base_levelqueue.go b/modules/queue/base_levelqueue.go
new file mode 100644
index 00000000..efc57c9c
--- /dev/null
+++ b/modules/queue/base_levelqueue.go
@@ -0,0 +1,83 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "sync/atomic"
+
+ "code.gitea.io/gitea/modules/nosql"
+ "code.gitea.io/gitea/modules/queue/lqinternal"
+
+ "gitea.com/lunny/levelqueue"
+ "github.com/syndtr/goleveldb/leveldb"
+)
+
+type baseLevelQueue struct {
+ internal atomic.Pointer[levelqueue.Queue]
+
+ conn string
+ cfg *BaseConfig
+ db *leveldb.DB
+}
+
+var _ baseQueue = (*baseLevelQueue)(nil)
+
+func newBaseLevelQueueGeneric(cfg *BaseConfig, unique bool) (baseQueue, error) {
+ if unique {
+ return newBaseLevelQueueUnique(cfg)
+ }
+ return newBaseLevelQueueSimple(cfg)
+}
+
+func newBaseLevelQueueSimple(cfg *BaseConfig) (baseQueue, error) {
+ conn, db, err := prepareLevelDB(cfg)
+ if err != nil {
+ return nil, err
+ }
+ q := &baseLevelQueue{conn: conn, cfg: cfg, db: db}
+ lq, err := levelqueue.NewQueue(db, []byte(cfg.QueueFullName), false)
+ if err != nil {
+ return nil, err
+ }
+ q.internal.Store(lq)
+ return q, nil
+}
+
+func (q *baseLevelQueue) PushItem(ctx context.Context, data []byte) error {
+ c := baseLevelQueueCommon(q.cfg, nil, func() baseLevelQueuePushPoper { return q.internal.Load() })
+ return c.PushItem(ctx, data)
+}
+
+func (q *baseLevelQueue) PopItem(ctx context.Context) ([]byte, error) {
+ c := baseLevelQueueCommon(q.cfg, nil, func() baseLevelQueuePushPoper { return q.internal.Load() })
+ return c.PopItem(ctx)
+}
+
+func (q *baseLevelQueue) HasItem(ctx context.Context, data []byte) (bool, error) {
+ return false, nil
+}
+
+func (q *baseLevelQueue) Len(ctx context.Context) (int, error) {
+ return int(q.internal.Load().Len()), nil
+}
+
+func (q *baseLevelQueue) Close() error {
+ err := q.internal.Load().Close()
+ _ = nosql.GetManager().CloseLevelDB(q.conn)
+ q.db = nil // the db is not managed by us, it's managed by the nosql manager
+ return err
+}
+
+func (q *baseLevelQueue) RemoveAll(ctx context.Context) error {
+ lqinternal.RemoveLevelQueueKeys(q.db, []byte(q.cfg.QueueFullName))
+ lq, err := levelqueue.NewQueue(q.db, []byte(q.cfg.QueueFullName), false)
+ if err != nil {
+ return err
+ }
+ old := q.internal.Load()
+ q.internal.Store(lq)
+ _ = old.Close() // Not ideal for concurrency. Luckily, the levelqueue only sets its db=nil because it doesn't manage the db, so far so good
+ return nil
+}
diff --git a/modules/queue/base_levelqueue_common.go b/modules/queue/base_levelqueue_common.go
new file mode 100644
index 00000000..78d3b85a
--- /dev/null
+++ b/modules/queue/base_levelqueue_common.go
@@ -0,0 +1,93 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "fmt"
+ "path/filepath"
+ "strings"
+ "sync"
+ "time"
+
+ "code.gitea.io/gitea/modules/nosql"
+
+ "gitea.com/lunny/levelqueue"
+ "github.com/syndtr/goleveldb/leveldb"
+)
+
+// baseLevelQueuePushPoper is the common interface for levelqueue.Queue and levelqueue.UniqueQueue
+type baseLevelQueuePushPoper interface {
+ RPush(data []byte) error
+ LPop() ([]byte, error)
+ Len() int64
+}
+
+type baseLevelQueueCommonImpl struct {
+ length int
+ internalFunc func() baseLevelQueuePushPoper
+ mu *sync.Mutex
+}
+
+func (q *baseLevelQueueCommonImpl) PushItem(ctx context.Context, data []byte) error {
+ return backoffErr(ctx, backoffBegin, backoffUpper, time.After(pushBlockTime), func() (retry bool, err error) {
+ if q.mu != nil {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ }
+
+ cnt := int(q.internalFunc().Len())
+ if cnt >= q.length {
+ return true, nil
+ }
+ retry, err = false, q.internalFunc().RPush(data)
+ if err == levelqueue.ErrAlreadyInQueue {
+ err = ErrAlreadyInQueue
+ }
+ return retry, err
+ })
+}
+
+func (q *baseLevelQueueCommonImpl) PopItem(ctx context.Context) ([]byte, error) {
+ return backoffRetErr(ctx, backoffBegin, backoffUpper, infiniteTimerC, func() (retry bool, data []byte, err error) {
+ if q.mu != nil {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ }
+
+ data, err = q.internalFunc().LPop()
+ if err == levelqueue.ErrNotFound {
+ return true, nil, nil
+ }
+ if err != nil {
+ return false, nil, err
+ }
+ return false, data, nil
+ })
+}
+
+func baseLevelQueueCommon(cfg *BaseConfig, mu *sync.Mutex, internalFunc func() baseLevelQueuePushPoper) *baseLevelQueueCommonImpl {
+ return &baseLevelQueueCommonImpl{length: cfg.Length, mu: mu, internalFunc: internalFunc}
+}
+
+func prepareLevelDB(cfg *BaseConfig) (conn string, db *leveldb.DB, err error) {
+ if cfg.ConnStr == "" { // use data dir as conn str
+ if !filepath.IsAbs(cfg.DataFullDir) {
+ return "", nil, fmt.Errorf("invalid leveldb data dir (not absolute): %q", cfg.DataFullDir)
+ }
+ conn = cfg.DataFullDir
+ } else {
+ if !strings.HasPrefix(cfg.ConnStr, "leveldb://") {
+ return "", nil, fmt.Errorf("invalid leveldb connection string: %q", cfg.ConnStr)
+ }
+ conn = cfg.ConnStr
+ }
+ for i := 0; i < 10; i++ {
+ if db, err = nosql.GetManager().GetLevelDB(conn); err == nil {
+ break
+ }
+ time.Sleep(1 * time.Second)
+ }
+ return conn, db, err
+}
diff --git a/modules/queue/base_levelqueue_test.go b/modules/queue/base_levelqueue_test.go
new file mode 100644
index 00000000..b65b570c
--- /dev/null
+++ b/modules/queue/base_levelqueue_test.go
@@ -0,0 +1,78 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "testing"
+
+ "code.gitea.io/gitea/modules/queue/lqinternal"
+ "code.gitea.io/gitea/modules/setting"
+
+ "gitea.com/lunny/levelqueue"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+ "github.com/syndtr/goleveldb/leveldb"
+)
+
+func TestBaseLevelDB(t *testing.T) {
+ _, err := newBaseLevelQueueGeneric(&BaseConfig{ConnStr: "redis://"}, false)
+ require.ErrorContains(t, err, "invalid leveldb connection string")
+
+ _, err = newBaseLevelQueueGeneric(&BaseConfig{DataFullDir: "relative"}, false)
+ require.ErrorContains(t, err, "invalid leveldb data dir")
+
+ testQueueBasic(t, newBaseLevelQueueSimple, toBaseConfig("baseLevelQueue", setting.QueueSettings{Datadir: t.TempDir() + "/queue-test", Length: 10}), false)
+ testQueueBasic(t, newBaseLevelQueueUnique, toBaseConfig("baseLevelQueueUnique", setting.QueueSettings{ConnStr: "leveldb://" + t.TempDir() + "/queue-test", Length: 10}), true)
+}
+
+func TestCorruptedLevelQueue(t *testing.T) {
+ // sometimes the levelqueue could be in a corrupted state, this test is to make sure it can recover from it
+ dbDir := t.TempDir() + "/levelqueue-test"
+ db, err := leveldb.OpenFile(dbDir, nil)
+ require.NoError(t, err)
+
+ defer db.Close()
+
+ require.NoError(t, db.Put([]byte("other-key"), []byte("other-value"), nil))
+
+ nameQueuePrefix := []byte("queue_name")
+ nameSetPrefix := []byte("set_name")
+ lq, err := levelqueue.NewUniqueQueue(db, nameQueuePrefix, nameSetPrefix, false)
+ require.NoError(t, err)
+ require.NoError(t, lq.RPush([]byte("item-1")))
+
+ itemKey := lqinternal.QueueItemKeyBytes(nameQueuePrefix, 1)
+ itemValue, err := db.Get(itemKey, nil)
+ require.NoError(t, err)
+ assert.Equal(t, []byte("item-1"), itemValue)
+
+ // there should be 5 keys in db: queue low, queue high, 1 queue item, 1 set item, and "other-key"
+ keys := lqinternal.ListLevelQueueKeys(db)
+ assert.Len(t, keys, 5)
+
+ // delete the queue item key, to corrupt the queue
+ require.NoError(t, db.Delete(itemKey, nil))
+ // now the queue is corrupted, it never works again
+ _, err = lq.LPop()
+ require.ErrorIs(t, err, levelqueue.ErrNotFound)
+ require.NoError(t, lq.Close())
+
+ // remove all the queue related keys to reset the queue
+ lqinternal.RemoveLevelQueueKeys(db, nameQueuePrefix)
+ lqinternal.RemoveLevelQueueKeys(db, nameSetPrefix)
+ // now there should be only 1 key in db: "other-key"
+ keys = lqinternal.ListLevelQueueKeys(db)
+ assert.Len(t, keys, 1)
+ assert.Equal(t, []byte("other-key"), keys[0])
+
+ // re-create a queue from db
+ lq, err = levelqueue.NewUniqueQueue(db, nameQueuePrefix, nameSetPrefix, false)
+ require.NoError(t, err)
+ require.NoError(t, lq.RPush([]byte("item-new-1")))
+ // now the queue works again
+ itemValue, err = lq.LPop()
+ require.NoError(t, err)
+ assert.Equal(t, []byte("item-new-1"), itemValue)
+ require.NoError(t, lq.Close())
+}
diff --git a/modules/queue/base_levelqueue_unique.go b/modules/queue/base_levelqueue_unique.go
new file mode 100644
index 00000000..968a4e98
--- /dev/null
+++ b/modules/queue/base_levelqueue_unique.go
@@ -0,0 +1,88 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "sync"
+ "sync/atomic"
+
+ "code.gitea.io/gitea/modules/nosql"
+ "code.gitea.io/gitea/modules/queue/lqinternal"
+
+ "gitea.com/lunny/levelqueue"
+ "github.com/syndtr/goleveldb/leveldb"
+)
+
+type baseLevelQueueUnique struct {
+ internal atomic.Pointer[levelqueue.UniqueQueue]
+
+ conn string
+ cfg *BaseConfig
+ db *leveldb.DB
+
+ mu sync.Mutex // the levelqueue.UniqueQueue is not thread-safe, there is no mutex protecting the underlying queue&set together
+}
+
+var _ baseQueue = (*baseLevelQueueUnique)(nil)
+
+func newBaseLevelQueueUnique(cfg *BaseConfig) (baseQueue, error) {
+ conn, db, err := prepareLevelDB(cfg)
+ if err != nil {
+ return nil, err
+ }
+ q := &baseLevelQueueUnique{conn: conn, cfg: cfg, db: db}
+ lq, err := levelqueue.NewUniqueQueue(db, []byte(cfg.QueueFullName), []byte(cfg.SetFullName), false)
+ if err != nil {
+ return nil, err
+ }
+ q.internal.Store(lq)
+ return q, nil
+}
+
+func (q *baseLevelQueueUnique) PushItem(ctx context.Context, data []byte) error {
+ c := baseLevelQueueCommon(q.cfg, &q.mu, func() baseLevelQueuePushPoper { return q.internal.Load() })
+ return c.PushItem(ctx, data)
+}
+
+func (q *baseLevelQueueUnique) PopItem(ctx context.Context) ([]byte, error) {
+ c := baseLevelQueueCommon(q.cfg, &q.mu, func() baseLevelQueuePushPoper { return q.internal.Load() })
+ return c.PopItem(ctx)
+}
+
+func (q *baseLevelQueueUnique) HasItem(ctx context.Context, data []byte) (bool, error) {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ return q.internal.Load().Has(data)
+}
+
+func (q *baseLevelQueueUnique) Len(ctx context.Context) (int, error) {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ return int(q.internal.Load().Len()), nil
+}
+
+func (q *baseLevelQueueUnique) Close() error {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ err := q.internal.Load().Close()
+ q.db = nil // the db is not managed by us, it's managed by the nosql manager
+ _ = nosql.GetManager().CloseLevelDB(q.conn)
+ return err
+}
+
+func (q *baseLevelQueueUnique) RemoveAll(ctx context.Context) error {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ lqinternal.RemoveLevelQueueKeys(q.db, []byte(q.cfg.QueueFullName))
+ lqinternal.RemoveLevelQueueKeys(q.db, []byte(q.cfg.SetFullName))
+ lq, err := levelqueue.NewUniqueQueue(q.db, []byte(q.cfg.QueueFullName), []byte(q.cfg.SetFullName), false)
+ if err != nil {
+ return err
+ }
+ old := q.internal.Load()
+ q.internal.Store(lq)
+ _ = old.Close() // Not ideal for concurrency. Luckily, the levelqueue only sets its db=nil because it doesn't manage the db, so far so good
+ return nil
+}
diff --git a/modules/queue/base_redis.go b/modules/queue/base_redis.go
new file mode 100644
index 00000000..14931b62
--- /dev/null
+++ b/modules/queue/base_redis.go
@@ -0,0 +1,162 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "sync"
+ "time"
+
+ "code.gitea.io/gitea/modules/graceful"
+ "code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/nosql"
+
+ "github.com/redis/go-redis/v9"
+)
+
+type baseRedis struct {
+ client redis.UniversalClient
+ isUnique bool
+ cfg *BaseConfig
+ prefix string
+
+ mu sync.Mutex // the old implementation is not thread-safe, the queue operation and set operation should be protected together
+}
+
+var _ baseQueue = (*baseRedis)(nil)
+
+func newBaseRedisGeneric(cfg *BaseConfig, unique bool, client redis.UniversalClient) (baseQueue, error) {
+ if client == nil {
+ client = nosql.GetManager().GetRedisClient(cfg.ConnStr)
+ }
+
+ prefix := ""
+ uri := nosql.ToRedisURI(cfg.ConnStr)
+
+ for key, value := range uri.Query() {
+ switch key {
+ case "prefix":
+ if len(value) > 0 {
+ prefix = value[0]
+
+ // As we are not checking any other values, if we found this one, we can
+ // exit from the loop.
+ // If a new key check is required, remove this break.
+ break
+ }
+ }
+ }
+
+ var err error
+ for i := 0; i < 10; i++ {
+ err = client.Ping(graceful.GetManager().ShutdownContext()).Err()
+ if err == nil {
+ break
+ }
+ log.Warn("Redis is not ready, waiting for 1 second to retry: %v", err)
+ time.Sleep(time.Second)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ return &baseRedis{cfg: cfg, client: client, isUnique: unique, prefix: prefix}, nil
+}
+
+func newBaseRedisSimple(cfg *BaseConfig) (baseQueue, error) {
+ return newBaseRedisGeneric(cfg, false, nil)
+}
+
+func newBaseRedisUnique(cfg *BaseConfig) (baseQueue, error) {
+ return newBaseRedisGeneric(cfg, true, nil)
+}
+
+func (q *baseRedis) prefixedName(name string) string {
+ return q.prefix + name
+}
+
+func (q *baseRedis) PushItem(ctx context.Context, data []byte) error {
+ return backoffErr(ctx, backoffBegin, backoffUpper, time.After(pushBlockTime), func() (retry bool, err error) {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+
+ cnt, err := q.client.LLen(ctx, q.prefixedName(q.cfg.QueueFullName)).Result()
+ if err != nil {
+ return false, err
+ }
+ if int(cnt) >= q.cfg.Length {
+ return true, nil
+ }
+
+ if q.isUnique {
+ added, err := q.client.SAdd(ctx, q.prefixedName(q.cfg.SetFullName), data).Result()
+ if err != nil {
+ return false, err
+ }
+ if added == 0 {
+ return false, ErrAlreadyInQueue
+ }
+ }
+ return false, q.client.RPush(ctx, q.prefixedName(q.cfg.QueueFullName), data).Err()
+ })
+}
+
+func (q *baseRedis) PopItem(ctx context.Context) ([]byte, error) {
+ return backoffRetErr(ctx, backoffBegin, backoffUpper, infiniteTimerC, func() (retry bool, data []byte, err error) {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+
+ data, err = q.client.LPop(ctx, q.prefixedName(q.cfg.QueueFullName)).Bytes()
+ if err == redis.Nil {
+ return true, nil, nil
+ }
+ if err != nil {
+ return true, nil, nil
+ }
+ if q.isUnique {
+ // the data has been popped, even if there is any error we can't do anything
+ _ = q.client.SRem(ctx, q.prefixedName(q.cfg.SetFullName), data).Err()
+ }
+ return false, data, err
+ })
+}
+
+func (q *baseRedis) HasItem(ctx context.Context, data []byte) (bool, error) {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ if !q.isUnique {
+ return false, nil
+ }
+ return q.client.SIsMember(ctx, q.prefixedName(q.cfg.SetFullName), data).Result()
+}
+
+func (q *baseRedis) Len(ctx context.Context) (int, error) {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ cnt, err := q.client.LLen(ctx, q.prefixedName(q.cfg.QueueFullName)).Result()
+ return int(cnt), err
+}
+
+func (q *baseRedis) Close() error {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+ return q.client.Close()
+}
+
+func (q *baseRedis) RemoveAll(ctx context.Context) error {
+ q.mu.Lock()
+ defer q.mu.Unlock()
+
+ c1 := q.client.Del(ctx, q.prefixedName(q.cfg.QueueFullName))
+ // the "set" must be cleared after the "list" because there is no transaction.
+ // it's better to have duplicate items than losing items.
+ c2 := q.client.Del(ctx, q.prefixedName(q.cfg.SetFullName))
+ if c1.Err() != nil {
+ return c1.Err()
+ }
+ if c2.Err() != nil {
+ return c2.Err()
+ }
+ return nil // actually, checking errors doesn't make sense here because the state could be out-of-sync
+}
diff --git a/modules/queue/base_redis_test.go b/modules/queue/base_redis_test.go
new file mode 100644
index 00000000..04e200c3
--- /dev/null
+++ b/modules/queue/base_redis_test.go
@@ -0,0 +1,138 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "testing"
+
+ "code.gitea.io/gitea/modules/queue/mock"
+ "code.gitea.io/gitea/modules/setting"
+
+ "github.com/redis/go-redis/v9"
+ "github.com/stretchr/testify/suite"
+ "go.uber.org/mock/gomock"
+)
+
+type baseRedisUnitTestSuite struct {
+ suite.Suite
+
+ mockController *gomock.Controller
+}
+
+func TestBaseRedis(t *testing.T) {
+ suite.Run(t, &baseRedisUnitTestSuite{})
+}
+
+func (suite *baseRedisUnitTestSuite) SetupSuite() {
+ suite.mockController = gomock.NewController(suite.T())
+}
+
+func (suite *baseRedisUnitTestSuite) TestBasic() {
+ queueName := "test-queue"
+ testCases := []struct {
+ Name string
+ ConnectionString string
+ QueueName string
+ Unique bool
+ }{
+ {
+ Name: "unique",
+ ConnectionString: "redis://127.0.0.1/0",
+ QueueName: queueName,
+ Unique: true,
+ },
+ {
+ Name: "non-unique",
+ ConnectionString: "redis://127.0.0.1/0",
+ QueueName: queueName,
+ Unique: false,
+ },
+ {
+ Name: "unique with prefix",
+ ConnectionString: "redis://127.0.0.1/0?prefix=forgejo:queue:",
+ QueueName: "forgejo:queue:" + queueName,
+ Unique: true,
+ },
+ {
+ Name: "non-unique with prefix",
+ ConnectionString: "redis://127.0.0.1/0?prefix=forgejo:queue:",
+ QueueName: "forgejo:queue:" + queueName,
+ Unique: false,
+ },
+ }
+
+ for _, testCase := range testCases {
+ suite.Run(testCase.Name, func() {
+ queueSettings := setting.QueueSettings{
+ Length: 10,
+ ConnStr: testCase.ConnectionString,
+ }
+
+ // Configure expectations.
+ mockRedisStore := mock.NewInMemoryMockRedis()
+ redisClient := mock.NewMockUniversalClient(suite.mockController)
+
+ redisClient.EXPECT().
+ Ping(gomock.Any()).
+ Times(1).
+ Return(&redis.StatusCmd{})
+ redisClient.EXPECT().
+ LLen(gomock.Any(), testCase.QueueName).
+ Times(1).
+ DoAndReturn(mockRedisStore.LLen)
+ redisClient.EXPECT().
+ LPop(gomock.Any(), testCase.QueueName).
+ Times(1).
+ DoAndReturn(mockRedisStore.LPop)
+ redisClient.EXPECT().
+ RPush(gomock.Any(), testCase.QueueName, gomock.Any()).
+ Times(1).
+ DoAndReturn(mockRedisStore.RPush)
+
+ if testCase.Unique {
+ redisClient.EXPECT().
+ SAdd(gomock.Any(), testCase.QueueName+"_unique", gomock.Any()).
+ Times(1).
+ DoAndReturn(mockRedisStore.SAdd)
+ redisClient.EXPECT().
+ SRem(gomock.Any(), testCase.QueueName+"_unique", gomock.Any()).
+ Times(1).
+ DoAndReturn(mockRedisStore.SRem)
+ redisClient.EXPECT().
+ SIsMember(gomock.Any(), testCase.QueueName+"_unique", gomock.Any()).
+ Times(2).
+ DoAndReturn(mockRedisStore.SIsMember)
+ }
+
+ client, err := newBaseRedisGeneric(
+ toBaseConfig(queueName, queueSettings),
+ testCase.Unique,
+ redisClient,
+ )
+ suite.Require().NoError(err)
+
+ ctx := context.Background()
+ expectedContent := []byte("test")
+
+ suite.Require().NoError(client.PushItem(ctx, expectedContent))
+
+ found, err := client.HasItem(ctx, expectedContent)
+ suite.Require().NoError(err)
+ if testCase.Unique {
+ suite.True(found)
+ } else {
+ suite.False(found)
+ }
+
+ found, err = client.HasItem(ctx, []byte("not found content"))
+ suite.Require().NoError(err)
+ suite.False(found)
+
+ content, err := client.PopItem(ctx)
+ suite.Require().NoError(err)
+ suite.Equal(expectedContent, content)
+ })
+ }
+}
diff --git a/modules/queue/base_redis_with_server_test.go b/modules/queue/base_redis_with_server_test.go
new file mode 100644
index 00000000..b73404f4
--- /dev/null
+++ b/modules/queue/base_redis_with_server_test.go
@@ -0,0 +1,133 @@
+package queue
+
+import (
+ "context"
+ "os"
+ "os/exec"
+ "testing"
+ "time"
+
+ "code.gitea.io/gitea/modules/nosql"
+ "code.gitea.io/gitea/modules/setting"
+
+ "github.com/stretchr/testify/suite"
+)
+
+const defaultTestRedisServer = "127.0.0.1:6379"
+
+type baseRedisWithServerTestSuite struct {
+ suite.Suite
+}
+
+func TestBaseRedisWithServer(t *testing.T) {
+ suite.Run(t, &baseRedisWithServerTestSuite{})
+}
+
+func (suite *baseRedisWithServerTestSuite) TestNormal() {
+ redisAddress := "redis://" + suite.testRedisHost() + "/0"
+ queueSettings := setting.QueueSettings{
+ Length: 10,
+ ConnStr: redisAddress,
+ }
+
+ redisServer, accessible := suite.startRedisServer(redisAddress)
+
+ // If it's accessible, but redisServer command is nil, that means we are using
+ // an already running redis server.
+ if redisServer == nil && !accessible {
+ suite.T().Skip("redis-server not found in Forgejo test yet")
+
+ return
+ }
+
+ defer func() {
+ if redisServer != nil {
+ _ = redisServer.Process.Signal(os.Interrupt)
+ _ = redisServer.Wait()
+ }
+ }()
+
+ testQueueBasic(suite.T(), newBaseRedisSimple, toBaseConfig("baseRedis", queueSettings), false)
+ testQueueBasic(suite.T(), newBaseRedisUnique, toBaseConfig("baseRedisUnique", queueSettings), true)
+}
+
+func (suite *baseRedisWithServerTestSuite) TestWithPrefix() {
+ redisAddress := "redis://" + suite.testRedisHost() + "/0?prefix=forgejo:queue:"
+ queueSettings := setting.QueueSettings{
+ Length: 10,
+ ConnStr: redisAddress,
+ }
+
+ redisServer, accessible := suite.startRedisServer(redisAddress)
+
+ // If it's accessible, but redisServer command is nil, that means we are using
+ // an already running redis server.
+ if redisServer == nil && !accessible {
+ suite.T().Skip("redis-server not found in Forgejo test yet")
+
+ return
+ }
+
+ defer func() {
+ if redisServer != nil {
+ _ = redisServer.Process.Signal(os.Interrupt)
+ _ = redisServer.Wait()
+ }
+ }()
+
+ testQueueBasic(suite.T(), newBaseRedisSimple, toBaseConfig("baseRedis", queueSettings), false)
+ testQueueBasic(suite.T(), newBaseRedisUnique, toBaseConfig("baseRedisUnique", queueSettings), true)
+}
+
+func (suite *baseRedisWithServerTestSuite) startRedisServer(address string) (*exec.Cmd, bool) {
+ var redisServer *exec.Cmd
+
+ if !suite.waitRedisReady(address, 0) {
+ redisServerProg, err := exec.LookPath("redis-server")
+ if err != nil {
+ return nil, false
+ }
+ redisServer = &exec.Cmd{
+ Path: redisServerProg,
+ Args: []string{redisServerProg, "--bind", "127.0.0.1", "--port", "6379"},
+ Dir: suite.T().TempDir(),
+ Stdin: os.Stdin,
+ Stdout: os.Stdout,
+ Stderr: os.Stderr,
+ }
+
+ suite.Require().NoError(redisServer.Start())
+
+ if !suite.True(suite.waitRedisReady(address, 5*time.Second), "start redis-server") {
+ // Return with redis server even if it's not available. It was started,
+ // even if it's not reachable for any reasons, it's still started, the
+ // parent will close it.
+ return redisServer, false
+ }
+ }
+
+ return redisServer, true
+}
+
+func (suite *baseRedisWithServerTestSuite) waitRedisReady(conn string, dur time.Duration) (ready bool) {
+ ctxTimed, cancel := context.WithTimeout(context.Background(), time.Second*5)
+ defer cancel()
+ for t := time.Now(); ; time.Sleep(50 * time.Millisecond) {
+ ret := nosql.GetManager().GetRedisClient(conn).Ping(ctxTimed)
+ if ret.Err() == nil {
+ return true
+ }
+ if time.Since(t) > dur {
+ return false
+ }
+ }
+}
+
+func (suite *baseRedisWithServerTestSuite) testRedisHost() string {
+ value := os.Getenv("TEST_REDIS_SERVER")
+ if value != "" {
+ return value
+ }
+
+ return defaultTestRedisServer
+}
diff --git a/modules/queue/base_test.go b/modules/queue/base_test.go
new file mode 100644
index 00000000..a5600fea
--- /dev/null
+++ b/modules/queue/base_test.go
@@ -0,0 +1,141 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "fmt"
+ "testing"
+ "time"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func testQueueBasic(t *testing.T, newFn func(cfg *BaseConfig) (baseQueue, error), cfg *BaseConfig, isUnique bool) {
+ t.Run(fmt.Sprintf("testQueueBasic-%s-unique:%v", cfg.ManagedName, isUnique), func(t *testing.T) {
+ q, err := newFn(cfg)
+ require.NoError(t, err)
+
+ ctx := context.Background()
+ _ = q.RemoveAll(ctx)
+ cnt, err := q.Len(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, 0, cnt)
+
+ // push the first item
+ err = q.PushItem(ctx, []byte("foo"))
+ require.NoError(t, err)
+
+ cnt, err = q.Len(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, 1, cnt)
+
+ // push a duplicate item
+ err = q.PushItem(ctx, []byte("foo"))
+ if !isUnique {
+ require.NoError(t, err)
+ } else {
+ require.ErrorIs(t, err, ErrAlreadyInQueue)
+ }
+
+ // check the duplicate item
+ cnt, err = q.Len(ctx)
+ require.NoError(t, err)
+ has, err := q.HasItem(ctx, []byte("foo"))
+ require.NoError(t, err)
+ if !isUnique {
+ assert.EqualValues(t, 2, cnt)
+ assert.False(t, has) // non-unique queues don't check for duplicates
+ } else {
+ assert.EqualValues(t, 1, cnt)
+ assert.True(t, has)
+ }
+
+ // push another item
+ err = q.PushItem(ctx, []byte("bar"))
+ require.NoError(t, err)
+
+ // pop the first item (and the duplicate if non-unique)
+ it, err := q.PopItem(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, "foo", string(it))
+
+ if !isUnique {
+ it, err = q.PopItem(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, "foo", string(it))
+ }
+
+ // pop another item
+ it, err = q.PopItem(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, "bar", string(it))
+
+ // pop an empty queue (timeout, cancel)
+ ctxTimed, cancel := context.WithTimeout(ctx, 10*time.Millisecond)
+ it, err = q.PopItem(ctxTimed)
+ require.ErrorIs(t, err, context.DeadlineExceeded)
+ assert.Nil(t, it)
+ cancel()
+
+ ctxTimed, cancel = context.WithTimeout(ctx, 10*time.Millisecond)
+ cancel()
+ it, err = q.PopItem(ctxTimed)
+ require.ErrorIs(t, err, context.Canceled)
+ assert.Nil(t, it)
+
+ // test blocking push if queue is full
+ for i := 0; i < cfg.Length; i++ {
+ err = q.PushItem(ctx, []byte(fmt.Sprintf("item-%d", i)))
+ require.NoError(t, err)
+ }
+ ctxTimed, cancel = context.WithTimeout(ctx, 10*time.Millisecond)
+ err = q.PushItem(ctxTimed, []byte("item-full"))
+ require.ErrorIs(t, err, context.DeadlineExceeded)
+ cancel()
+
+ // test blocking push if queue is full (with custom pushBlockTime)
+ oldPushBlockTime := pushBlockTime
+ timeStart := time.Now()
+ pushBlockTime = 30 * time.Millisecond
+ err = q.PushItem(ctx, []byte("item-full"))
+ require.ErrorIs(t, err, context.DeadlineExceeded)
+ assert.GreaterOrEqual(t, time.Since(timeStart), pushBlockTime*2/3)
+ pushBlockTime = oldPushBlockTime
+
+ // remove all
+ cnt, err = q.Len(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, cfg.Length, cnt)
+
+ _ = q.RemoveAll(ctx)
+
+ cnt, err = q.Len(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, 0, cnt)
+ })
+}
+
+func TestBaseDummy(t *testing.T) {
+ q, err := newBaseDummy(&BaseConfig{}, true)
+ require.NoError(t, err)
+
+ ctx := context.Background()
+ require.NoError(t, q.PushItem(ctx, []byte("foo")))
+
+ cnt, err := q.Len(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, 0, cnt)
+
+ has, err := q.HasItem(ctx, []byte("foo"))
+ require.NoError(t, err)
+ assert.False(t, has)
+
+ it, err := q.PopItem(ctx)
+ require.NoError(t, err)
+ assert.Nil(t, it)
+
+ require.NoError(t, q.RemoveAll(ctx))
+}
diff --git a/modules/queue/config.go b/modules/queue/config.go
new file mode 100644
index 00000000..c5bc16b6
--- /dev/null
+++ b/modules/queue/config.go
@@ -0,0 +1,36 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "code.gitea.io/gitea/modules/setting"
+)
+
+type BaseConfig struct {
+ ManagedName string
+ DataFullDir string // the caller must prepare an absolute path
+
+ ConnStr string
+ Length int
+
+ QueueFullName, SetFullName string
+}
+
+func toBaseConfig(managedName string, queueSetting setting.QueueSettings) *BaseConfig {
+ baseConfig := &BaseConfig{
+ ManagedName: managedName,
+ DataFullDir: queueSetting.Datadir,
+
+ ConnStr: queueSetting.ConnStr,
+ Length: queueSetting.Length,
+ }
+
+ // queue name and set name
+ baseConfig.QueueFullName = managedName + queueSetting.QueueName
+ baseConfig.SetFullName = baseConfig.QueueFullName + queueSetting.SetName
+ if baseConfig.SetFullName == baseConfig.QueueFullName {
+ baseConfig.SetFullName += "_unique"
+ }
+ return baseConfig
+}
diff --git a/modules/queue/lqinternal/lqinternal.go b/modules/queue/lqinternal/lqinternal.go
new file mode 100644
index 00000000..89aa4e59
--- /dev/null
+++ b/modules/queue/lqinternal/lqinternal.go
@@ -0,0 +1,48 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package lqinternal
+
+import (
+ "bytes"
+ "encoding/binary"
+
+ "github.com/syndtr/goleveldb/leveldb"
+ "github.com/syndtr/goleveldb/leveldb/opt"
+)
+
+func QueueItemIDBytes(id int64) []byte {
+ buf := make([]byte, 8)
+ binary.PutVarint(buf, id)
+ return buf
+}
+
+func QueueItemKeyBytes(prefix []byte, id int64) []byte {
+ key := make([]byte, len(prefix), len(prefix)+1+8)
+ copy(key, prefix)
+ key = append(key, '-')
+ return append(key, QueueItemIDBytes(id)...)
+}
+
+func RemoveLevelQueueKeys(db *leveldb.DB, namePrefix []byte) {
+ keyPrefix := make([]byte, len(namePrefix)+1)
+ copy(keyPrefix, namePrefix)
+ keyPrefix[len(namePrefix)] = '-'
+
+ it := db.NewIterator(nil, &opt.ReadOptions{Strict: opt.NoStrict})
+ defer it.Release()
+ for it.Next() {
+ if bytes.HasPrefix(it.Key(), keyPrefix) {
+ _ = db.Delete(it.Key(), nil)
+ }
+ }
+}
+
+func ListLevelQueueKeys(db *leveldb.DB) (res [][]byte) {
+ it := db.NewIterator(nil, &opt.ReadOptions{Strict: opt.NoStrict})
+ defer it.Release()
+ for it.Next() {
+ res = append(res, it.Key())
+ }
+ return res
+}
diff --git a/modules/queue/manager.go b/modules/queue/manager.go
new file mode 100644
index 00000000..8b964c0c
--- /dev/null
+++ b/modules/queue/manager.go
@@ -0,0 +1,113 @@
+// Copyright 2019 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "sync"
+ "time"
+
+ "code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/setting"
+)
+
+// Manager is a manager for the queues created by "CreateXxxQueue" functions, these queues are called "managed queues".
+type Manager struct {
+ mu sync.Mutex
+
+ qidCounter int64
+ Queues map[int64]ManagedWorkerPoolQueue
+}
+
+type ManagedWorkerPoolQueue interface {
+ GetName() string
+ GetType() string
+ GetItemTypeName() string
+ GetWorkerNumber() int
+ GetWorkerActiveNumber() int
+ GetWorkerMaxNumber() int
+ SetWorkerMaxNumber(num int)
+ GetQueueItemNumber() int
+
+ // FlushWithContext tries to make the handler process all items in the queue synchronously.
+ // It is for testing purpose only. It's not designed to be used in a cluster.
+ FlushWithContext(ctx context.Context, timeout time.Duration) error
+
+ // RemoveAllItems removes all items in the base queue (on-the-fly items are not affected)
+ RemoveAllItems(ctx context.Context) error
+}
+
+var manager *Manager
+
+func init() {
+ manager = &Manager{
+ Queues: make(map[int64]ManagedWorkerPoolQueue),
+ }
+}
+
+func GetManager() *Manager {
+ return manager
+}
+
+func (m *Manager) AddManagedQueue(managed ManagedWorkerPoolQueue) {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+ m.qidCounter++
+ m.Queues[m.qidCounter] = managed
+}
+
+func (m *Manager) GetManagedQueue(qid int64) ManagedWorkerPoolQueue {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+ return m.Queues[qid]
+}
+
+func (m *Manager) ManagedQueues() map[int64]ManagedWorkerPoolQueue {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+
+ queues := make(map[int64]ManagedWorkerPoolQueue, len(m.Queues))
+ for k, v := range m.Queues {
+ queues[k] = v
+ }
+ return queues
+}
+
+// FlushAll tries to make all managed queues process all items synchronously, until timeout or the queue is empty.
+// It is for testing purpose only. It's not designed to be used in a cluster.
+func (m *Manager) FlushAll(ctx context.Context, timeout time.Duration) error {
+ var finalErr error
+ qs := m.ManagedQueues()
+ for _, q := range qs {
+ if err := q.FlushWithContext(ctx, timeout); err != nil {
+ finalErr = err // TODO: in Go 1.20: errors.Join
+ }
+ }
+ return finalErr
+}
+
+// CreateSimpleQueue creates a simple queue from global setting config provider by name
+func CreateSimpleQueue[T any](ctx context.Context, name string, handler HandlerFuncT[T]) *WorkerPoolQueue[T] {
+ return createWorkerPoolQueue(ctx, name, setting.CfgProvider, handler, false)
+}
+
+// CreateUniqueQueue creates a unique queue from global setting config provider by name
+func CreateUniqueQueue[T any](ctx context.Context, name string, handler HandlerFuncT[T]) *WorkerPoolQueue[T] {
+ return createWorkerPoolQueue(ctx, name, setting.CfgProvider, handler, true)
+}
+
+func createWorkerPoolQueue[T any](ctx context.Context, name string, cfgProvider setting.ConfigProvider, handler HandlerFuncT[T], unique bool) *WorkerPoolQueue[T] {
+ queueSetting, err := setting.GetQueueSettings(cfgProvider, name)
+ if err != nil {
+ log.Error("Failed to get queue settings for %q: %v", name, err)
+ return nil
+ }
+ w, err := NewWorkerPoolQueueWithContext(ctx, name, queueSetting, handler, unique)
+ if err != nil {
+ log.Error("Failed to create queue %q: %v", name, err)
+ return nil
+ }
+ GetManager().AddManagedQueue(w)
+ return w
+}
diff --git a/modules/queue/manager_test.go b/modules/queue/manager_test.go
new file mode 100644
index 00000000..a76c2387
--- /dev/null
+++ b/modules/queue/manager_test.go
@@ -0,0 +1,125 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "path/filepath"
+ "testing"
+
+ "code.gitea.io/gitea/modules/setting"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestManager(t *testing.T) {
+ oldAppDataPath := setting.AppDataPath
+ setting.AppDataPath = t.TempDir()
+ defer func() {
+ setting.AppDataPath = oldAppDataPath
+ }()
+
+ newQueueFromConfig := func(name, cfg string) (*WorkerPoolQueue[int], error) {
+ cfgProvider, err := setting.NewConfigProviderFromData(cfg)
+ if err != nil {
+ return nil, err
+ }
+ qs, err := setting.GetQueueSettings(cfgProvider, name)
+ if err != nil {
+ return nil, err
+ }
+ return newWorkerPoolQueueForTest(name, qs, func(s ...int) (unhandled []int) { return nil }, false)
+ }
+
+ // test invalid CONN_STR
+ _, err := newQueueFromConfig("default", `
+[queue]
+DATADIR = temp-dir
+CONN_STR = redis://
+`)
+ require.ErrorContains(t, err, "invalid leveldb connection string")
+
+ // test default config
+ q, err := newQueueFromConfig("default", "")
+ require.NoError(t, err)
+ assert.Equal(t, "default", q.GetName())
+ assert.Equal(t, "level", q.GetType())
+ assert.Equal(t, filepath.Join(setting.AppDataPath, "queues/common"), q.baseConfig.DataFullDir)
+ assert.Equal(t, 100000, q.baseConfig.Length)
+ assert.Equal(t, 20, q.batchLength)
+ assert.Equal(t, "", q.baseConfig.ConnStr)
+ assert.Equal(t, "default_queue", q.baseConfig.QueueFullName)
+ assert.Equal(t, "default_queue_unique", q.baseConfig.SetFullName)
+ assert.NotZero(t, q.GetWorkerMaxNumber())
+ assert.Equal(t, 0, q.GetWorkerNumber())
+ assert.Equal(t, 0, q.GetWorkerActiveNumber())
+ assert.Equal(t, 0, q.GetQueueItemNumber())
+ assert.Equal(t, "int", q.GetItemTypeName())
+
+ // test inherited config
+ cfgProvider, err := setting.NewConfigProviderFromData(`
+[queue]
+TYPE = channel
+DATADIR = queues/dir1
+LENGTH = 100
+BATCH_LENGTH = 20
+CONN_STR = "addrs=127.0.0.1:6379 db=0"
+QUEUE_NAME = _queue1
+
+[queue.sub]
+TYPE = level
+DATADIR = queues/dir2
+LENGTH = 102
+BATCH_LENGTH = 22
+CONN_STR =
+QUEUE_NAME = _q2
+SET_NAME = _u2
+MAX_WORKERS = 123
+`)
+
+ require.NoError(t, err)
+
+ q1 := createWorkerPoolQueue[string](context.Background(), "no-such", cfgProvider, nil, false)
+ assert.Equal(t, "no-such", q1.GetName())
+ assert.Equal(t, "dummy", q1.GetType()) // no handler, so it becomes dummy
+ assert.Equal(t, filepath.Join(setting.AppDataPath, "queues/dir1"), q1.baseConfig.DataFullDir)
+ assert.Equal(t, 100, q1.baseConfig.Length)
+ assert.Equal(t, 20, q1.batchLength)
+ assert.Equal(t, "addrs=127.0.0.1:6379 db=0", q1.baseConfig.ConnStr)
+ assert.Equal(t, "no-such_queue1", q1.baseConfig.QueueFullName)
+ assert.Equal(t, "no-such_queue1_unique", q1.baseConfig.SetFullName)
+ assert.NotZero(t, q1.GetWorkerMaxNumber())
+ assert.Equal(t, 0, q1.GetWorkerNumber())
+ assert.Equal(t, 0, q1.GetWorkerActiveNumber())
+ assert.Equal(t, 0, q1.GetQueueItemNumber())
+ assert.Equal(t, "string", q1.GetItemTypeName())
+ qid1 := GetManager().qidCounter
+
+ q2 := createWorkerPoolQueue(context.Background(), "sub", cfgProvider, func(s ...int) (unhandled []int) { return nil }, false)
+ assert.Equal(t, "sub", q2.GetName())
+ assert.Equal(t, "level", q2.GetType())
+ assert.Equal(t, filepath.Join(setting.AppDataPath, "queues/dir2"), q2.baseConfig.DataFullDir)
+ assert.Equal(t, 102, q2.baseConfig.Length)
+ assert.Equal(t, 22, q2.batchLength)
+ assert.Equal(t, "", q2.baseConfig.ConnStr)
+ assert.Equal(t, "sub_q2", q2.baseConfig.QueueFullName)
+ assert.Equal(t, "sub_q2_u2", q2.baseConfig.SetFullName)
+ assert.Equal(t, 123, q2.GetWorkerMaxNumber())
+ assert.Equal(t, 0, q2.GetWorkerNumber())
+ assert.Equal(t, 0, q2.GetWorkerActiveNumber())
+ assert.Equal(t, 0, q2.GetQueueItemNumber())
+ assert.Equal(t, "int", q2.GetItemTypeName())
+ qid2 := GetManager().qidCounter
+
+ assert.Equal(t, q1, GetManager().ManagedQueues()[qid1])
+
+ GetManager().GetManagedQueue(qid1).SetWorkerMaxNumber(120)
+ assert.Equal(t, 120, q1.workerMaxNum)
+
+ stop := runWorkerPoolQueue(q2)
+ require.NoError(t, GetManager().GetManagedQueue(qid2).FlushWithContext(context.Background(), 0))
+ require.NoError(t, GetManager().FlushAll(context.Background(), 0))
+ stop()
+}
diff --git a/modules/queue/mock/inmemorymockredis.go b/modules/queue/mock/inmemorymockredis.go
new file mode 100644
index 00000000..de8bd8a0
--- /dev/null
+++ b/modules/queue/mock/inmemorymockredis.go
@@ -0,0 +1,133 @@
+package mock
+
+import (
+ "context"
+ "errors"
+
+ redis "github.com/redis/go-redis/v9"
+)
+
+// InMemoryMockRedis is a very primitive in-memory redis-like feature. The main
+// purpose of this struct is to give some backend to mocked unit tests.
+type InMemoryMockRedis struct {
+ queues map[string][][]byte
+}
+
+func NewInMemoryMockRedis() InMemoryMockRedis {
+ return InMemoryMockRedis{
+ queues: map[string][][]byte{},
+ }
+}
+
+func (r *InMemoryMockRedis) LLen(ctx context.Context, key string) *redis.IntCmd {
+ cmd := redis.NewIntCmd(ctx)
+ cmd.SetVal(int64(len(r.queues[key])))
+ return cmd
+}
+
+func (r *InMemoryMockRedis) SAdd(ctx context.Context, key string, content []byte) *redis.IntCmd {
+ cmd := redis.NewIntCmd(ctx)
+
+ for _, value := range r.queues[key] {
+ if string(value) == string(content) {
+ cmd.SetVal(0)
+
+ return cmd
+ }
+ }
+
+ r.queues[key] = append(r.queues[key], content)
+
+ cmd.SetVal(1)
+
+ return cmd
+}
+
+func (r *InMemoryMockRedis) RPush(ctx context.Context, key string, content []byte) *redis.IntCmd {
+ cmd := redis.NewIntCmd(ctx)
+
+ r.queues[key] = append(r.queues[key], content)
+
+ cmd.SetVal(1)
+
+ return cmd
+}
+
+func (r *InMemoryMockRedis) LPop(ctx context.Context, key string) *redis.StringCmd {
+ cmd := redis.NewStringCmd(ctx)
+
+ queue, found := r.queues[key]
+ if !found {
+ cmd.SetErr(errors.New("queue not found"))
+
+ return cmd
+ }
+
+ if len(queue) < 1 {
+ cmd.SetErr(errors.New("queue is empty"))
+
+ return cmd
+ }
+
+ value, rest := queue[0], queue[1:]
+
+ r.queues[key] = rest
+
+ cmd.SetVal(string(value))
+
+ return cmd
+}
+
+func (r *InMemoryMockRedis) SRem(ctx context.Context, key string, content []byte) *redis.IntCmd {
+ cmd := redis.NewIntCmd(ctx)
+
+ queue, found := r.queues[key]
+ if !found {
+ cmd.SetErr(errors.New("queue not found"))
+
+ return cmd
+ }
+
+ if len(queue) < 1 {
+ cmd.SetErr(errors.New("queue is empty"))
+
+ return cmd
+ }
+
+ newList := [][]byte{}
+
+ for _, value := range queue {
+ if string(value) != string(content) {
+ newList = append(newList, value)
+ }
+ }
+
+ r.queues[key] = newList
+
+ cmd.SetVal(1)
+
+ return cmd
+}
+
+func (r *InMemoryMockRedis) SIsMember(ctx context.Context, key string, content []byte) *redis.BoolCmd {
+ cmd := redis.NewBoolCmd(ctx)
+
+ queue, found := r.queues[key]
+ if !found {
+ cmd.SetErr(errors.New("queue not found"))
+
+ return cmd
+ }
+
+ for _, value := range queue {
+ if string(value) == string(content) {
+ cmd.SetVal(true)
+
+ return cmd
+ }
+ }
+
+ cmd.SetVal(false)
+
+ return cmd
+}
diff --git a/modules/queue/mock/redisuniversalclient.go b/modules/queue/mock/redisuniversalclient.go
new file mode 100644
index 00000000..95e6f6d5
--- /dev/null
+++ b/modules/queue/mock/redisuniversalclient.go
@@ -0,0 +1,7201 @@
+// Code generated by MockGen. DO NOT EDIT.
+// Source: github.com/redis/go-redis/v9 (interfaces: UniversalClient)
+//
+// Generated by this command:
+//
+// mockgen -package mock -destination ./modules/queue/mock/redisuniversalclient.go github.com/redis/go-redis/v9 UniversalClient
+//
+
+// Package mock is a generated GoMock package.
+package mock
+
+import (
+ context "context"
+ reflect "reflect"
+ time "time"
+
+ redis "github.com/redis/go-redis/v9"
+ gomock "go.uber.org/mock/gomock"
+)
+
+// MockUniversalClient is a mock of UniversalClient interface.
+type MockUniversalClient struct {
+ ctrl *gomock.Controller
+ recorder *MockUniversalClientMockRecorder
+}
+
+// MockUniversalClientMockRecorder is the mock recorder for MockUniversalClient.
+type MockUniversalClientMockRecorder struct {
+ mock *MockUniversalClient
+}
+
+// NewMockUniversalClient creates a new mock instance.
+func NewMockUniversalClient(ctrl *gomock.Controller) *MockUniversalClient {
+ mock := &MockUniversalClient{ctrl: ctrl}
+ mock.recorder = &MockUniversalClientMockRecorder{mock}
+ return mock
+}
+
+// EXPECT returns an object that allows the caller to indicate expected use.
+func (m *MockUniversalClient) EXPECT() *MockUniversalClientMockRecorder {
+ return m.recorder
+}
+
+// ACLDryRun mocks base method.
+func (m *MockUniversalClient) ACLDryRun(arg0 context.Context, arg1 string, arg2 ...any) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ACLDryRun", varargs...)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// ACLDryRun indicates an expected call of ACLDryRun.
+func (mr *MockUniversalClientMockRecorder) ACLDryRun(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ACLDryRun", reflect.TypeOf((*MockUniversalClient)(nil).ACLDryRun), varargs...)
+}
+
+// ACLLog mocks base method.
+func (m *MockUniversalClient) ACLLog(arg0 context.Context, arg1 int64) *redis.ACLLogCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ACLLog", arg0, arg1)
+ ret0, _ := ret[0].(*redis.ACLLogCmd)
+ return ret0
+}
+
+// ACLLog indicates an expected call of ACLLog.
+func (mr *MockUniversalClientMockRecorder) ACLLog(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ACLLog", reflect.TypeOf((*MockUniversalClient)(nil).ACLLog), arg0, arg1)
+}
+
+// ACLLogReset mocks base method.
+func (m *MockUniversalClient) ACLLogReset(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ACLLogReset", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ACLLogReset indicates an expected call of ACLLogReset.
+func (mr *MockUniversalClientMockRecorder) ACLLogReset(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ACLLogReset", reflect.TypeOf((*MockUniversalClient)(nil).ACLLogReset), arg0)
+}
+
+// AddHook mocks base method.
+func (m *MockUniversalClient) AddHook(arg0 redis.Hook) {
+ m.ctrl.T.Helper()
+ m.ctrl.Call(m, "AddHook", arg0)
+}
+
+// AddHook indicates an expected call of AddHook.
+func (mr *MockUniversalClientMockRecorder) AddHook(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddHook", reflect.TypeOf((*MockUniversalClient)(nil).AddHook), arg0)
+}
+
+// Append mocks base method.
+func (m *MockUniversalClient) Append(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Append", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// Append indicates an expected call of Append.
+func (mr *MockUniversalClientMockRecorder) Append(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Append", reflect.TypeOf((*MockUniversalClient)(nil).Append), arg0, arg1, arg2)
+}
+
+// BFAdd mocks base method.
+func (m *MockUniversalClient) BFAdd(arg0 context.Context, arg1 string, arg2 any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFAdd", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// BFAdd indicates an expected call of BFAdd.
+func (mr *MockUniversalClientMockRecorder) BFAdd(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFAdd", reflect.TypeOf((*MockUniversalClient)(nil).BFAdd), arg0, arg1, arg2)
+}
+
+// BFCard mocks base method.
+func (m *MockUniversalClient) BFCard(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFCard", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// BFCard indicates an expected call of BFCard.
+func (mr *MockUniversalClientMockRecorder) BFCard(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFCard", reflect.TypeOf((*MockUniversalClient)(nil).BFCard), arg0, arg1)
+}
+
+// BFExists mocks base method.
+func (m *MockUniversalClient) BFExists(arg0 context.Context, arg1 string, arg2 any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFExists", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// BFExists indicates an expected call of BFExists.
+func (mr *MockUniversalClientMockRecorder) BFExists(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFExists", reflect.TypeOf((*MockUniversalClient)(nil).BFExists), arg0, arg1, arg2)
+}
+
+// BFInfo mocks base method.
+func (m *MockUniversalClient) BFInfo(arg0 context.Context, arg1 string) *redis.BFInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFInfo", arg0, arg1)
+ ret0, _ := ret[0].(*redis.BFInfoCmd)
+ return ret0
+}
+
+// BFInfo indicates an expected call of BFInfo.
+func (mr *MockUniversalClientMockRecorder) BFInfo(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFInfo", reflect.TypeOf((*MockUniversalClient)(nil).BFInfo), arg0, arg1)
+}
+
+// BFInfoArg mocks base method.
+func (m *MockUniversalClient) BFInfoArg(arg0 context.Context, arg1, arg2 string) *redis.BFInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFInfoArg", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BFInfoCmd)
+ return ret0
+}
+
+// BFInfoArg indicates an expected call of BFInfoArg.
+func (mr *MockUniversalClientMockRecorder) BFInfoArg(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFInfoArg", reflect.TypeOf((*MockUniversalClient)(nil).BFInfoArg), arg0, arg1, arg2)
+}
+
+// BFInfoCapacity mocks base method.
+func (m *MockUniversalClient) BFInfoCapacity(arg0 context.Context, arg1 string) *redis.BFInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFInfoCapacity", arg0, arg1)
+ ret0, _ := ret[0].(*redis.BFInfoCmd)
+ return ret0
+}
+
+// BFInfoCapacity indicates an expected call of BFInfoCapacity.
+func (mr *MockUniversalClientMockRecorder) BFInfoCapacity(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFInfoCapacity", reflect.TypeOf((*MockUniversalClient)(nil).BFInfoCapacity), arg0, arg1)
+}
+
+// BFInfoExpansion mocks base method.
+func (m *MockUniversalClient) BFInfoExpansion(arg0 context.Context, arg1 string) *redis.BFInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFInfoExpansion", arg0, arg1)
+ ret0, _ := ret[0].(*redis.BFInfoCmd)
+ return ret0
+}
+
+// BFInfoExpansion indicates an expected call of BFInfoExpansion.
+func (mr *MockUniversalClientMockRecorder) BFInfoExpansion(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFInfoExpansion", reflect.TypeOf((*MockUniversalClient)(nil).BFInfoExpansion), arg0, arg1)
+}
+
+// BFInfoFilters mocks base method.
+func (m *MockUniversalClient) BFInfoFilters(arg0 context.Context, arg1 string) *redis.BFInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFInfoFilters", arg0, arg1)
+ ret0, _ := ret[0].(*redis.BFInfoCmd)
+ return ret0
+}
+
+// BFInfoFilters indicates an expected call of BFInfoFilters.
+func (mr *MockUniversalClientMockRecorder) BFInfoFilters(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFInfoFilters", reflect.TypeOf((*MockUniversalClient)(nil).BFInfoFilters), arg0, arg1)
+}
+
+// BFInfoItems mocks base method.
+func (m *MockUniversalClient) BFInfoItems(arg0 context.Context, arg1 string) *redis.BFInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFInfoItems", arg0, arg1)
+ ret0, _ := ret[0].(*redis.BFInfoCmd)
+ return ret0
+}
+
+// BFInfoItems indicates an expected call of BFInfoItems.
+func (mr *MockUniversalClientMockRecorder) BFInfoItems(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFInfoItems", reflect.TypeOf((*MockUniversalClient)(nil).BFInfoItems), arg0, arg1)
+}
+
+// BFInfoSize mocks base method.
+func (m *MockUniversalClient) BFInfoSize(arg0 context.Context, arg1 string) *redis.BFInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFInfoSize", arg0, arg1)
+ ret0, _ := ret[0].(*redis.BFInfoCmd)
+ return ret0
+}
+
+// BFInfoSize indicates an expected call of BFInfoSize.
+func (mr *MockUniversalClientMockRecorder) BFInfoSize(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFInfoSize", reflect.TypeOf((*MockUniversalClient)(nil).BFInfoSize), arg0, arg1)
+}
+
+// BFInsert mocks base method.
+func (m *MockUniversalClient) BFInsert(arg0 context.Context, arg1 string, arg2 *redis.BFInsertOptions, arg3 ...any) *redis.BoolSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BFInsert", varargs...)
+ ret0, _ := ret[0].(*redis.BoolSliceCmd)
+ return ret0
+}
+
+// BFInsert indicates an expected call of BFInsert.
+func (mr *MockUniversalClientMockRecorder) BFInsert(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFInsert", reflect.TypeOf((*MockUniversalClient)(nil).BFInsert), varargs...)
+}
+
+// BFLoadChunk mocks base method.
+func (m *MockUniversalClient) BFLoadChunk(arg0 context.Context, arg1 string, arg2 int64, arg3 any) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFLoadChunk", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// BFLoadChunk indicates an expected call of BFLoadChunk.
+func (mr *MockUniversalClientMockRecorder) BFLoadChunk(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFLoadChunk", reflect.TypeOf((*MockUniversalClient)(nil).BFLoadChunk), arg0, arg1, arg2, arg3)
+}
+
+// BFMAdd mocks base method.
+func (m *MockUniversalClient) BFMAdd(arg0 context.Context, arg1 string, arg2 ...any) *redis.BoolSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BFMAdd", varargs...)
+ ret0, _ := ret[0].(*redis.BoolSliceCmd)
+ return ret0
+}
+
+// BFMAdd indicates an expected call of BFMAdd.
+func (mr *MockUniversalClientMockRecorder) BFMAdd(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFMAdd", reflect.TypeOf((*MockUniversalClient)(nil).BFMAdd), varargs...)
+}
+
+// BFMExists mocks base method.
+func (m *MockUniversalClient) BFMExists(arg0 context.Context, arg1 string, arg2 ...any) *redis.BoolSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BFMExists", varargs...)
+ ret0, _ := ret[0].(*redis.BoolSliceCmd)
+ return ret0
+}
+
+// BFMExists indicates an expected call of BFMExists.
+func (mr *MockUniversalClientMockRecorder) BFMExists(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFMExists", reflect.TypeOf((*MockUniversalClient)(nil).BFMExists), varargs...)
+}
+
+// BFReserve mocks base method.
+func (m *MockUniversalClient) BFReserve(arg0 context.Context, arg1 string, arg2 float64, arg3 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFReserve", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// BFReserve indicates an expected call of BFReserve.
+func (mr *MockUniversalClientMockRecorder) BFReserve(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFReserve", reflect.TypeOf((*MockUniversalClient)(nil).BFReserve), arg0, arg1, arg2, arg3)
+}
+
+// BFReserveExpansion mocks base method.
+func (m *MockUniversalClient) BFReserveExpansion(arg0 context.Context, arg1 string, arg2 float64, arg3, arg4 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFReserveExpansion", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// BFReserveExpansion indicates an expected call of BFReserveExpansion.
+func (mr *MockUniversalClientMockRecorder) BFReserveExpansion(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFReserveExpansion", reflect.TypeOf((*MockUniversalClient)(nil).BFReserveExpansion), arg0, arg1, arg2, arg3, arg4)
+}
+
+// BFReserveNonScaling mocks base method.
+func (m *MockUniversalClient) BFReserveNonScaling(arg0 context.Context, arg1 string, arg2 float64, arg3 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFReserveNonScaling", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// BFReserveNonScaling indicates an expected call of BFReserveNonScaling.
+func (mr *MockUniversalClientMockRecorder) BFReserveNonScaling(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFReserveNonScaling", reflect.TypeOf((*MockUniversalClient)(nil).BFReserveNonScaling), arg0, arg1, arg2, arg3)
+}
+
+// BFReserveWithArgs mocks base method.
+func (m *MockUniversalClient) BFReserveWithArgs(arg0 context.Context, arg1 string, arg2 *redis.BFReserveOptions) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFReserveWithArgs", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// BFReserveWithArgs indicates an expected call of BFReserveWithArgs.
+func (mr *MockUniversalClientMockRecorder) BFReserveWithArgs(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFReserveWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).BFReserveWithArgs), arg0, arg1, arg2)
+}
+
+// BFScanDump mocks base method.
+func (m *MockUniversalClient) BFScanDump(arg0 context.Context, arg1 string, arg2 int64) *redis.ScanDumpCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BFScanDump", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.ScanDumpCmd)
+ return ret0
+}
+
+// BFScanDump indicates an expected call of BFScanDump.
+func (mr *MockUniversalClientMockRecorder) BFScanDump(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BFScanDump", reflect.TypeOf((*MockUniversalClient)(nil).BFScanDump), arg0, arg1, arg2)
+}
+
+// BLMPop mocks base method.
+func (m *MockUniversalClient) BLMPop(arg0 context.Context, arg1 time.Duration, arg2 string, arg3 int64, arg4 ...string) *redis.KeyValuesCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2, arg3}
+ for _, a := range arg4 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BLMPop", varargs...)
+ ret0, _ := ret[0].(*redis.KeyValuesCmd)
+ return ret0
+}
+
+// BLMPop indicates an expected call of BLMPop.
+func (mr *MockUniversalClientMockRecorder) BLMPop(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BLMPop", reflect.TypeOf((*MockUniversalClient)(nil).BLMPop), varargs...)
+}
+
+// BLMove mocks base method.
+func (m *MockUniversalClient) BLMove(arg0 context.Context, arg1, arg2, arg3, arg4 string, arg5 time.Duration) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BLMove", arg0, arg1, arg2, arg3, arg4, arg5)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// BLMove indicates an expected call of BLMove.
+func (mr *MockUniversalClientMockRecorder) BLMove(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BLMove", reflect.TypeOf((*MockUniversalClient)(nil).BLMove), arg0, arg1, arg2, arg3, arg4, arg5)
+}
+
+// BLPop mocks base method.
+func (m *MockUniversalClient) BLPop(arg0 context.Context, arg1 time.Duration, arg2 ...string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BLPop", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// BLPop indicates an expected call of BLPop.
+func (mr *MockUniversalClientMockRecorder) BLPop(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BLPop", reflect.TypeOf((*MockUniversalClient)(nil).BLPop), varargs...)
+}
+
+// BRPop mocks base method.
+func (m *MockUniversalClient) BRPop(arg0 context.Context, arg1 time.Duration, arg2 ...string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BRPop", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// BRPop indicates an expected call of BRPop.
+func (mr *MockUniversalClientMockRecorder) BRPop(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BRPop", reflect.TypeOf((*MockUniversalClient)(nil).BRPop), varargs...)
+}
+
+// BRPopLPush mocks base method.
+func (m *MockUniversalClient) BRPopLPush(arg0 context.Context, arg1, arg2 string, arg3 time.Duration) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BRPopLPush", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// BRPopLPush indicates an expected call of BRPopLPush.
+func (mr *MockUniversalClientMockRecorder) BRPopLPush(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BRPopLPush", reflect.TypeOf((*MockUniversalClient)(nil).BRPopLPush), arg0, arg1, arg2, arg3)
+}
+
+// BZMPop mocks base method.
+func (m *MockUniversalClient) BZMPop(arg0 context.Context, arg1 time.Duration, arg2 string, arg3 int64, arg4 ...string) *redis.ZSliceWithKeyCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2, arg3}
+ for _, a := range arg4 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BZMPop", varargs...)
+ ret0, _ := ret[0].(*redis.ZSliceWithKeyCmd)
+ return ret0
+}
+
+// BZMPop indicates an expected call of BZMPop.
+func (mr *MockUniversalClientMockRecorder) BZMPop(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BZMPop", reflect.TypeOf((*MockUniversalClient)(nil).BZMPop), varargs...)
+}
+
+// BZPopMax mocks base method.
+func (m *MockUniversalClient) BZPopMax(arg0 context.Context, arg1 time.Duration, arg2 ...string) *redis.ZWithKeyCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BZPopMax", varargs...)
+ ret0, _ := ret[0].(*redis.ZWithKeyCmd)
+ return ret0
+}
+
+// BZPopMax indicates an expected call of BZPopMax.
+func (mr *MockUniversalClientMockRecorder) BZPopMax(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BZPopMax", reflect.TypeOf((*MockUniversalClient)(nil).BZPopMax), varargs...)
+}
+
+// BZPopMin mocks base method.
+func (m *MockUniversalClient) BZPopMin(arg0 context.Context, arg1 time.Duration, arg2 ...string) *redis.ZWithKeyCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BZPopMin", varargs...)
+ ret0, _ := ret[0].(*redis.ZWithKeyCmd)
+ return ret0
+}
+
+// BZPopMin indicates an expected call of BZPopMin.
+func (mr *MockUniversalClientMockRecorder) BZPopMin(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BZPopMin", reflect.TypeOf((*MockUniversalClient)(nil).BZPopMin), varargs...)
+}
+
+// BgRewriteAOF mocks base method.
+func (m *MockUniversalClient) BgRewriteAOF(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BgRewriteAOF", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// BgRewriteAOF indicates an expected call of BgRewriteAOF.
+func (mr *MockUniversalClientMockRecorder) BgRewriteAOF(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BgRewriteAOF", reflect.TypeOf((*MockUniversalClient)(nil).BgRewriteAOF), arg0)
+}
+
+// BgSave mocks base method.
+func (m *MockUniversalClient) BgSave(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BgSave", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// BgSave indicates an expected call of BgSave.
+func (mr *MockUniversalClientMockRecorder) BgSave(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BgSave", reflect.TypeOf((*MockUniversalClient)(nil).BgSave), arg0)
+}
+
+// BitCount mocks base method.
+func (m *MockUniversalClient) BitCount(arg0 context.Context, arg1 string, arg2 *redis.BitCount) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BitCount", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// BitCount indicates an expected call of BitCount.
+func (mr *MockUniversalClientMockRecorder) BitCount(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BitCount", reflect.TypeOf((*MockUniversalClient)(nil).BitCount), arg0, arg1, arg2)
+}
+
+// BitField mocks base method.
+func (m *MockUniversalClient) BitField(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BitField", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// BitField indicates an expected call of BitField.
+func (mr *MockUniversalClientMockRecorder) BitField(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BitField", reflect.TypeOf((*MockUniversalClient)(nil).BitField), varargs...)
+}
+
+// BitFieldRO mocks base method.
+func (m *MockUniversalClient) BitFieldRO(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BitFieldRO", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// BitFieldRO indicates an expected call of BitFieldRO.
+func (mr *MockUniversalClientMockRecorder) BitFieldRO(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BitFieldRO", reflect.TypeOf((*MockUniversalClient)(nil).BitFieldRO), varargs...)
+}
+
+// BitOpAnd mocks base method.
+func (m *MockUniversalClient) BitOpAnd(arg0 context.Context, arg1 string, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BitOpAnd", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// BitOpAnd indicates an expected call of BitOpAnd.
+func (mr *MockUniversalClientMockRecorder) BitOpAnd(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BitOpAnd", reflect.TypeOf((*MockUniversalClient)(nil).BitOpAnd), varargs...)
+}
+
+// BitOpNot mocks base method.
+func (m *MockUniversalClient) BitOpNot(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BitOpNot", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// BitOpNot indicates an expected call of BitOpNot.
+func (mr *MockUniversalClientMockRecorder) BitOpNot(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BitOpNot", reflect.TypeOf((*MockUniversalClient)(nil).BitOpNot), arg0, arg1, arg2)
+}
+
+// BitOpOr mocks base method.
+func (m *MockUniversalClient) BitOpOr(arg0 context.Context, arg1 string, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BitOpOr", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// BitOpOr indicates an expected call of BitOpOr.
+func (mr *MockUniversalClientMockRecorder) BitOpOr(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BitOpOr", reflect.TypeOf((*MockUniversalClient)(nil).BitOpOr), varargs...)
+}
+
+// BitOpXor mocks base method.
+func (m *MockUniversalClient) BitOpXor(arg0 context.Context, arg1 string, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BitOpXor", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// BitOpXor indicates an expected call of BitOpXor.
+func (mr *MockUniversalClientMockRecorder) BitOpXor(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BitOpXor", reflect.TypeOf((*MockUniversalClient)(nil).BitOpXor), varargs...)
+}
+
+// BitPos mocks base method.
+func (m *MockUniversalClient) BitPos(arg0 context.Context, arg1 string, arg2 int64, arg3 ...int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "BitPos", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// BitPos indicates an expected call of BitPos.
+func (mr *MockUniversalClientMockRecorder) BitPos(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BitPos", reflect.TypeOf((*MockUniversalClient)(nil).BitPos), varargs...)
+}
+
+// BitPosSpan mocks base method.
+func (m *MockUniversalClient) BitPosSpan(arg0 context.Context, arg1 string, arg2 int8, arg3, arg4 int64, arg5 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "BitPosSpan", arg0, arg1, arg2, arg3, arg4, arg5)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// BitPosSpan indicates an expected call of BitPosSpan.
+func (mr *MockUniversalClientMockRecorder) BitPosSpan(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BitPosSpan", reflect.TypeOf((*MockUniversalClient)(nil).BitPosSpan), arg0, arg1, arg2, arg3, arg4, arg5)
+}
+
+// CFAdd mocks base method.
+func (m *MockUniversalClient) CFAdd(arg0 context.Context, arg1 string, arg2 any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFAdd", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// CFAdd indicates an expected call of CFAdd.
+func (mr *MockUniversalClientMockRecorder) CFAdd(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFAdd", reflect.TypeOf((*MockUniversalClient)(nil).CFAdd), arg0, arg1, arg2)
+}
+
+// CFAddNX mocks base method.
+func (m *MockUniversalClient) CFAddNX(arg0 context.Context, arg1 string, arg2 any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFAddNX", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// CFAddNX indicates an expected call of CFAddNX.
+func (mr *MockUniversalClientMockRecorder) CFAddNX(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFAddNX", reflect.TypeOf((*MockUniversalClient)(nil).CFAddNX), arg0, arg1, arg2)
+}
+
+// CFCount mocks base method.
+func (m *MockUniversalClient) CFCount(arg0 context.Context, arg1 string, arg2 any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFCount", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// CFCount indicates an expected call of CFCount.
+func (mr *MockUniversalClientMockRecorder) CFCount(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFCount", reflect.TypeOf((*MockUniversalClient)(nil).CFCount), arg0, arg1, arg2)
+}
+
+// CFDel mocks base method.
+func (m *MockUniversalClient) CFDel(arg0 context.Context, arg1 string, arg2 any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFDel", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// CFDel indicates an expected call of CFDel.
+func (mr *MockUniversalClientMockRecorder) CFDel(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFDel", reflect.TypeOf((*MockUniversalClient)(nil).CFDel), arg0, arg1, arg2)
+}
+
+// CFExists mocks base method.
+func (m *MockUniversalClient) CFExists(arg0 context.Context, arg1 string, arg2 any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFExists", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// CFExists indicates an expected call of CFExists.
+func (mr *MockUniversalClientMockRecorder) CFExists(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFExists", reflect.TypeOf((*MockUniversalClient)(nil).CFExists), arg0, arg1, arg2)
+}
+
+// CFInfo mocks base method.
+func (m *MockUniversalClient) CFInfo(arg0 context.Context, arg1 string) *redis.CFInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFInfo", arg0, arg1)
+ ret0, _ := ret[0].(*redis.CFInfoCmd)
+ return ret0
+}
+
+// CFInfo indicates an expected call of CFInfo.
+func (mr *MockUniversalClientMockRecorder) CFInfo(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFInfo", reflect.TypeOf((*MockUniversalClient)(nil).CFInfo), arg0, arg1)
+}
+
+// CFInsert mocks base method.
+func (m *MockUniversalClient) CFInsert(arg0 context.Context, arg1 string, arg2 *redis.CFInsertOptions, arg3 ...any) *redis.BoolSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "CFInsert", varargs...)
+ ret0, _ := ret[0].(*redis.BoolSliceCmd)
+ return ret0
+}
+
+// CFInsert indicates an expected call of CFInsert.
+func (mr *MockUniversalClientMockRecorder) CFInsert(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFInsert", reflect.TypeOf((*MockUniversalClient)(nil).CFInsert), varargs...)
+}
+
+// CFInsertNX mocks base method.
+func (m *MockUniversalClient) CFInsertNX(arg0 context.Context, arg1 string, arg2 *redis.CFInsertOptions, arg3 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "CFInsertNX", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// CFInsertNX indicates an expected call of CFInsertNX.
+func (mr *MockUniversalClientMockRecorder) CFInsertNX(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFInsertNX", reflect.TypeOf((*MockUniversalClient)(nil).CFInsertNX), varargs...)
+}
+
+// CFLoadChunk mocks base method.
+func (m *MockUniversalClient) CFLoadChunk(arg0 context.Context, arg1 string, arg2 int64, arg3 any) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFLoadChunk", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CFLoadChunk indicates an expected call of CFLoadChunk.
+func (mr *MockUniversalClientMockRecorder) CFLoadChunk(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFLoadChunk", reflect.TypeOf((*MockUniversalClient)(nil).CFLoadChunk), arg0, arg1, arg2, arg3)
+}
+
+// CFMExists mocks base method.
+func (m *MockUniversalClient) CFMExists(arg0 context.Context, arg1 string, arg2 ...any) *redis.BoolSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "CFMExists", varargs...)
+ ret0, _ := ret[0].(*redis.BoolSliceCmd)
+ return ret0
+}
+
+// CFMExists indicates an expected call of CFMExists.
+func (mr *MockUniversalClientMockRecorder) CFMExists(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFMExists", reflect.TypeOf((*MockUniversalClient)(nil).CFMExists), varargs...)
+}
+
+// CFReserve mocks base method.
+func (m *MockUniversalClient) CFReserve(arg0 context.Context, arg1 string, arg2 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFReserve", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CFReserve indicates an expected call of CFReserve.
+func (mr *MockUniversalClientMockRecorder) CFReserve(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFReserve", reflect.TypeOf((*MockUniversalClient)(nil).CFReserve), arg0, arg1, arg2)
+}
+
+// CFReserveBucketSize mocks base method.
+func (m *MockUniversalClient) CFReserveBucketSize(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFReserveBucketSize", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CFReserveBucketSize indicates an expected call of CFReserveBucketSize.
+func (mr *MockUniversalClientMockRecorder) CFReserveBucketSize(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFReserveBucketSize", reflect.TypeOf((*MockUniversalClient)(nil).CFReserveBucketSize), arg0, arg1, arg2, arg3)
+}
+
+// CFReserveExpansion mocks base method.
+func (m *MockUniversalClient) CFReserveExpansion(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFReserveExpansion", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CFReserveExpansion indicates an expected call of CFReserveExpansion.
+func (mr *MockUniversalClientMockRecorder) CFReserveExpansion(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFReserveExpansion", reflect.TypeOf((*MockUniversalClient)(nil).CFReserveExpansion), arg0, arg1, arg2, arg3)
+}
+
+// CFReserveMaxIterations mocks base method.
+func (m *MockUniversalClient) CFReserveMaxIterations(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFReserveMaxIterations", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CFReserveMaxIterations indicates an expected call of CFReserveMaxIterations.
+func (mr *MockUniversalClientMockRecorder) CFReserveMaxIterations(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFReserveMaxIterations", reflect.TypeOf((*MockUniversalClient)(nil).CFReserveMaxIterations), arg0, arg1, arg2, arg3)
+}
+
+// CFReserveWithArgs mocks base method.
+func (m *MockUniversalClient) CFReserveWithArgs(arg0 context.Context, arg1 string, arg2 *redis.CFReserveOptions) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFReserveWithArgs", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CFReserveWithArgs indicates an expected call of CFReserveWithArgs.
+func (mr *MockUniversalClientMockRecorder) CFReserveWithArgs(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFReserveWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).CFReserveWithArgs), arg0, arg1, arg2)
+}
+
+// CFScanDump mocks base method.
+func (m *MockUniversalClient) CFScanDump(arg0 context.Context, arg1 string, arg2 int64) *redis.ScanDumpCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CFScanDump", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.ScanDumpCmd)
+ return ret0
+}
+
+// CFScanDump indicates an expected call of CFScanDump.
+func (mr *MockUniversalClientMockRecorder) CFScanDump(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CFScanDump", reflect.TypeOf((*MockUniversalClient)(nil).CFScanDump), arg0, arg1, arg2)
+}
+
+// CMSIncrBy mocks base method.
+func (m *MockUniversalClient) CMSIncrBy(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "CMSIncrBy", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// CMSIncrBy indicates an expected call of CMSIncrBy.
+func (mr *MockUniversalClientMockRecorder) CMSIncrBy(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CMSIncrBy", reflect.TypeOf((*MockUniversalClient)(nil).CMSIncrBy), varargs...)
+}
+
+// CMSInfo mocks base method.
+func (m *MockUniversalClient) CMSInfo(arg0 context.Context, arg1 string) *redis.CMSInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CMSInfo", arg0, arg1)
+ ret0, _ := ret[0].(*redis.CMSInfoCmd)
+ return ret0
+}
+
+// CMSInfo indicates an expected call of CMSInfo.
+func (mr *MockUniversalClientMockRecorder) CMSInfo(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CMSInfo", reflect.TypeOf((*MockUniversalClient)(nil).CMSInfo), arg0, arg1)
+}
+
+// CMSInitByDim mocks base method.
+func (m *MockUniversalClient) CMSInitByDim(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CMSInitByDim", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CMSInitByDim indicates an expected call of CMSInitByDim.
+func (mr *MockUniversalClientMockRecorder) CMSInitByDim(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CMSInitByDim", reflect.TypeOf((*MockUniversalClient)(nil).CMSInitByDim), arg0, arg1, arg2, arg3)
+}
+
+// CMSInitByProb mocks base method.
+func (m *MockUniversalClient) CMSInitByProb(arg0 context.Context, arg1 string, arg2, arg3 float64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CMSInitByProb", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CMSInitByProb indicates an expected call of CMSInitByProb.
+func (mr *MockUniversalClientMockRecorder) CMSInitByProb(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CMSInitByProb", reflect.TypeOf((*MockUniversalClient)(nil).CMSInitByProb), arg0, arg1, arg2, arg3)
+}
+
+// CMSMerge mocks base method.
+func (m *MockUniversalClient) CMSMerge(arg0 context.Context, arg1 string, arg2 ...string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "CMSMerge", varargs...)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CMSMerge indicates an expected call of CMSMerge.
+func (mr *MockUniversalClientMockRecorder) CMSMerge(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CMSMerge", reflect.TypeOf((*MockUniversalClient)(nil).CMSMerge), varargs...)
+}
+
+// CMSMergeWithWeight mocks base method.
+func (m *MockUniversalClient) CMSMergeWithWeight(arg0 context.Context, arg1 string, arg2 map[string]int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CMSMergeWithWeight", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// CMSMergeWithWeight indicates an expected call of CMSMergeWithWeight.
+func (mr *MockUniversalClientMockRecorder) CMSMergeWithWeight(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CMSMergeWithWeight", reflect.TypeOf((*MockUniversalClient)(nil).CMSMergeWithWeight), arg0, arg1, arg2)
+}
+
+// CMSQuery mocks base method.
+func (m *MockUniversalClient) CMSQuery(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "CMSQuery", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// CMSQuery indicates an expected call of CMSQuery.
+func (mr *MockUniversalClientMockRecorder) CMSQuery(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CMSQuery", reflect.TypeOf((*MockUniversalClient)(nil).CMSQuery), varargs...)
+}
+
+// ClientGetName mocks base method.
+func (m *MockUniversalClient) ClientGetName(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClientGetName", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// ClientGetName indicates an expected call of ClientGetName.
+func (mr *MockUniversalClientMockRecorder) ClientGetName(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientGetName", reflect.TypeOf((*MockUniversalClient)(nil).ClientGetName), arg0)
+}
+
+// ClientID mocks base method.
+func (m *MockUniversalClient) ClientID(arg0 context.Context) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClientID", arg0)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ClientID indicates an expected call of ClientID.
+func (mr *MockUniversalClientMockRecorder) ClientID(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientID", reflect.TypeOf((*MockUniversalClient)(nil).ClientID), arg0)
+}
+
+// ClientInfo mocks base method.
+func (m *MockUniversalClient) ClientInfo(arg0 context.Context) *redis.ClientInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClientInfo", arg0)
+ ret0, _ := ret[0].(*redis.ClientInfoCmd)
+ return ret0
+}
+
+// ClientInfo indicates an expected call of ClientInfo.
+func (mr *MockUniversalClientMockRecorder) ClientInfo(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientInfo", reflect.TypeOf((*MockUniversalClient)(nil).ClientInfo), arg0)
+}
+
+// ClientKill mocks base method.
+func (m *MockUniversalClient) ClientKill(arg0 context.Context, arg1 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClientKill", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClientKill indicates an expected call of ClientKill.
+func (mr *MockUniversalClientMockRecorder) ClientKill(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientKill", reflect.TypeOf((*MockUniversalClient)(nil).ClientKill), arg0, arg1)
+}
+
+// ClientKillByFilter mocks base method.
+func (m *MockUniversalClient) ClientKillByFilter(arg0 context.Context, arg1 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ClientKillByFilter", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ClientKillByFilter indicates an expected call of ClientKillByFilter.
+func (mr *MockUniversalClientMockRecorder) ClientKillByFilter(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientKillByFilter", reflect.TypeOf((*MockUniversalClient)(nil).ClientKillByFilter), varargs...)
+}
+
+// ClientList mocks base method.
+func (m *MockUniversalClient) ClientList(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClientList", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// ClientList indicates an expected call of ClientList.
+func (mr *MockUniversalClientMockRecorder) ClientList(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientList", reflect.TypeOf((*MockUniversalClient)(nil).ClientList), arg0)
+}
+
+// ClientPause mocks base method.
+func (m *MockUniversalClient) ClientPause(arg0 context.Context, arg1 time.Duration) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClientPause", arg0, arg1)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// ClientPause indicates an expected call of ClientPause.
+func (mr *MockUniversalClientMockRecorder) ClientPause(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientPause", reflect.TypeOf((*MockUniversalClient)(nil).ClientPause), arg0, arg1)
+}
+
+// ClientUnblock mocks base method.
+func (m *MockUniversalClient) ClientUnblock(arg0 context.Context, arg1 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClientUnblock", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ClientUnblock indicates an expected call of ClientUnblock.
+func (mr *MockUniversalClientMockRecorder) ClientUnblock(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientUnblock", reflect.TypeOf((*MockUniversalClient)(nil).ClientUnblock), arg0, arg1)
+}
+
+// ClientUnblockWithError mocks base method.
+func (m *MockUniversalClient) ClientUnblockWithError(arg0 context.Context, arg1 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClientUnblockWithError", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ClientUnblockWithError indicates an expected call of ClientUnblockWithError.
+func (mr *MockUniversalClientMockRecorder) ClientUnblockWithError(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientUnblockWithError", reflect.TypeOf((*MockUniversalClient)(nil).ClientUnblockWithError), arg0, arg1)
+}
+
+// ClientUnpause mocks base method.
+func (m *MockUniversalClient) ClientUnpause(arg0 context.Context) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClientUnpause", arg0)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// ClientUnpause indicates an expected call of ClientUnpause.
+func (mr *MockUniversalClientMockRecorder) ClientUnpause(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientUnpause", reflect.TypeOf((*MockUniversalClient)(nil).ClientUnpause), arg0)
+}
+
+// Close mocks base method.
+func (m *MockUniversalClient) Close() error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Close")
+ ret0, _ := ret[0].(error)
+ return ret0
+}
+
+// Close indicates an expected call of Close.
+func (mr *MockUniversalClientMockRecorder) Close() *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUniversalClient)(nil).Close))
+}
+
+// ClusterAddSlots mocks base method.
+func (m *MockUniversalClient) ClusterAddSlots(arg0 context.Context, arg1 ...int) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ClusterAddSlots", varargs...)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterAddSlots indicates an expected call of ClusterAddSlots.
+func (mr *MockUniversalClientMockRecorder) ClusterAddSlots(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterAddSlots", reflect.TypeOf((*MockUniversalClient)(nil).ClusterAddSlots), varargs...)
+}
+
+// ClusterAddSlotsRange mocks base method.
+func (m *MockUniversalClient) ClusterAddSlotsRange(arg0 context.Context, arg1, arg2 int) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterAddSlotsRange", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterAddSlotsRange indicates an expected call of ClusterAddSlotsRange.
+func (mr *MockUniversalClientMockRecorder) ClusterAddSlotsRange(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterAddSlotsRange", reflect.TypeOf((*MockUniversalClient)(nil).ClusterAddSlotsRange), arg0, arg1, arg2)
+}
+
+// ClusterCountFailureReports mocks base method.
+func (m *MockUniversalClient) ClusterCountFailureReports(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterCountFailureReports", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ClusterCountFailureReports indicates an expected call of ClusterCountFailureReports.
+func (mr *MockUniversalClientMockRecorder) ClusterCountFailureReports(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterCountFailureReports", reflect.TypeOf((*MockUniversalClient)(nil).ClusterCountFailureReports), arg0, arg1)
+}
+
+// ClusterCountKeysInSlot mocks base method.
+func (m *MockUniversalClient) ClusterCountKeysInSlot(arg0 context.Context, arg1 int) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterCountKeysInSlot", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ClusterCountKeysInSlot indicates an expected call of ClusterCountKeysInSlot.
+func (mr *MockUniversalClientMockRecorder) ClusterCountKeysInSlot(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterCountKeysInSlot", reflect.TypeOf((*MockUniversalClient)(nil).ClusterCountKeysInSlot), arg0, arg1)
+}
+
+// ClusterDelSlots mocks base method.
+func (m *MockUniversalClient) ClusterDelSlots(arg0 context.Context, arg1 ...int) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ClusterDelSlots", varargs...)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterDelSlots indicates an expected call of ClusterDelSlots.
+func (mr *MockUniversalClientMockRecorder) ClusterDelSlots(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterDelSlots", reflect.TypeOf((*MockUniversalClient)(nil).ClusterDelSlots), varargs...)
+}
+
+// ClusterDelSlotsRange mocks base method.
+func (m *MockUniversalClient) ClusterDelSlotsRange(arg0 context.Context, arg1, arg2 int) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterDelSlotsRange", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterDelSlotsRange indicates an expected call of ClusterDelSlotsRange.
+func (mr *MockUniversalClientMockRecorder) ClusterDelSlotsRange(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterDelSlotsRange", reflect.TypeOf((*MockUniversalClient)(nil).ClusterDelSlotsRange), arg0, arg1, arg2)
+}
+
+// ClusterFailover mocks base method.
+func (m *MockUniversalClient) ClusterFailover(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterFailover", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterFailover indicates an expected call of ClusterFailover.
+func (mr *MockUniversalClientMockRecorder) ClusterFailover(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterFailover", reflect.TypeOf((*MockUniversalClient)(nil).ClusterFailover), arg0)
+}
+
+// ClusterForget mocks base method.
+func (m *MockUniversalClient) ClusterForget(arg0 context.Context, arg1 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterForget", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterForget indicates an expected call of ClusterForget.
+func (mr *MockUniversalClientMockRecorder) ClusterForget(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterForget", reflect.TypeOf((*MockUniversalClient)(nil).ClusterForget), arg0, arg1)
+}
+
+// ClusterGetKeysInSlot mocks base method.
+func (m *MockUniversalClient) ClusterGetKeysInSlot(arg0 context.Context, arg1, arg2 int) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterGetKeysInSlot", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ClusterGetKeysInSlot indicates an expected call of ClusterGetKeysInSlot.
+func (mr *MockUniversalClientMockRecorder) ClusterGetKeysInSlot(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterGetKeysInSlot", reflect.TypeOf((*MockUniversalClient)(nil).ClusterGetKeysInSlot), arg0, arg1, arg2)
+}
+
+// ClusterInfo mocks base method.
+func (m *MockUniversalClient) ClusterInfo(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterInfo", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// ClusterInfo indicates an expected call of ClusterInfo.
+func (mr *MockUniversalClientMockRecorder) ClusterInfo(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterInfo", reflect.TypeOf((*MockUniversalClient)(nil).ClusterInfo), arg0)
+}
+
+// ClusterKeySlot mocks base method.
+func (m *MockUniversalClient) ClusterKeySlot(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterKeySlot", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ClusterKeySlot indicates an expected call of ClusterKeySlot.
+func (mr *MockUniversalClientMockRecorder) ClusterKeySlot(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterKeySlot", reflect.TypeOf((*MockUniversalClient)(nil).ClusterKeySlot), arg0, arg1)
+}
+
+// ClusterLinks mocks base method.
+func (m *MockUniversalClient) ClusterLinks(arg0 context.Context) *redis.ClusterLinksCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterLinks", arg0)
+ ret0, _ := ret[0].(*redis.ClusterLinksCmd)
+ return ret0
+}
+
+// ClusterLinks indicates an expected call of ClusterLinks.
+func (mr *MockUniversalClientMockRecorder) ClusterLinks(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterLinks", reflect.TypeOf((*MockUniversalClient)(nil).ClusterLinks), arg0)
+}
+
+// ClusterMeet mocks base method.
+func (m *MockUniversalClient) ClusterMeet(arg0 context.Context, arg1, arg2 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterMeet", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterMeet indicates an expected call of ClusterMeet.
+func (mr *MockUniversalClientMockRecorder) ClusterMeet(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterMeet", reflect.TypeOf((*MockUniversalClient)(nil).ClusterMeet), arg0, arg1, arg2)
+}
+
+// ClusterMyShardID mocks base method.
+func (m *MockUniversalClient) ClusterMyShardID(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterMyShardID", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// ClusterMyShardID indicates an expected call of ClusterMyShardID.
+func (mr *MockUniversalClientMockRecorder) ClusterMyShardID(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterMyShardID", reflect.TypeOf((*MockUniversalClient)(nil).ClusterMyShardID), arg0)
+}
+
+// ClusterNodes mocks base method.
+func (m *MockUniversalClient) ClusterNodes(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterNodes", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// ClusterNodes indicates an expected call of ClusterNodes.
+func (mr *MockUniversalClientMockRecorder) ClusterNodes(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterNodes", reflect.TypeOf((*MockUniversalClient)(nil).ClusterNodes), arg0)
+}
+
+// ClusterReplicate mocks base method.
+func (m *MockUniversalClient) ClusterReplicate(arg0 context.Context, arg1 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterReplicate", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterReplicate indicates an expected call of ClusterReplicate.
+func (mr *MockUniversalClientMockRecorder) ClusterReplicate(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterReplicate", reflect.TypeOf((*MockUniversalClient)(nil).ClusterReplicate), arg0, arg1)
+}
+
+// ClusterResetHard mocks base method.
+func (m *MockUniversalClient) ClusterResetHard(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterResetHard", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterResetHard indicates an expected call of ClusterResetHard.
+func (mr *MockUniversalClientMockRecorder) ClusterResetHard(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterResetHard", reflect.TypeOf((*MockUniversalClient)(nil).ClusterResetHard), arg0)
+}
+
+// ClusterResetSoft mocks base method.
+func (m *MockUniversalClient) ClusterResetSoft(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterResetSoft", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterResetSoft indicates an expected call of ClusterResetSoft.
+func (mr *MockUniversalClientMockRecorder) ClusterResetSoft(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterResetSoft", reflect.TypeOf((*MockUniversalClient)(nil).ClusterResetSoft), arg0)
+}
+
+// ClusterSaveConfig mocks base method.
+func (m *MockUniversalClient) ClusterSaveConfig(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterSaveConfig", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ClusterSaveConfig indicates an expected call of ClusterSaveConfig.
+func (mr *MockUniversalClientMockRecorder) ClusterSaveConfig(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterSaveConfig", reflect.TypeOf((*MockUniversalClient)(nil).ClusterSaveConfig), arg0)
+}
+
+// ClusterShards mocks base method.
+func (m *MockUniversalClient) ClusterShards(arg0 context.Context) *redis.ClusterShardsCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterShards", arg0)
+ ret0, _ := ret[0].(*redis.ClusterShardsCmd)
+ return ret0
+}
+
+// ClusterShards indicates an expected call of ClusterShards.
+func (mr *MockUniversalClientMockRecorder) ClusterShards(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterShards", reflect.TypeOf((*MockUniversalClient)(nil).ClusterShards), arg0)
+}
+
+// ClusterSlaves mocks base method.
+func (m *MockUniversalClient) ClusterSlaves(arg0 context.Context, arg1 string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterSlaves", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ClusterSlaves indicates an expected call of ClusterSlaves.
+func (mr *MockUniversalClientMockRecorder) ClusterSlaves(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterSlaves", reflect.TypeOf((*MockUniversalClient)(nil).ClusterSlaves), arg0, arg1)
+}
+
+// ClusterSlots mocks base method.
+func (m *MockUniversalClient) ClusterSlots(arg0 context.Context) *redis.ClusterSlotsCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ClusterSlots", arg0)
+ ret0, _ := ret[0].(*redis.ClusterSlotsCmd)
+ return ret0
+}
+
+// ClusterSlots indicates an expected call of ClusterSlots.
+func (mr *MockUniversalClientMockRecorder) ClusterSlots(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterSlots", reflect.TypeOf((*MockUniversalClient)(nil).ClusterSlots), arg0)
+}
+
+// Command mocks base method.
+func (m *MockUniversalClient) Command(arg0 context.Context) *redis.CommandsInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Command", arg0)
+ ret0, _ := ret[0].(*redis.CommandsInfoCmd)
+ return ret0
+}
+
+// Command indicates an expected call of Command.
+func (mr *MockUniversalClientMockRecorder) Command(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Command", reflect.TypeOf((*MockUniversalClient)(nil).Command), arg0)
+}
+
+// CommandGetKeys mocks base method.
+func (m *MockUniversalClient) CommandGetKeys(arg0 context.Context, arg1 ...any) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "CommandGetKeys", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// CommandGetKeys indicates an expected call of CommandGetKeys.
+func (mr *MockUniversalClientMockRecorder) CommandGetKeys(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommandGetKeys", reflect.TypeOf((*MockUniversalClient)(nil).CommandGetKeys), varargs...)
+}
+
+// CommandGetKeysAndFlags mocks base method.
+func (m *MockUniversalClient) CommandGetKeysAndFlags(arg0 context.Context, arg1 ...any) *redis.KeyFlagsCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "CommandGetKeysAndFlags", varargs...)
+ ret0, _ := ret[0].(*redis.KeyFlagsCmd)
+ return ret0
+}
+
+// CommandGetKeysAndFlags indicates an expected call of CommandGetKeysAndFlags.
+func (mr *MockUniversalClientMockRecorder) CommandGetKeysAndFlags(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommandGetKeysAndFlags", reflect.TypeOf((*MockUniversalClient)(nil).CommandGetKeysAndFlags), varargs...)
+}
+
+// CommandList mocks base method.
+func (m *MockUniversalClient) CommandList(arg0 context.Context, arg1 *redis.FilterBy) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CommandList", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// CommandList indicates an expected call of CommandList.
+func (mr *MockUniversalClientMockRecorder) CommandList(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommandList", reflect.TypeOf((*MockUniversalClient)(nil).CommandList), arg0, arg1)
+}
+
+// ConfigGet mocks base method.
+func (m *MockUniversalClient) ConfigGet(arg0 context.Context, arg1 string) *redis.MapStringStringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ConfigGet", arg0, arg1)
+ ret0, _ := ret[0].(*redis.MapStringStringCmd)
+ return ret0
+}
+
+// ConfigGet indicates an expected call of ConfigGet.
+func (mr *MockUniversalClientMockRecorder) ConfigGet(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigGet", reflect.TypeOf((*MockUniversalClient)(nil).ConfigGet), arg0, arg1)
+}
+
+// ConfigResetStat mocks base method.
+func (m *MockUniversalClient) ConfigResetStat(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ConfigResetStat", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ConfigResetStat indicates an expected call of ConfigResetStat.
+func (mr *MockUniversalClientMockRecorder) ConfigResetStat(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigResetStat", reflect.TypeOf((*MockUniversalClient)(nil).ConfigResetStat), arg0)
+}
+
+// ConfigRewrite mocks base method.
+func (m *MockUniversalClient) ConfigRewrite(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ConfigRewrite", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ConfigRewrite indicates an expected call of ConfigRewrite.
+func (mr *MockUniversalClientMockRecorder) ConfigRewrite(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigRewrite", reflect.TypeOf((*MockUniversalClient)(nil).ConfigRewrite), arg0)
+}
+
+// ConfigSet mocks base method.
+func (m *MockUniversalClient) ConfigSet(arg0 context.Context, arg1, arg2 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ConfigSet", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ConfigSet indicates an expected call of ConfigSet.
+func (mr *MockUniversalClientMockRecorder) ConfigSet(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSet", reflect.TypeOf((*MockUniversalClient)(nil).ConfigSet), arg0, arg1, arg2)
+}
+
+// Copy mocks base method.
+func (m *MockUniversalClient) Copy(arg0 context.Context, arg1, arg2 string, arg3 int, arg4 bool) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Copy", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// Copy indicates an expected call of Copy.
+func (mr *MockUniversalClientMockRecorder) Copy(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockUniversalClient)(nil).Copy), arg0, arg1, arg2, arg3, arg4)
+}
+
+// DBSize mocks base method.
+func (m *MockUniversalClient) DBSize(arg0 context.Context) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "DBSize", arg0)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// DBSize indicates an expected call of DBSize.
+func (mr *MockUniversalClientMockRecorder) DBSize(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DBSize", reflect.TypeOf((*MockUniversalClient)(nil).DBSize), arg0)
+}
+
+// DebugObject mocks base method.
+func (m *MockUniversalClient) DebugObject(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "DebugObject", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// DebugObject indicates an expected call of DebugObject.
+func (mr *MockUniversalClientMockRecorder) DebugObject(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DebugObject", reflect.TypeOf((*MockUniversalClient)(nil).DebugObject), arg0, arg1)
+}
+
+// Decr mocks base method.
+func (m *MockUniversalClient) Decr(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Decr", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// Decr indicates an expected call of Decr.
+func (mr *MockUniversalClientMockRecorder) Decr(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decr", reflect.TypeOf((*MockUniversalClient)(nil).Decr), arg0, arg1)
+}
+
+// DecrBy mocks base method.
+func (m *MockUniversalClient) DecrBy(arg0 context.Context, arg1 string, arg2 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "DecrBy", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// DecrBy indicates an expected call of DecrBy.
+func (mr *MockUniversalClientMockRecorder) DecrBy(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecrBy", reflect.TypeOf((*MockUniversalClient)(nil).DecrBy), arg0, arg1, arg2)
+}
+
+// Del mocks base method.
+func (m *MockUniversalClient) Del(arg0 context.Context, arg1 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "Del", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// Del indicates an expected call of Del.
+func (mr *MockUniversalClientMockRecorder) Del(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Del", reflect.TypeOf((*MockUniversalClient)(nil).Del), varargs...)
+}
+
+// Do mocks base method.
+func (m *MockUniversalClient) Do(arg0 context.Context, arg1 ...any) *redis.Cmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "Do", varargs...)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// Do indicates an expected call of Do.
+func (mr *MockUniversalClientMockRecorder) Do(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockUniversalClient)(nil).Do), varargs...)
+}
+
+// Dump mocks base method.
+func (m *MockUniversalClient) Dump(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Dump", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// Dump indicates an expected call of Dump.
+func (mr *MockUniversalClientMockRecorder) Dump(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dump", reflect.TypeOf((*MockUniversalClient)(nil).Dump), arg0, arg1)
+}
+
+// Echo mocks base method.
+func (m *MockUniversalClient) Echo(arg0 context.Context, arg1 any) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Echo", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// Echo indicates an expected call of Echo.
+func (mr *MockUniversalClientMockRecorder) Echo(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Echo", reflect.TypeOf((*MockUniversalClient)(nil).Echo), arg0, arg1)
+}
+
+// Eval mocks base method.
+func (m *MockUniversalClient) Eval(arg0 context.Context, arg1 string, arg2 []string, arg3 ...any) *redis.Cmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "Eval", varargs...)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// Eval indicates an expected call of Eval.
+func (mr *MockUniversalClientMockRecorder) Eval(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Eval", reflect.TypeOf((*MockUniversalClient)(nil).Eval), varargs...)
+}
+
+// EvalRO mocks base method.
+func (m *MockUniversalClient) EvalRO(arg0 context.Context, arg1 string, arg2 []string, arg3 ...any) *redis.Cmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "EvalRO", varargs...)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// EvalRO indicates an expected call of EvalRO.
+func (mr *MockUniversalClientMockRecorder) EvalRO(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvalRO", reflect.TypeOf((*MockUniversalClient)(nil).EvalRO), varargs...)
+}
+
+// EvalSha mocks base method.
+func (m *MockUniversalClient) EvalSha(arg0 context.Context, arg1 string, arg2 []string, arg3 ...any) *redis.Cmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "EvalSha", varargs...)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// EvalSha indicates an expected call of EvalSha.
+func (mr *MockUniversalClientMockRecorder) EvalSha(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvalSha", reflect.TypeOf((*MockUniversalClient)(nil).EvalSha), varargs...)
+}
+
+// EvalShaRO mocks base method.
+func (m *MockUniversalClient) EvalShaRO(arg0 context.Context, arg1 string, arg2 []string, arg3 ...any) *redis.Cmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "EvalShaRO", varargs...)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// EvalShaRO indicates an expected call of EvalShaRO.
+func (mr *MockUniversalClientMockRecorder) EvalShaRO(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvalShaRO", reflect.TypeOf((*MockUniversalClient)(nil).EvalShaRO), varargs...)
+}
+
+// Exists mocks base method.
+func (m *MockUniversalClient) Exists(arg0 context.Context, arg1 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "Exists", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// Exists indicates an expected call of Exists.
+func (mr *MockUniversalClientMockRecorder) Exists(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockUniversalClient)(nil).Exists), varargs...)
+}
+
+// Expire mocks base method.
+func (m *MockUniversalClient) Expire(arg0 context.Context, arg1 string, arg2 time.Duration) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Expire", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// Expire indicates an expected call of Expire.
+func (mr *MockUniversalClientMockRecorder) Expire(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Expire", reflect.TypeOf((*MockUniversalClient)(nil).Expire), arg0, arg1, arg2)
+}
+
+// ExpireAt mocks base method.
+func (m *MockUniversalClient) ExpireAt(arg0 context.Context, arg1 string, arg2 time.Time) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ExpireAt", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// ExpireAt indicates an expected call of ExpireAt.
+func (mr *MockUniversalClientMockRecorder) ExpireAt(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireAt", reflect.TypeOf((*MockUniversalClient)(nil).ExpireAt), arg0, arg1, arg2)
+}
+
+// ExpireGT mocks base method.
+func (m *MockUniversalClient) ExpireGT(arg0 context.Context, arg1 string, arg2 time.Duration) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ExpireGT", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// ExpireGT indicates an expected call of ExpireGT.
+func (mr *MockUniversalClientMockRecorder) ExpireGT(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireGT", reflect.TypeOf((*MockUniversalClient)(nil).ExpireGT), arg0, arg1, arg2)
+}
+
+// ExpireLT mocks base method.
+func (m *MockUniversalClient) ExpireLT(arg0 context.Context, arg1 string, arg2 time.Duration) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ExpireLT", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// ExpireLT indicates an expected call of ExpireLT.
+func (mr *MockUniversalClientMockRecorder) ExpireLT(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireLT", reflect.TypeOf((*MockUniversalClient)(nil).ExpireLT), arg0, arg1, arg2)
+}
+
+// ExpireNX mocks base method.
+func (m *MockUniversalClient) ExpireNX(arg0 context.Context, arg1 string, arg2 time.Duration) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ExpireNX", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// ExpireNX indicates an expected call of ExpireNX.
+func (mr *MockUniversalClientMockRecorder) ExpireNX(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireNX", reflect.TypeOf((*MockUniversalClient)(nil).ExpireNX), arg0, arg1, arg2)
+}
+
+// ExpireTime mocks base method.
+func (m *MockUniversalClient) ExpireTime(arg0 context.Context, arg1 string) *redis.DurationCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ExpireTime", arg0, arg1)
+ ret0, _ := ret[0].(*redis.DurationCmd)
+ return ret0
+}
+
+// ExpireTime indicates an expected call of ExpireTime.
+func (mr *MockUniversalClientMockRecorder) ExpireTime(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireTime", reflect.TypeOf((*MockUniversalClient)(nil).ExpireTime), arg0, arg1)
+}
+
+// ExpireXX mocks base method.
+func (m *MockUniversalClient) ExpireXX(arg0 context.Context, arg1 string, arg2 time.Duration) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ExpireXX", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// ExpireXX indicates an expected call of ExpireXX.
+func (mr *MockUniversalClientMockRecorder) ExpireXX(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpireXX", reflect.TypeOf((*MockUniversalClient)(nil).ExpireXX), arg0, arg1, arg2)
+}
+
+// FCall mocks base method.
+func (m *MockUniversalClient) FCall(arg0 context.Context, arg1 string, arg2 []string, arg3 ...any) *redis.Cmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "FCall", varargs...)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// FCall indicates an expected call of FCall.
+func (mr *MockUniversalClientMockRecorder) FCall(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FCall", reflect.TypeOf((*MockUniversalClient)(nil).FCall), varargs...)
+}
+
+// FCallRO mocks base method.
+func (m *MockUniversalClient) FCallRO(arg0 context.Context, arg1 string, arg2 []string, arg3 ...any) *redis.Cmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "FCallRO", varargs...)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// FCallRO indicates an expected call of FCallRO.
+func (mr *MockUniversalClientMockRecorder) FCallRO(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FCallRO", reflect.TypeOf((*MockUniversalClient)(nil).FCallRO), varargs...)
+}
+
+// FCallRo mocks base method.
+func (m *MockUniversalClient) FCallRo(arg0 context.Context, arg1 string, arg2 []string, arg3 ...any) *redis.Cmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "FCallRo", varargs...)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// FCallRo indicates an expected call of FCallRo.
+func (mr *MockUniversalClientMockRecorder) FCallRo(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FCallRo", reflect.TypeOf((*MockUniversalClient)(nil).FCallRo), varargs...)
+}
+
+// FlushAll mocks base method.
+func (m *MockUniversalClient) FlushAll(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FlushAll", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// FlushAll indicates an expected call of FlushAll.
+func (mr *MockUniversalClientMockRecorder) FlushAll(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushAll", reflect.TypeOf((*MockUniversalClient)(nil).FlushAll), arg0)
+}
+
+// FlushAllAsync mocks base method.
+func (m *MockUniversalClient) FlushAllAsync(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FlushAllAsync", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// FlushAllAsync indicates an expected call of FlushAllAsync.
+func (mr *MockUniversalClientMockRecorder) FlushAllAsync(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushAllAsync", reflect.TypeOf((*MockUniversalClient)(nil).FlushAllAsync), arg0)
+}
+
+// FlushDB mocks base method.
+func (m *MockUniversalClient) FlushDB(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FlushDB", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// FlushDB indicates an expected call of FlushDB.
+func (mr *MockUniversalClientMockRecorder) FlushDB(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushDB", reflect.TypeOf((*MockUniversalClient)(nil).FlushDB), arg0)
+}
+
+// FlushDBAsync mocks base method.
+func (m *MockUniversalClient) FlushDBAsync(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FlushDBAsync", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// FlushDBAsync indicates an expected call of FlushDBAsync.
+func (mr *MockUniversalClientMockRecorder) FlushDBAsync(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushDBAsync", reflect.TypeOf((*MockUniversalClient)(nil).FlushDBAsync), arg0)
+}
+
+// FunctionDelete mocks base method.
+func (m *MockUniversalClient) FunctionDelete(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionDelete", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// FunctionDelete indicates an expected call of FunctionDelete.
+func (mr *MockUniversalClientMockRecorder) FunctionDelete(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionDelete", reflect.TypeOf((*MockUniversalClient)(nil).FunctionDelete), arg0, arg1)
+}
+
+// FunctionDump mocks base method.
+func (m *MockUniversalClient) FunctionDump(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionDump", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// FunctionDump indicates an expected call of FunctionDump.
+func (mr *MockUniversalClientMockRecorder) FunctionDump(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionDump", reflect.TypeOf((*MockUniversalClient)(nil).FunctionDump), arg0)
+}
+
+// FunctionFlush mocks base method.
+func (m *MockUniversalClient) FunctionFlush(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionFlush", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// FunctionFlush indicates an expected call of FunctionFlush.
+func (mr *MockUniversalClientMockRecorder) FunctionFlush(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionFlush", reflect.TypeOf((*MockUniversalClient)(nil).FunctionFlush), arg0)
+}
+
+// FunctionFlushAsync mocks base method.
+func (m *MockUniversalClient) FunctionFlushAsync(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionFlushAsync", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// FunctionFlushAsync indicates an expected call of FunctionFlushAsync.
+func (mr *MockUniversalClientMockRecorder) FunctionFlushAsync(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionFlushAsync", reflect.TypeOf((*MockUniversalClient)(nil).FunctionFlushAsync), arg0)
+}
+
+// FunctionKill mocks base method.
+func (m *MockUniversalClient) FunctionKill(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionKill", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// FunctionKill indicates an expected call of FunctionKill.
+func (mr *MockUniversalClientMockRecorder) FunctionKill(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionKill", reflect.TypeOf((*MockUniversalClient)(nil).FunctionKill), arg0)
+}
+
+// FunctionList mocks base method.
+func (m *MockUniversalClient) FunctionList(arg0 context.Context, arg1 redis.FunctionListQuery) *redis.FunctionListCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionList", arg0, arg1)
+ ret0, _ := ret[0].(*redis.FunctionListCmd)
+ return ret0
+}
+
+// FunctionList indicates an expected call of FunctionList.
+func (mr *MockUniversalClientMockRecorder) FunctionList(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionList", reflect.TypeOf((*MockUniversalClient)(nil).FunctionList), arg0, arg1)
+}
+
+// FunctionLoad mocks base method.
+func (m *MockUniversalClient) FunctionLoad(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionLoad", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// FunctionLoad indicates an expected call of FunctionLoad.
+func (mr *MockUniversalClientMockRecorder) FunctionLoad(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionLoad", reflect.TypeOf((*MockUniversalClient)(nil).FunctionLoad), arg0, arg1)
+}
+
+// FunctionLoadReplace mocks base method.
+func (m *MockUniversalClient) FunctionLoadReplace(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionLoadReplace", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// FunctionLoadReplace indicates an expected call of FunctionLoadReplace.
+func (mr *MockUniversalClientMockRecorder) FunctionLoadReplace(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionLoadReplace", reflect.TypeOf((*MockUniversalClient)(nil).FunctionLoadReplace), arg0, arg1)
+}
+
+// FunctionRestore mocks base method.
+func (m *MockUniversalClient) FunctionRestore(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionRestore", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// FunctionRestore indicates an expected call of FunctionRestore.
+func (mr *MockUniversalClientMockRecorder) FunctionRestore(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionRestore", reflect.TypeOf((*MockUniversalClient)(nil).FunctionRestore), arg0, arg1)
+}
+
+// FunctionStats mocks base method.
+func (m *MockUniversalClient) FunctionStats(arg0 context.Context) *redis.FunctionStatsCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "FunctionStats", arg0)
+ ret0, _ := ret[0].(*redis.FunctionStatsCmd)
+ return ret0
+}
+
+// FunctionStats indicates an expected call of FunctionStats.
+func (mr *MockUniversalClientMockRecorder) FunctionStats(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FunctionStats", reflect.TypeOf((*MockUniversalClient)(nil).FunctionStats), arg0)
+}
+
+// GeoAdd mocks base method.
+func (m *MockUniversalClient) GeoAdd(arg0 context.Context, arg1 string, arg2 ...*redis.GeoLocation) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "GeoAdd", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// GeoAdd indicates an expected call of GeoAdd.
+func (mr *MockUniversalClientMockRecorder) GeoAdd(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoAdd", reflect.TypeOf((*MockUniversalClient)(nil).GeoAdd), varargs...)
+}
+
+// GeoDist mocks base method.
+func (m *MockUniversalClient) GeoDist(arg0 context.Context, arg1, arg2, arg3, arg4 string) *redis.FloatCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GeoDist", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.FloatCmd)
+ return ret0
+}
+
+// GeoDist indicates an expected call of GeoDist.
+func (mr *MockUniversalClientMockRecorder) GeoDist(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoDist", reflect.TypeOf((*MockUniversalClient)(nil).GeoDist), arg0, arg1, arg2, arg3, arg4)
+}
+
+// GeoHash mocks base method.
+func (m *MockUniversalClient) GeoHash(arg0 context.Context, arg1 string, arg2 ...string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "GeoHash", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// GeoHash indicates an expected call of GeoHash.
+func (mr *MockUniversalClientMockRecorder) GeoHash(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoHash", reflect.TypeOf((*MockUniversalClient)(nil).GeoHash), varargs...)
+}
+
+// GeoPos mocks base method.
+func (m *MockUniversalClient) GeoPos(arg0 context.Context, arg1 string, arg2 ...string) *redis.GeoPosCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "GeoPos", varargs...)
+ ret0, _ := ret[0].(*redis.GeoPosCmd)
+ return ret0
+}
+
+// GeoPos indicates an expected call of GeoPos.
+func (mr *MockUniversalClientMockRecorder) GeoPos(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoPos", reflect.TypeOf((*MockUniversalClient)(nil).GeoPos), varargs...)
+}
+
+// GeoRadius mocks base method.
+func (m *MockUniversalClient) GeoRadius(arg0 context.Context, arg1 string, arg2, arg3 float64, arg4 *redis.GeoRadiusQuery) *redis.GeoLocationCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GeoRadius", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.GeoLocationCmd)
+ return ret0
+}
+
+// GeoRadius indicates an expected call of GeoRadius.
+func (mr *MockUniversalClientMockRecorder) GeoRadius(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoRadius", reflect.TypeOf((*MockUniversalClient)(nil).GeoRadius), arg0, arg1, arg2, arg3, arg4)
+}
+
+// GeoRadiusByMember mocks base method.
+func (m *MockUniversalClient) GeoRadiusByMember(arg0 context.Context, arg1, arg2 string, arg3 *redis.GeoRadiusQuery) *redis.GeoLocationCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GeoRadiusByMember", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.GeoLocationCmd)
+ return ret0
+}
+
+// GeoRadiusByMember indicates an expected call of GeoRadiusByMember.
+func (mr *MockUniversalClientMockRecorder) GeoRadiusByMember(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoRadiusByMember", reflect.TypeOf((*MockUniversalClient)(nil).GeoRadiusByMember), arg0, arg1, arg2, arg3)
+}
+
+// GeoRadiusByMemberStore mocks base method.
+func (m *MockUniversalClient) GeoRadiusByMemberStore(arg0 context.Context, arg1, arg2 string, arg3 *redis.GeoRadiusQuery) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GeoRadiusByMemberStore", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// GeoRadiusByMemberStore indicates an expected call of GeoRadiusByMemberStore.
+func (mr *MockUniversalClientMockRecorder) GeoRadiusByMemberStore(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoRadiusByMemberStore", reflect.TypeOf((*MockUniversalClient)(nil).GeoRadiusByMemberStore), arg0, arg1, arg2, arg3)
+}
+
+// GeoRadiusStore mocks base method.
+func (m *MockUniversalClient) GeoRadiusStore(arg0 context.Context, arg1 string, arg2, arg3 float64, arg4 *redis.GeoRadiusQuery) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GeoRadiusStore", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// GeoRadiusStore indicates an expected call of GeoRadiusStore.
+func (mr *MockUniversalClientMockRecorder) GeoRadiusStore(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoRadiusStore", reflect.TypeOf((*MockUniversalClient)(nil).GeoRadiusStore), arg0, arg1, arg2, arg3, arg4)
+}
+
+// GeoSearch mocks base method.
+func (m *MockUniversalClient) GeoSearch(arg0 context.Context, arg1 string, arg2 *redis.GeoSearchQuery) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GeoSearch", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// GeoSearch indicates an expected call of GeoSearch.
+func (mr *MockUniversalClientMockRecorder) GeoSearch(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoSearch", reflect.TypeOf((*MockUniversalClient)(nil).GeoSearch), arg0, arg1, arg2)
+}
+
+// GeoSearchLocation mocks base method.
+func (m *MockUniversalClient) GeoSearchLocation(arg0 context.Context, arg1 string, arg2 *redis.GeoSearchLocationQuery) *redis.GeoSearchLocationCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GeoSearchLocation", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.GeoSearchLocationCmd)
+ return ret0
+}
+
+// GeoSearchLocation indicates an expected call of GeoSearchLocation.
+func (mr *MockUniversalClientMockRecorder) GeoSearchLocation(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoSearchLocation", reflect.TypeOf((*MockUniversalClient)(nil).GeoSearchLocation), arg0, arg1, arg2)
+}
+
+// GeoSearchStore mocks base method.
+func (m *MockUniversalClient) GeoSearchStore(arg0 context.Context, arg1, arg2 string, arg3 *redis.GeoSearchStoreQuery) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GeoSearchStore", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// GeoSearchStore indicates an expected call of GeoSearchStore.
+func (mr *MockUniversalClientMockRecorder) GeoSearchStore(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeoSearchStore", reflect.TypeOf((*MockUniversalClient)(nil).GeoSearchStore), arg0, arg1, arg2, arg3)
+}
+
+// Get mocks base method.
+func (m *MockUniversalClient) Get(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Get", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// Get indicates an expected call of Get.
+func (mr *MockUniversalClientMockRecorder) Get(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockUniversalClient)(nil).Get), arg0, arg1)
+}
+
+// GetBit mocks base method.
+func (m *MockUniversalClient) GetBit(arg0 context.Context, arg1 string, arg2 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GetBit", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// GetBit indicates an expected call of GetBit.
+func (mr *MockUniversalClientMockRecorder) GetBit(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBit", reflect.TypeOf((*MockUniversalClient)(nil).GetBit), arg0, arg1, arg2)
+}
+
+// GetDel mocks base method.
+func (m *MockUniversalClient) GetDel(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GetDel", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// GetDel indicates an expected call of GetDel.
+func (mr *MockUniversalClientMockRecorder) GetDel(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDel", reflect.TypeOf((*MockUniversalClient)(nil).GetDel), arg0, arg1)
+}
+
+// GetEx mocks base method.
+func (m *MockUniversalClient) GetEx(arg0 context.Context, arg1 string, arg2 time.Duration) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GetEx", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// GetEx indicates an expected call of GetEx.
+func (mr *MockUniversalClientMockRecorder) GetEx(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEx", reflect.TypeOf((*MockUniversalClient)(nil).GetEx), arg0, arg1, arg2)
+}
+
+// GetRange mocks base method.
+func (m *MockUniversalClient) GetRange(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GetRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// GetRange indicates an expected call of GetRange.
+func (mr *MockUniversalClientMockRecorder) GetRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRange", reflect.TypeOf((*MockUniversalClient)(nil).GetRange), arg0, arg1, arg2, arg3)
+}
+
+// GetSet mocks base method.
+func (m *MockUniversalClient) GetSet(arg0 context.Context, arg1 string, arg2 any) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "GetSet", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// GetSet indicates an expected call of GetSet.
+func (mr *MockUniversalClientMockRecorder) GetSet(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSet", reflect.TypeOf((*MockUniversalClient)(nil).GetSet), arg0, arg1, arg2)
+}
+
+// HDel mocks base method.
+func (m *MockUniversalClient) HDel(arg0 context.Context, arg1 string, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "HDel", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// HDel indicates an expected call of HDel.
+func (mr *MockUniversalClientMockRecorder) HDel(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HDel", reflect.TypeOf((*MockUniversalClient)(nil).HDel), varargs...)
+}
+
+// HExists mocks base method.
+func (m *MockUniversalClient) HExists(arg0 context.Context, arg1, arg2 string) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HExists", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// HExists indicates an expected call of HExists.
+func (mr *MockUniversalClientMockRecorder) HExists(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HExists", reflect.TypeOf((*MockUniversalClient)(nil).HExists), arg0, arg1, arg2)
+}
+
+// HGet mocks base method.
+func (m *MockUniversalClient) HGet(arg0 context.Context, arg1, arg2 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HGet", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// HGet indicates an expected call of HGet.
+func (mr *MockUniversalClientMockRecorder) HGet(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HGet", reflect.TypeOf((*MockUniversalClient)(nil).HGet), arg0, arg1, arg2)
+}
+
+// HGetAll mocks base method.
+func (m *MockUniversalClient) HGetAll(arg0 context.Context, arg1 string) *redis.MapStringStringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HGetAll", arg0, arg1)
+ ret0, _ := ret[0].(*redis.MapStringStringCmd)
+ return ret0
+}
+
+// HGetAll indicates an expected call of HGetAll.
+func (mr *MockUniversalClientMockRecorder) HGetAll(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HGetAll", reflect.TypeOf((*MockUniversalClient)(nil).HGetAll), arg0, arg1)
+}
+
+// HIncrBy mocks base method.
+func (m *MockUniversalClient) HIncrBy(arg0 context.Context, arg1, arg2 string, arg3 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HIncrBy", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// HIncrBy indicates an expected call of HIncrBy.
+func (mr *MockUniversalClientMockRecorder) HIncrBy(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HIncrBy", reflect.TypeOf((*MockUniversalClient)(nil).HIncrBy), arg0, arg1, arg2, arg3)
+}
+
+// HIncrByFloat mocks base method.
+func (m *MockUniversalClient) HIncrByFloat(arg0 context.Context, arg1, arg2 string, arg3 float64) *redis.FloatCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HIncrByFloat", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.FloatCmd)
+ return ret0
+}
+
+// HIncrByFloat indicates an expected call of HIncrByFloat.
+func (mr *MockUniversalClientMockRecorder) HIncrByFloat(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HIncrByFloat", reflect.TypeOf((*MockUniversalClient)(nil).HIncrByFloat), arg0, arg1, arg2, arg3)
+}
+
+// HKeys mocks base method.
+func (m *MockUniversalClient) HKeys(arg0 context.Context, arg1 string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HKeys", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// HKeys indicates an expected call of HKeys.
+func (mr *MockUniversalClientMockRecorder) HKeys(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HKeys", reflect.TypeOf((*MockUniversalClient)(nil).HKeys), arg0, arg1)
+}
+
+// HLen mocks base method.
+func (m *MockUniversalClient) HLen(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HLen", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// HLen indicates an expected call of HLen.
+func (mr *MockUniversalClientMockRecorder) HLen(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HLen", reflect.TypeOf((*MockUniversalClient)(nil).HLen), arg0, arg1)
+}
+
+// HMGet mocks base method.
+func (m *MockUniversalClient) HMGet(arg0 context.Context, arg1 string, arg2 ...string) *redis.SliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "HMGet", varargs...)
+ ret0, _ := ret[0].(*redis.SliceCmd)
+ return ret0
+}
+
+// HMGet indicates an expected call of HMGet.
+func (mr *MockUniversalClientMockRecorder) HMGet(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HMGet", reflect.TypeOf((*MockUniversalClient)(nil).HMGet), varargs...)
+}
+
+// HMSet mocks base method.
+func (m *MockUniversalClient) HMSet(arg0 context.Context, arg1 string, arg2 ...any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "HMSet", varargs...)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// HMSet indicates an expected call of HMSet.
+func (mr *MockUniversalClientMockRecorder) HMSet(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HMSet", reflect.TypeOf((*MockUniversalClient)(nil).HMSet), varargs...)
+}
+
+// HRandField mocks base method.
+func (m *MockUniversalClient) HRandField(arg0 context.Context, arg1 string, arg2 int) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HRandField", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// HRandField indicates an expected call of HRandField.
+func (mr *MockUniversalClientMockRecorder) HRandField(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HRandField", reflect.TypeOf((*MockUniversalClient)(nil).HRandField), arg0, arg1, arg2)
+}
+
+// HRandFieldWithValues mocks base method.
+func (m *MockUniversalClient) HRandFieldWithValues(arg0 context.Context, arg1 string, arg2 int) *redis.KeyValueSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HRandFieldWithValues", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.KeyValueSliceCmd)
+ return ret0
+}
+
+// HRandFieldWithValues indicates an expected call of HRandFieldWithValues.
+func (mr *MockUniversalClientMockRecorder) HRandFieldWithValues(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HRandFieldWithValues", reflect.TypeOf((*MockUniversalClient)(nil).HRandFieldWithValues), arg0, arg1, arg2)
+}
+
+// HScan mocks base method.
+func (m *MockUniversalClient) HScan(arg0 context.Context, arg1 string, arg2 uint64, arg3 string, arg4 int64) *redis.ScanCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HScan", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.ScanCmd)
+ return ret0
+}
+
+// HScan indicates an expected call of HScan.
+func (mr *MockUniversalClientMockRecorder) HScan(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HScan", reflect.TypeOf((*MockUniversalClient)(nil).HScan), arg0, arg1, arg2, arg3, arg4)
+}
+
+// HSet mocks base method.
+func (m *MockUniversalClient) HSet(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "HSet", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// HSet indicates an expected call of HSet.
+func (mr *MockUniversalClientMockRecorder) HSet(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HSet", reflect.TypeOf((*MockUniversalClient)(nil).HSet), varargs...)
+}
+
+// HSetNX mocks base method.
+func (m *MockUniversalClient) HSetNX(arg0 context.Context, arg1, arg2 string, arg3 any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HSetNX", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// HSetNX indicates an expected call of HSetNX.
+func (mr *MockUniversalClientMockRecorder) HSetNX(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HSetNX", reflect.TypeOf((*MockUniversalClient)(nil).HSetNX), arg0, arg1, arg2, arg3)
+}
+
+// HVals mocks base method.
+func (m *MockUniversalClient) HVals(arg0 context.Context, arg1 string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "HVals", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// HVals indicates an expected call of HVals.
+func (mr *MockUniversalClientMockRecorder) HVals(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HVals", reflect.TypeOf((*MockUniversalClient)(nil).HVals), arg0, arg1)
+}
+
+// Incr mocks base method.
+func (m *MockUniversalClient) Incr(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Incr", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// Incr indicates an expected call of Incr.
+func (mr *MockUniversalClientMockRecorder) Incr(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Incr", reflect.TypeOf((*MockUniversalClient)(nil).Incr), arg0, arg1)
+}
+
+// IncrBy mocks base method.
+func (m *MockUniversalClient) IncrBy(arg0 context.Context, arg1 string, arg2 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "IncrBy", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// IncrBy indicates an expected call of IncrBy.
+func (mr *MockUniversalClientMockRecorder) IncrBy(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncrBy", reflect.TypeOf((*MockUniversalClient)(nil).IncrBy), arg0, arg1, arg2)
+}
+
+// IncrByFloat mocks base method.
+func (m *MockUniversalClient) IncrByFloat(arg0 context.Context, arg1 string, arg2 float64) *redis.FloatCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "IncrByFloat", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.FloatCmd)
+ return ret0
+}
+
+// IncrByFloat indicates an expected call of IncrByFloat.
+func (mr *MockUniversalClientMockRecorder) IncrByFloat(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncrByFloat", reflect.TypeOf((*MockUniversalClient)(nil).IncrByFloat), arg0, arg1, arg2)
+}
+
+// Info mocks base method.
+func (m *MockUniversalClient) Info(arg0 context.Context, arg1 ...string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "Info", varargs...)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// Info indicates an expected call of Info.
+func (mr *MockUniversalClientMockRecorder) Info(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockUniversalClient)(nil).Info), varargs...)
+}
+
+// JSONArrAppend mocks base method.
+func (m *MockUniversalClient) JSONArrAppend(arg0 context.Context, arg1, arg2 string, arg3 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "JSONArrAppend", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// JSONArrAppend indicates an expected call of JSONArrAppend.
+func (mr *MockUniversalClientMockRecorder) JSONArrAppend(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONArrAppend", reflect.TypeOf((*MockUniversalClient)(nil).JSONArrAppend), varargs...)
+}
+
+// JSONArrIndex mocks base method.
+func (m *MockUniversalClient) JSONArrIndex(arg0 context.Context, arg1, arg2 string, arg3 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "JSONArrIndex", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// JSONArrIndex indicates an expected call of JSONArrIndex.
+func (mr *MockUniversalClientMockRecorder) JSONArrIndex(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONArrIndex", reflect.TypeOf((*MockUniversalClient)(nil).JSONArrIndex), varargs...)
+}
+
+// JSONArrIndexWithArgs mocks base method.
+func (m *MockUniversalClient) JSONArrIndexWithArgs(arg0 context.Context, arg1, arg2 string, arg3 *redis.JSONArrIndexArgs, arg4 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2, arg3}
+ for _, a := range arg4 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "JSONArrIndexWithArgs", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// JSONArrIndexWithArgs indicates an expected call of JSONArrIndexWithArgs.
+func (mr *MockUniversalClientMockRecorder) JSONArrIndexWithArgs(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONArrIndexWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).JSONArrIndexWithArgs), varargs...)
+}
+
+// JSONArrInsert mocks base method.
+func (m *MockUniversalClient) JSONArrInsert(arg0 context.Context, arg1, arg2 string, arg3 int64, arg4 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2, arg3}
+ for _, a := range arg4 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "JSONArrInsert", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// JSONArrInsert indicates an expected call of JSONArrInsert.
+func (mr *MockUniversalClientMockRecorder) JSONArrInsert(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONArrInsert", reflect.TypeOf((*MockUniversalClient)(nil).JSONArrInsert), varargs...)
+}
+
+// JSONArrLen mocks base method.
+func (m *MockUniversalClient) JSONArrLen(arg0 context.Context, arg1, arg2 string) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONArrLen", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// JSONArrLen indicates an expected call of JSONArrLen.
+func (mr *MockUniversalClientMockRecorder) JSONArrLen(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONArrLen", reflect.TypeOf((*MockUniversalClient)(nil).JSONArrLen), arg0, arg1, arg2)
+}
+
+// JSONArrPop mocks base method.
+func (m *MockUniversalClient) JSONArrPop(arg0 context.Context, arg1, arg2 string, arg3 int) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONArrPop", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// JSONArrPop indicates an expected call of JSONArrPop.
+func (mr *MockUniversalClientMockRecorder) JSONArrPop(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONArrPop", reflect.TypeOf((*MockUniversalClient)(nil).JSONArrPop), arg0, arg1, arg2, arg3)
+}
+
+// JSONArrTrim mocks base method.
+func (m *MockUniversalClient) JSONArrTrim(arg0 context.Context, arg1, arg2 string) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONArrTrim", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// JSONArrTrim indicates an expected call of JSONArrTrim.
+func (mr *MockUniversalClientMockRecorder) JSONArrTrim(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONArrTrim", reflect.TypeOf((*MockUniversalClient)(nil).JSONArrTrim), arg0, arg1, arg2)
+}
+
+// JSONArrTrimWithArgs mocks base method.
+func (m *MockUniversalClient) JSONArrTrimWithArgs(arg0 context.Context, arg1, arg2 string, arg3 *redis.JSONArrTrimArgs) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONArrTrimWithArgs", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// JSONArrTrimWithArgs indicates an expected call of JSONArrTrimWithArgs.
+func (mr *MockUniversalClientMockRecorder) JSONArrTrimWithArgs(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONArrTrimWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).JSONArrTrimWithArgs), arg0, arg1, arg2, arg3)
+}
+
+// JSONClear mocks base method.
+func (m *MockUniversalClient) JSONClear(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONClear", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// JSONClear indicates an expected call of JSONClear.
+func (mr *MockUniversalClientMockRecorder) JSONClear(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONClear", reflect.TypeOf((*MockUniversalClient)(nil).JSONClear), arg0, arg1, arg2)
+}
+
+// JSONDebugMemory mocks base method.
+func (m *MockUniversalClient) JSONDebugMemory(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONDebugMemory", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// JSONDebugMemory indicates an expected call of JSONDebugMemory.
+func (mr *MockUniversalClientMockRecorder) JSONDebugMemory(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONDebugMemory", reflect.TypeOf((*MockUniversalClient)(nil).JSONDebugMemory), arg0, arg1, arg2)
+}
+
+// JSONDel mocks base method.
+func (m *MockUniversalClient) JSONDel(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONDel", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// JSONDel indicates an expected call of JSONDel.
+func (mr *MockUniversalClientMockRecorder) JSONDel(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONDel", reflect.TypeOf((*MockUniversalClient)(nil).JSONDel), arg0, arg1, arg2)
+}
+
+// JSONForget mocks base method.
+func (m *MockUniversalClient) JSONForget(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONForget", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// JSONForget indicates an expected call of JSONForget.
+func (mr *MockUniversalClientMockRecorder) JSONForget(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONForget", reflect.TypeOf((*MockUniversalClient)(nil).JSONForget), arg0, arg1, arg2)
+}
+
+// JSONGet mocks base method.
+func (m *MockUniversalClient) JSONGet(arg0 context.Context, arg1 string, arg2 ...string) *redis.JSONCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "JSONGet", varargs...)
+ ret0, _ := ret[0].(*redis.JSONCmd)
+ return ret0
+}
+
+// JSONGet indicates an expected call of JSONGet.
+func (mr *MockUniversalClientMockRecorder) JSONGet(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONGet", reflect.TypeOf((*MockUniversalClient)(nil).JSONGet), varargs...)
+}
+
+// JSONGetWithArgs mocks base method.
+func (m *MockUniversalClient) JSONGetWithArgs(arg0 context.Context, arg1 string, arg2 *redis.JSONGetArgs, arg3 ...string) *redis.JSONCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "JSONGetWithArgs", varargs...)
+ ret0, _ := ret[0].(*redis.JSONCmd)
+ return ret0
+}
+
+// JSONGetWithArgs indicates an expected call of JSONGetWithArgs.
+func (mr *MockUniversalClientMockRecorder) JSONGetWithArgs(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONGetWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).JSONGetWithArgs), varargs...)
+}
+
+// JSONMGet mocks base method.
+func (m *MockUniversalClient) JSONMGet(arg0 context.Context, arg1 string, arg2 ...string) *redis.JSONSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "JSONMGet", varargs...)
+ ret0, _ := ret[0].(*redis.JSONSliceCmd)
+ return ret0
+}
+
+// JSONMGet indicates an expected call of JSONMGet.
+func (mr *MockUniversalClientMockRecorder) JSONMGet(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONMGet", reflect.TypeOf((*MockUniversalClient)(nil).JSONMGet), varargs...)
+}
+
+// JSONMSet mocks base method.
+func (m *MockUniversalClient) JSONMSet(arg0 context.Context, arg1 ...any) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "JSONMSet", varargs...)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// JSONMSet indicates an expected call of JSONMSet.
+func (mr *MockUniversalClientMockRecorder) JSONMSet(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONMSet", reflect.TypeOf((*MockUniversalClient)(nil).JSONMSet), varargs...)
+}
+
+// JSONMSetArgs mocks base method.
+func (m *MockUniversalClient) JSONMSetArgs(arg0 context.Context, arg1 []redis.JSONSetArgs) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONMSetArgs", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// JSONMSetArgs indicates an expected call of JSONMSetArgs.
+func (mr *MockUniversalClientMockRecorder) JSONMSetArgs(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONMSetArgs", reflect.TypeOf((*MockUniversalClient)(nil).JSONMSetArgs), arg0, arg1)
+}
+
+// JSONMerge mocks base method.
+func (m *MockUniversalClient) JSONMerge(arg0 context.Context, arg1, arg2, arg3 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONMerge", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// JSONMerge indicates an expected call of JSONMerge.
+func (mr *MockUniversalClientMockRecorder) JSONMerge(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONMerge", reflect.TypeOf((*MockUniversalClient)(nil).JSONMerge), arg0, arg1, arg2, arg3)
+}
+
+// JSONNumIncrBy mocks base method.
+func (m *MockUniversalClient) JSONNumIncrBy(arg0 context.Context, arg1, arg2 string, arg3 float64) *redis.JSONCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONNumIncrBy", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.JSONCmd)
+ return ret0
+}
+
+// JSONNumIncrBy indicates an expected call of JSONNumIncrBy.
+func (mr *MockUniversalClientMockRecorder) JSONNumIncrBy(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONNumIncrBy", reflect.TypeOf((*MockUniversalClient)(nil).JSONNumIncrBy), arg0, arg1, arg2, arg3)
+}
+
+// JSONObjKeys mocks base method.
+func (m *MockUniversalClient) JSONObjKeys(arg0 context.Context, arg1, arg2 string) *redis.SliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONObjKeys", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.SliceCmd)
+ return ret0
+}
+
+// JSONObjKeys indicates an expected call of JSONObjKeys.
+func (mr *MockUniversalClientMockRecorder) JSONObjKeys(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONObjKeys", reflect.TypeOf((*MockUniversalClient)(nil).JSONObjKeys), arg0, arg1, arg2)
+}
+
+// JSONObjLen mocks base method.
+func (m *MockUniversalClient) JSONObjLen(arg0 context.Context, arg1, arg2 string) *redis.IntPointerSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONObjLen", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntPointerSliceCmd)
+ return ret0
+}
+
+// JSONObjLen indicates an expected call of JSONObjLen.
+func (mr *MockUniversalClientMockRecorder) JSONObjLen(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONObjLen", reflect.TypeOf((*MockUniversalClient)(nil).JSONObjLen), arg0, arg1, arg2)
+}
+
+// JSONSet mocks base method.
+func (m *MockUniversalClient) JSONSet(arg0 context.Context, arg1, arg2 string, arg3 any) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONSet", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// JSONSet indicates an expected call of JSONSet.
+func (mr *MockUniversalClientMockRecorder) JSONSet(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONSet", reflect.TypeOf((*MockUniversalClient)(nil).JSONSet), arg0, arg1, arg2, arg3)
+}
+
+// JSONSetMode mocks base method.
+func (m *MockUniversalClient) JSONSetMode(arg0 context.Context, arg1, arg2 string, arg3 any, arg4 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONSetMode", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// JSONSetMode indicates an expected call of JSONSetMode.
+func (mr *MockUniversalClientMockRecorder) JSONSetMode(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONSetMode", reflect.TypeOf((*MockUniversalClient)(nil).JSONSetMode), arg0, arg1, arg2, arg3, arg4)
+}
+
+// JSONStrAppend mocks base method.
+func (m *MockUniversalClient) JSONStrAppend(arg0 context.Context, arg1, arg2, arg3 string) *redis.IntPointerSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONStrAppend", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntPointerSliceCmd)
+ return ret0
+}
+
+// JSONStrAppend indicates an expected call of JSONStrAppend.
+func (mr *MockUniversalClientMockRecorder) JSONStrAppend(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONStrAppend", reflect.TypeOf((*MockUniversalClient)(nil).JSONStrAppend), arg0, arg1, arg2, arg3)
+}
+
+// JSONStrLen mocks base method.
+func (m *MockUniversalClient) JSONStrLen(arg0 context.Context, arg1, arg2 string) *redis.IntPointerSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONStrLen", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntPointerSliceCmd)
+ return ret0
+}
+
+// JSONStrLen indicates an expected call of JSONStrLen.
+func (mr *MockUniversalClientMockRecorder) JSONStrLen(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONStrLen", reflect.TypeOf((*MockUniversalClient)(nil).JSONStrLen), arg0, arg1, arg2)
+}
+
+// JSONToggle mocks base method.
+func (m *MockUniversalClient) JSONToggle(arg0 context.Context, arg1, arg2 string) *redis.IntPointerSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONToggle", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntPointerSliceCmd)
+ return ret0
+}
+
+// JSONToggle indicates an expected call of JSONToggle.
+func (mr *MockUniversalClientMockRecorder) JSONToggle(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONToggle", reflect.TypeOf((*MockUniversalClient)(nil).JSONToggle), arg0, arg1, arg2)
+}
+
+// JSONType mocks base method.
+func (m *MockUniversalClient) JSONType(arg0 context.Context, arg1, arg2 string) *redis.JSONSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "JSONType", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.JSONSliceCmd)
+ return ret0
+}
+
+// JSONType indicates an expected call of JSONType.
+func (mr *MockUniversalClientMockRecorder) JSONType(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSONType", reflect.TypeOf((*MockUniversalClient)(nil).JSONType), arg0, arg1, arg2)
+}
+
+// Keys mocks base method.
+func (m *MockUniversalClient) Keys(arg0 context.Context, arg1 string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Keys", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// Keys indicates an expected call of Keys.
+func (mr *MockUniversalClientMockRecorder) Keys(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Keys", reflect.TypeOf((*MockUniversalClient)(nil).Keys), arg0, arg1)
+}
+
+// LCS mocks base method.
+func (m *MockUniversalClient) LCS(arg0 context.Context, arg1 *redis.LCSQuery) *redis.LCSCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LCS", arg0, arg1)
+ ret0, _ := ret[0].(*redis.LCSCmd)
+ return ret0
+}
+
+// LCS indicates an expected call of LCS.
+func (mr *MockUniversalClientMockRecorder) LCS(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LCS", reflect.TypeOf((*MockUniversalClient)(nil).LCS), arg0, arg1)
+}
+
+// LIndex mocks base method.
+func (m *MockUniversalClient) LIndex(arg0 context.Context, arg1 string, arg2 int64) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LIndex", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// LIndex indicates an expected call of LIndex.
+func (mr *MockUniversalClientMockRecorder) LIndex(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LIndex", reflect.TypeOf((*MockUniversalClient)(nil).LIndex), arg0, arg1, arg2)
+}
+
+// LInsert mocks base method.
+func (m *MockUniversalClient) LInsert(arg0 context.Context, arg1, arg2 string, arg3, arg4 any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LInsert", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// LInsert indicates an expected call of LInsert.
+func (mr *MockUniversalClientMockRecorder) LInsert(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LInsert", reflect.TypeOf((*MockUniversalClient)(nil).LInsert), arg0, arg1, arg2, arg3, arg4)
+}
+
+// LInsertAfter mocks base method.
+func (m *MockUniversalClient) LInsertAfter(arg0 context.Context, arg1 string, arg2, arg3 any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LInsertAfter", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// LInsertAfter indicates an expected call of LInsertAfter.
+func (mr *MockUniversalClientMockRecorder) LInsertAfter(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LInsertAfter", reflect.TypeOf((*MockUniversalClient)(nil).LInsertAfter), arg0, arg1, arg2, arg3)
+}
+
+// LInsertBefore mocks base method.
+func (m *MockUniversalClient) LInsertBefore(arg0 context.Context, arg1 string, arg2, arg3 any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LInsertBefore", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// LInsertBefore indicates an expected call of LInsertBefore.
+func (mr *MockUniversalClientMockRecorder) LInsertBefore(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LInsertBefore", reflect.TypeOf((*MockUniversalClient)(nil).LInsertBefore), arg0, arg1, arg2, arg3)
+}
+
+// LLen mocks base method.
+func (m *MockUniversalClient) LLen(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LLen", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// LLen indicates an expected call of LLen.
+func (mr *MockUniversalClientMockRecorder) LLen(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LLen", reflect.TypeOf((*MockUniversalClient)(nil).LLen), arg0, arg1)
+}
+
+// LMPop mocks base method.
+func (m *MockUniversalClient) LMPop(arg0 context.Context, arg1 string, arg2 int64, arg3 ...string) *redis.KeyValuesCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "LMPop", varargs...)
+ ret0, _ := ret[0].(*redis.KeyValuesCmd)
+ return ret0
+}
+
+// LMPop indicates an expected call of LMPop.
+func (mr *MockUniversalClientMockRecorder) LMPop(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LMPop", reflect.TypeOf((*MockUniversalClient)(nil).LMPop), varargs...)
+}
+
+// LMove mocks base method.
+func (m *MockUniversalClient) LMove(arg0 context.Context, arg1, arg2, arg3, arg4 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LMove", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// LMove indicates an expected call of LMove.
+func (mr *MockUniversalClientMockRecorder) LMove(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LMove", reflect.TypeOf((*MockUniversalClient)(nil).LMove), arg0, arg1, arg2, arg3, arg4)
+}
+
+// LPop mocks base method.
+func (m *MockUniversalClient) LPop(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LPop", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// LPop indicates an expected call of LPop.
+func (mr *MockUniversalClientMockRecorder) LPop(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LPop", reflect.TypeOf((*MockUniversalClient)(nil).LPop), arg0, arg1)
+}
+
+// LPopCount mocks base method.
+func (m *MockUniversalClient) LPopCount(arg0 context.Context, arg1 string, arg2 int) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LPopCount", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// LPopCount indicates an expected call of LPopCount.
+func (mr *MockUniversalClientMockRecorder) LPopCount(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LPopCount", reflect.TypeOf((*MockUniversalClient)(nil).LPopCount), arg0, arg1, arg2)
+}
+
+// LPos mocks base method.
+func (m *MockUniversalClient) LPos(arg0 context.Context, arg1, arg2 string, arg3 redis.LPosArgs) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LPos", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// LPos indicates an expected call of LPos.
+func (mr *MockUniversalClientMockRecorder) LPos(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LPos", reflect.TypeOf((*MockUniversalClient)(nil).LPos), arg0, arg1, arg2, arg3)
+}
+
+// LPosCount mocks base method.
+func (m *MockUniversalClient) LPosCount(arg0 context.Context, arg1, arg2 string, arg3 int64, arg4 redis.LPosArgs) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LPosCount", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// LPosCount indicates an expected call of LPosCount.
+func (mr *MockUniversalClientMockRecorder) LPosCount(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LPosCount", reflect.TypeOf((*MockUniversalClient)(nil).LPosCount), arg0, arg1, arg2, arg3, arg4)
+}
+
+// LPush mocks base method.
+func (m *MockUniversalClient) LPush(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "LPush", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// LPush indicates an expected call of LPush.
+func (mr *MockUniversalClientMockRecorder) LPush(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LPush", reflect.TypeOf((*MockUniversalClient)(nil).LPush), varargs...)
+}
+
+// LPushX mocks base method.
+func (m *MockUniversalClient) LPushX(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "LPushX", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// LPushX indicates an expected call of LPushX.
+func (mr *MockUniversalClientMockRecorder) LPushX(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LPushX", reflect.TypeOf((*MockUniversalClient)(nil).LPushX), varargs...)
+}
+
+// LRange mocks base method.
+func (m *MockUniversalClient) LRange(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// LRange indicates an expected call of LRange.
+func (mr *MockUniversalClientMockRecorder) LRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LRange", reflect.TypeOf((*MockUniversalClient)(nil).LRange), arg0, arg1, arg2, arg3)
+}
+
+// LRem mocks base method.
+func (m *MockUniversalClient) LRem(arg0 context.Context, arg1 string, arg2 int64, arg3 any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LRem", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// LRem indicates an expected call of LRem.
+func (mr *MockUniversalClientMockRecorder) LRem(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LRem", reflect.TypeOf((*MockUniversalClient)(nil).LRem), arg0, arg1, arg2, arg3)
+}
+
+// LSet mocks base method.
+func (m *MockUniversalClient) LSet(arg0 context.Context, arg1 string, arg2 int64, arg3 any) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LSet", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// LSet indicates an expected call of LSet.
+func (mr *MockUniversalClientMockRecorder) LSet(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LSet", reflect.TypeOf((*MockUniversalClient)(nil).LSet), arg0, arg1, arg2, arg3)
+}
+
+// LTrim mocks base method.
+func (m *MockUniversalClient) LTrim(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LTrim", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// LTrim indicates an expected call of LTrim.
+func (mr *MockUniversalClientMockRecorder) LTrim(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LTrim", reflect.TypeOf((*MockUniversalClient)(nil).LTrim), arg0, arg1, arg2, arg3)
+}
+
+// LastSave mocks base method.
+func (m *MockUniversalClient) LastSave(arg0 context.Context) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "LastSave", arg0)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// LastSave indicates an expected call of LastSave.
+func (mr *MockUniversalClientMockRecorder) LastSave(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastSave", reflect.TypeOf((*MockUniversalClient)(nil).LastSave), arg0)
+}
+
+// MGet mocks base method.
+func (m *MockUniversalClient) MGet(arg0 context.Context, arg1 ...string) *redis.SliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "MGet", varargs...)
+ ret0, _ := ret[0].(*redis.SliceCmd)
+ return ret0
+}
+
+// MGet indicates an expected call of MGet.
+func (mr *MockUniversalClientMockRecorder) MGet(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MGet", reflect.TypeOf((*MockUniversalClient)(nil).MGet), varargs...)
+}
+
+// MSet mocks base method.
+func (m *MockUniversalClient) MSet(arg0 context.Context, arg1 ...any) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "MSet", varargs...)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// MSet indicates an expected call of MSet.
+func (mr *MockUniversalClientMockRecorder) MSet(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MSet", reflect.TypeOf((*MockUniversalClient)(nil).MSet), varargs...)
+}
+
+// MSetNX mocks base method.
+func (m *MockUniversalClient) MSetNX(arg0 context.Context, arg1 ...any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "MSetNX", varargs...)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// MSetNX indicates an expected call of MSetNX.
+func (mr *MockUniversalClientMockRecorder) MSetNX(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MSetNX", reflect.TypeOf((*MockUniversalClient)(nil).MSetNX), varargs...)
+}
+
+// MemoryUsage mocks base method.
+func (m *MockUniversalClient) MemoryUsage(arg0 context.Context, arg1 string, arg2 ...int) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "MemoryUsage", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// MemoryUsage indicates an expected call of MemoryUsage.
+func (mr *MockUniversalClientMockRecorder) MemoryUsage(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MemoryUsage", reflect.TypeOf((*MockUniversalClient)(nil).MemoryUsage), varargs...)
+}
+
+// Migrate mocks base method.
+func (m *MockUniversalClient) Migrate(arg0 context.Context, arg1, arg2, arg3 string, arg4 int, arg5 time.Duration) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Migrate", arg0, arg1, arg2, arg3, arg4, arg5)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// Migrate indicates an expected call of Migrate.
+func (mr *MockUniversalClientMockRecorder) Migrate(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Migrate", reflect.TypeOf((*MockUniversalClient)(nil).Migrate), arg0, arg1, arg2, arg3, arg4, arg5)
+}
+
+// ModuleLoadex mocks base method.
+func (m *MockUniversalClient) ModuleLoadex(arg0 context.Context, arg1 *redis.ModuleLoadexConfig) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ModuleLoadex", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// ModuleLoadex indicates an expected call of ModuleLoadex.
+func (mr *MockUniversalClientMockRecorder) ModuleLoadex(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModuleLoadex", reflect.TypeOf((*MockUniversalClient)(nil).ModuleLoadex), arg0, arg1)
+}
+
+// Move mocks base method.
+func (m *MockUniversalClient) Move(arg0 context.Context, arg1 string, arg2 int) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Move", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// Move indicates an expected call of Move.
+func (mr *MockUniversalClientMockRecorder) Move(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Move", reflect.TypeOf((*MockUniversalClient)(nil).Move), arg0, arg1, arg2)
+}
+
+// ObjectEncoding mocks base method.
+func (m *MockUniversalClient) ObjectEncoding(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ObjectEncoding", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// ObjectEncoding indicates an expected call of ObjectEncoding.
+func (mr *MockUniversalClientMockRecorder) ObjectEncoding(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectEncoding", reflect.TypeOf((*MockUniversalClient)(nil).ObjectEncoding), arg0, arg1)
+}
+
+// ObjectFreq mocks base method.
+func (m *MockUniversalClient) ObjectFreq(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ObjectFreq", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ObjectFreq indicates an expected call of ObjectFreq.
+func (mr *MockUniversalClientMockRecorder) ObjectFreq(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectFreq", reflect.TypeOf((*MockUniversalClient)(nil).ObjectFreq), arg0, arg1)
+}
+
+// ObjectIdleTime mocks base method.
+func (m *MockUniversalClient) ObjectIdleTime(arg0 context.Context, arg1 string) *redis.DurationCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ObjectIdleTime", arg0, arg1)
+ ret0, _ := ret[0].(*redis.DurationCmd)
+ return ret0
+}
+
+// ObjectIdleTime indicates an expected call of ObjectIdleTime.
+func (mr *MockUniversalClientMockRecorder) ObjectIdleTime(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectIdleTime", reflect.TypeOf((*MockUniversalClient)(nil).ObjectIdleTime), arg0, arg1)
+}
+
+// ObjectRefCount mocks base method.
+func (m *MockUniversalClient) ObjectRefCount(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ObjectRefCount", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ObjectRefCount indicates an expected call of ObjectRefCount.
+func (mr *MockUniversalClientMockRecorder) ObjectRefCount(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectRefCount", reflect.TypeOf((*MockUniversalClient)(nil).ObjectRefCount), arg0, arg1)
+}
+
+// PExpire mocks base method.
+func (m *MockUniversalClient) PExpire(arg0 context.Context, arg1 string, arg2 time.Duration) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "PExpire", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// PExpire indicates an expected call of PExpire.
+func (mr *MockUniversalClientMockRecorder) PExpire(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PExpire", reflect.TypeOf((*MockUniversalClient)(nil).PExpire), arg0, arg1, arg2)
+}
+
+// PExpireAt mocks base method.
+func (m *MockUniversalClient) PExpireAt(arg0 context.Context, arg1 string, arg2 time.Time) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "PExpireAt", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// PExpireAt indicates an expected call of PExpireAt.
+func (mr *MockUniversalClientMockRecorder) PExpireAt(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PExpireAt", reflect.TypeOf((*MockUniversalClient)(nil).PExpireAt), arg0, arg1, arg2)
+}
+
+// PExpireTime mocks base method.
+func (m *MockUniversalClient) PExpireTime(arg0 context.Context, arg1 string) *redis.DurationCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "PExpireTime", arg0, arg1)
+ ret0, _ := ret[0].(*redis.DurationCmd)
+ return ret0
+}
+
+// PExpireTime indicates an expected call of PExpireTime.
+func (mr *MockUniversalClientMockRecorder) PExpireTime(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PExpireTime", reflect.TypeOf((*MockUniversalClient)(nil).PExpireTime), arg0, arg1)
+}
+
+// PFAdd mocks base method.
+func (m *MockUniversalClient) PFAdd(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "PFAdd", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// PFAdd indicates an expected call of PFAdd.
+func (mr *MockUniversalClientMockRecorder) PFAdd(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PFAdd", reflect.TypeOf((*MockUniversalClient)(nil).PFAdd), varargs...)
+}
+
+// PFCount mocks base method.
+func (m *MockUniversalClient) PFCount(arg0 context.Context, arg1 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "PFCount", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// PFCount indicates an expected call of PFCount.
+func (mr *MockUniversalClientMockRecorder) PFCount(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PFCount", reflect.TypeOf((*MockUniversalClient)(nil).PFCount), varargs...)
+}
+
+// PFMerge mocks base method.
+func (m *MockUniversalClient) PFMerge(arg0 context.Context, arg1 string, arg2 ...string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "PFMerge", varargs...)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// PFMerge indicates an expected call of PFMerge.
+func (mr *MockUniversalClientMockRecorder) PFMerge(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PFMerge", reflect.TypeOf((*MockUniversalClient)(nil).PFMerge), varargs...)
+}
+
+// PSubscribe mocks base method.
+func (m *MockUniversalClient) PSubscribe(arg0 context.Context, arg1 ...string) *redis.PubSub {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "PSubscribe", varargs...)
+ ret0, _ := ret[0].(*redis.PubSub)
+ return ret0
+}
+
+// PSubscribe indicates an expected call of PSubscribe.
+func (mr *MockUniversalClientMockRecorder) PSubscribe(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PSubscribe", reflect.TypeOf((*MockUniversalClient)(nil).PSubscribe), varargs...)
+}
+
+// PTTL mocks base method.
+func (m *MockUniversalClient) PTTL(arg0 context.Context, arg1 string) *redis.DurationCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "PTTL", arg0, arg1)
+ ret0, _ := ret[0].(*redis.DurationCmd)
+ return ret0
+}
+
+// PTTL indicates an expected call of PTTL.
+func (mr *MockUniversalClientMockRecorder) PTTL(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PTTL", reflect.TypeOf((*MockUniversalClient)(nil).PTTL), arg0, arg1)
+}
+
+// Persist mocks base method.
+func (m *MockUniversalClient) Persist(arg0 context.Context, arg1 string) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Persist", arg0, arg1)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// Persist indicates an expected call of Persist.
+func (mr *MockUniversalClientMockRecorder) Persist(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Persist", reflect.TypeOf((*MockUniversalClient)(nil).Persist), arg0, arg1)
+}
+
+// Ping mocks base method.
+func (m *MockUniversalClient) Ping(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Ping", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// Ping indicates an expected call of Ping.
+func (mr *MockUniversalClientMockRecorder) Ping(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockUniversalClient)(nil).Ping), arg0)
+}
+
+// Pipeline mocks base method.
+func (m *MockUniversalClient) Pipeline() redis.Pipeliner {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Pipeline")
+ ret0, _ := ret[0].(redis.Pipeliner)
+ return ret0
+}
+
+// Pipeline indicates an expected call of Pipeline.
+func (mr *MockUniversalClientMockRecorder) Pipeline() *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pipeline", reflect.TypeOf((*MockUniversalClient)(nil).Pipeline))
+}
+
+// Pipelined mocks base method.
+func (m *MockUniversalClient) Pipelined(arg0 context.Context, arg1 func(redis.Pipeliner) error) ([]redis.Cmder, error) {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Pipelined", arg0, arg1)
+ ret0, _ := ret[0].([]redis.Cmder)
+ ret1, _ := ret[1].(error)
+ return ret0, ret1
+}
+
+// Pipelined indicates an expected call of Pipelined.
+func (mr *MockUniversalClientMockRecorder) Pipelined(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pipelined", reflect.TypeOf((*MockUniversalClient)(nil).Pipelined), arg0, arg1)
+}
+
+// PoolStats mocks base method.
+func (m *MockUniversalClient) PoolStats() *redis.PoolStats {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "PoolStats")
+ ret0, _ := ret[0].(*redis.PoolStats)
+ return ret0
+}
+
+// PoolStats indicates an expected call of PoolStats.
+func (mr *MockUniversalClientMockRecorder) PoolStats() *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PoolStats", reflect.TypeOf((*MockUniversalClient)(nil).PoolStats))
+}
+
+// Process mocks base method.
+func (m *MockUniversalClient) Process(arg0 context.Context, arg1 redis.Cmder) error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Process", arg0, arg1)
+ ret0, _ := ret[0].(error)
+ return ret0
+}
+
+// Process indicates an expected call of Process.
+func (mr *MockUniversalClientMockRecorder) Process(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Process", reflect.TypeOf((*MockUniversalClient)(nil).Process), arg0, arg1)
+}
+
+// PubSubChannels mocks base method.
+func (m *MockUniversalClient) PubSubChannels(arg0 context.Context, arg1 string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "PubSubChannels", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// PubSubChannels indicates an expected call of PubSubChannels.
+func (mr *MockUniversalClientMockRecorder) PubSubChannels(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PubSubChannels", reflect.TypeOf((*MockUniversalClient)(nil).PubSubChannels), arg0, arg1)
+}
+
+// PubSubNumPat mocks base method.
+func (m *MockUniversalClient) PubSubNumPat(arg0 context.Context) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "PubSubNumPat", arg0)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// PubSubNumPat indicates an expected call of PubSubNumPat.
+func (mr *MockUniversalClientMockRecorder) PubSubNumPat(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PubSubNumPat", reflect.TypeOf((*MockUniversalClient)(nil).PubSubNumPat), arg0)
+}
+
+// PubSubNumSub mocks base method.
+func (m *MockUniversalClient) PubSubNumSub(arg0 context.Context, arg1 ...string) *redis.MapStringIntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "PubSubNumSub", varargs...)
+ ret0, _ := ret[0].(*redis.MapStringIntCmd)
+ return ret0
+}
+
+// PubSubNumSub indicates an expected call of PubSubNumSub.
+func (mr *MockUniversalClientMockRecorder) PubSubNumSub(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PubSubNumSub", reflect.TypeOf((*MockUniversalClient)(nil).PubSubNumSub), varargs...)
+}
+
+// PubSubShardChannels mocks base method.
+func (m *MockUniversalClient) PubSubShardChannels(arg0 context.Context, arg1 string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "PubSubShardChannels", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// PubSubShardChannels indicates an expected call of PubSubShardChannels.
+func (mr *MockUniversalClientMockRecorder) PubSubShardChannels(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PubSubShardChannels", reflect.TypeOf((*MockUniversalClient)(nil).PubSubShardChannels), arg0, arg1)
+}
+
+// PubSubShardNumSub mocks base method.
+func (m *MockUniversalClient) PubSubShardNumSub(arg0 context.Context, arg1 ...string) *redis.MapStringIntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "PubSubShardNumSub", varargs...)
+ ret0, _ := ret[0].(*redis.MapStringIntCmd)
+ return ret0
+}
+
+// PubSubShardNumSub indicates an expected call of PubSubShardNumSub.
+func (mr *MockUniversalClientMockRecorder) PubSubShardNumSub(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PubSubShardNumSub", reflect.TypeOf((*MockUniversalClient)(nil).PubSubShardNumSub), varargs...)
+}
+
+// Publish mocks base method.
+func (m *MockUniversalClient) Publish(arg0 context.Context, arg1 string, arg2 any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Publish", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// Publish indicates an expected call of Publish.
+func (mr *MockUniversalClientMockRecorder) Publish(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockUniversalClient)(nil).Publish), arg0, arg1, arg2)
+}
+
+// Quit mocks base method.
+func (m *MockUniversalClient) Quit(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Quit", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// Quit indicates an expected call of Quit.
+func (mr *MockUniversalClientMockRecorder) Quit(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Quit", reflect.TypeOf((*MockUniversalClient)(nil).Quit), arg0)
+}
+
+// RPop mocks base method.
+func (m *MockUniversalClient) RPop(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "RPop", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// RPop indicates an expected call of RPop.
+func (mr *MockUniversalClientMockRecorder) RPop(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RPop", reflect.TypeOf((*MockUniversalClient)(nil).RPop), arg0, arg1)
+}
+
+// RPopCount mocks base method.
+func (m *MockUniversalClient) RPopCount(arg0 context.Context, arg1 string, arg2 int) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "RPopCount", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// RPopCount indicates an expected call of RPopCount.
+func (mr *MockUniversalClientMockRecorder) RPopCount(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RPopCount", reflect.TypeOf((*MockUniversalClient)(nil).RPopCount), arg0, arg1, arg2)
+}
+
+// RPopLPush mocks base method.
+func (m *MockUniversalClient) RPopLPush(arg0 context.Context, arg1, arg2 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "RPopLPush", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// RPopLPush indicates an expected call of RPopLPush.
+func (mr *MockUniversalClientMockRecorder) RPopLPush(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RPopLPush", reflect.TypeOf((*MockUniversalClient)(nil).RPopLPush), arg0, arg1, arg2)
+}
+
+// RPush mocks base method.
+func (m *MockUniversalClient) RPush(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "RPush", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// RPush indicates an expected call of RPush.
+func (mr *MockUniversalClientMockRecorder) RPush(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RPush", reflect.TypeOf((*MockUniversalClient)(nil).RPush), varargs...)
+}
+
+// RPushX mocks base method.
+func (m *MockUniversalClient) RPushX(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "RPushX", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// RPushX indicates an expected call of RPushX.
+func (mr *MockUniversalClientMockRecorder) RPushX(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RPushX", reflect.TypeOf((*MockUniversalClient)(nil).RPushX), varargs...)
+}
+
+// RandomKey mocks base method.
+func (m *MockUniversalClient) RandomKey(arg0 context.Context) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "RandomKey", arg0)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// RandomKey indicates an expected call of RandomKey.
+func (mr *MockUniversalClientMockRecorder) RandomKey(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RandomKey", reflect.TypeOf((*MockUniversalClient)(nil).RandomKey), arg0)
+}
+
+// ReadOnly mocks base method.
+func (m *MockUniversalClient) ReadOnly(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ReadOnly", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ReadOnly indicates an expected call of ReadOnly.
+func (mr *MockUniversalClientMockRecorder) ReadOnly(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadOnly", reflect.TypeOf((*MockUniversalClient)(nil).ReadOnly), arg0)
+}
+
+// ReadWrite mocks base method.
+func (m *MockUniversalClient) ReadWrite(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ReadWrite", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ReadWrite indicates an expected call of ReadWrite.
+func (mr *MockUniversalClientMockRecorder) ReadWrite(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadWrite", reflect.TypeOf((*MockUniversalClient)(nil).ReadWrite), arg0)
+}
+
+// Rename mocks base method.
+func (m *MockUniversalClient) Rename(arg0 context.Context, arg1, arg2 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Rename", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// Rename indicates an expected call of Rename.
+func (mr *MockUniversalClientMockRecorder) Rename(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rename", reflect.TypeOf((*MockUniversalClient)(nil).Rename), arg0, arg1, arg2)
+}
+
+// RenameNX mocks base method.
+func (m *MockUniversalClient) RenameNX(arg0 context.Context, arg1, arg2 string) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "RenameNX", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// RenameNX indicates an expected call of RenameNX.
+func (mr *MockUniversalClientMockRecorder) RenameNX(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameNX", reflect.TypeOf((*MockUniversalClient)(nil).RenameNX), arg0, arg1, arg2)
+}
+
+// Restore mocks base method.
+func (m *MockUniversalClient) Restore(arg0 context.Context, arg1 string, arg2 time.Duration, arg3 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Restore", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// Restore indicates an expected call of Restore.
+func (mr *MockUniversalClientMockRecorder) Restore(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Restore", reflect.TypeOf((*MockUniversalClient)(nil).Restore), arg0, arg1, arg2, arg3)
+}
+
+// RestoreReplace mocks base method.
+func (m *MockUniversalClient) RestoreReplace(arg0 context.Context, arg1 string, arg2 time.Duration, arg3 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "RestoreReplace", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// RestoreReplace indicates an expected call of RestoreReplace.
+func (mr *MockUniversalClientMockRecorder) RestoreReplace(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoreReplace", reflect.TypeOf((*MockUniversalClient)(nil).RestoreReplace), arg0, arg1, arg2, arg3)
+}
+
+// SAdd mocks base method.
+func (m *MockUniversalClient) SAdd(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SAdd", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SAdd indicates an expected call of SAdd.
+func (mr *MockUniversalClientMockRecorder) SAdd(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SAdd", reflect.TypeOf((*MockUniversalClient)(nil).SAdd), varargs...)
+}
+
+// SCard mocks base method.
+func (m *MockUniversalClient) SCard(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SCard", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SCard indicates an expected call of SCard.
+func (mr *MockUniversalClientMockRecorder) SCard(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SCard", reflect.TypeOf((*MockUniversalClient)(nil).SCard), arg0, arg1)
+}
+
+// SDiff mocks base method.
+func (m *MockUniversalClient) SDiff(arg0 context.Context, arg1 ...string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SDiff", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// SDiff indicates an expected call of SDiff.
+func (mr *MockUniversalClientMockRecorder) SDiff(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SDiff", reflect.TypeOf((*MockUniversalClient)(nil).SDiff), varargs...)
+}
+
+// SDiffStore mocks base method.
+func (m *MockUniversalClient) SDiffStore(arg0 context.Context, arg1 string, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SDiffStore", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SDiffStore indicates an expected call of SDiffStore.
+func (mr *MockUniversalClientMockRecorder) SDiffStore(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SDiffStore", reflect.TypeOf((*MockUniversalClient)(nil).SDiffStore), varargs...)
+}
+
+// SInter mocks base method.
+func (m *MockUniversalClient) SInter(arg0 context.Context, arg1 ...string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SInter", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// SInter indicates an expected call of SInter.
+func (mr *MockUniversalClientMockRecorder) SInter(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SInter", reflect.TypeOf((*MockUniversalClient)(nil).SInter), varargs...)
+}
+
+// SInterCard mocks base method.
+func (m *MockUniversalClient) SInterCard(arg0 context.Context, arg1 int64, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SInterCard", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SInterCard indicates an expected call of SInterCard.
+func (mr *MockUniversalClientMockRecorder) SInterCard(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SInterCard", reflect.TypeOf((*MockUniversalClient)(nil).SInterCard), varargs...)
+}
+
+// SInterStore mocks base method.
+func (m *MockUniversalClient) SInterStore(arg0 context.Context, arg1 string, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SInterStore", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SInterStore indicates an expected call of SInterStore.
+func (mr *MockUniversalClientMockRecorder) SInterStore(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SInterStore", reflect.TypeOf((*MockUniversalClient)(nil).SInterStore), varargs...)
+}
+
+// SIsMember mocks base method.
+func (m *MockUniversalClient) SIsMember(arg0 context.Context, arg1 string, arg2 any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SIsMember", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// SIsMember indicates an expected call of SIsMember.
+func (mr *MockUniversalClientMockRecorder) SIsMember(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SIsMember", reflect.TypeOf((*MockUniversalClient)(nil).SIsMember), arg0, arg1, arg2)
+}
+
+// SMIsMember mocks base method.
+func (m *MockUniversalClient) SMIsMember(arg0 context.Context, arg1 string, arg2 ...any) *redis.BoolSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SMIsMember", varargs...)
+ ret0, _ := ret[0].(*redis.BoolSliceCmd)
+ return ret0
+}
+
+// SMIsMember indicates an expected call of SMIsMember.
+func (mr *MockUniversalClientMockRecorder) SMIsMember(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SMIsMember", reflect.TypeOf((*MockUniversalClient)(nil).SMIsMember), varargs...)
+}
+
+// SMembers mocks base method.
+func (m *MockUniversalClient) SMembers(arg0 context.Context, arg1 string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SMembers", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// SMembers indicates an expected call of SMembers.
+func (mr *MockUniversalClientMockRecorder) SMembers(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SMembers", reflect.TypeOf((*MockUniversalClient)(nil).SMembers), arg0, arg1)
+}
+
+// SMembersMap mocks base method.
+func (m *MockUniversalClient) SMembersMap(arg0 context.Context, arg1 string) *redis.StringStructMapCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SMembersMap", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringStructMapCmd)
+ return ret0
+}
+
+// SMembersMap indicates an expected call of SMembersMap.
+func (mr *MockUniversalClientMockRecorder) SMembersMap(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SMembersMap", reflect.TypeOf((*MockUniversalClient)(nil).SMembersMap), arg0, arg1)
+}
+
+// SMove mocks base method.
+func (m *MockUniversalClient) SMove(arg0 context.Context, arg1, arg2 string, arg3 any) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SMove", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// SMove indicates an expected call of SMove.
+func (mr *MockUniversalClientMockRecorder) SMove(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SMove", reflect.TypeOf((*MockUniversalClient)(nil).SMove), arg0, arg1, arg2, arg3)
+}
+
+// SPop mocks base method.
+func (m *MockUniversalClient) SPop(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SPop", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// SPop indicates an expected call of SPop.
+func (mr *MockUniversalClientMockRecorder) SPop(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SPop", reflect.TypeOf((*MockUniversalClient)(nil).SPop), arg0, arg1)
+}
+
+// SPopN mocks base method.
+func (m *MockUniversalClient) SPopN(arg0 context.Context, arg1 string, arg2 int64) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SPopN", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// SPopN indicates an expected call of SPopN.
+func (mr *MockUniversalClientMockRecorder) SPopN(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SPopN", reflect.TypeOf((*MockUniversalClient)(nil).SPopN), arg0, arg1, arg2)
+}
+
+// SPublish mocks base method.
+func (m *MockUniversalClient) SPublish(arg0 context.Context, arg1 string, arg2 any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SPublish", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SPublish indicates an expected call of SPublish.
+func (mr *MockUniversalClientMockRecorder) SPublish(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SPublish", reflect.TypeOf((*MockUniversalClient)(nil).SPublish), arg0, arg1, arg2)
+}
+
+// SRandMember mocks base method.
+func (m *MockUniversalClient) SRandMember(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SRandMember", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// SRandMember indicates an expected call of SRandMember.
+func (mr *MockUniversalClientMockRecorder) SRandMember(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SRandMember", reflect.TypeOf((*MockUniversalClient)(nil).SRandMember), arg0, arg1)
+}
+
+// SRandMemberN mocks base method.
+func (m *MockUniversalClient) SRandMemberN(arg0 context.Context, arg1 string, arg2 int64) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SRandMemberN", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// SRandMemberN indicates an expected call of SRandMemberN.
+func (mr *MockUniversalClientMockRecorder) SRandMemberN(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SRandMemberN", reflect.TypeOf((*MockUniversalClient)(nil).SRandMemberN), arg0, arg1, arg2)
+}
+
+// SRem mocks base method.
+func (m *MockUniversalClient) SRem(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SRem", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SRem indicates an expected call of SRem.
+func (mr *MockUniversalClientMockRecorder) SRem(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SRem", reflect.TypeOf((*MockUniversalClient)(nil).SRem), varargs...)
+}
+
+// SScan mocks base method.
+func (m *MockUniversalClient) SScan(arg0 context.Context, arg1 string, arg2 uint64, arg3 string, arg4 int64) *redis.ScanCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SScan", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.ScanCmd)
+ return ret0
+}
+
+// SScan indicates an expected call of SScan.
+func (mr *MockUniversalClientMockRecorder) SScan(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SScan", reflect.TypeOf((*MockUniversalClient)(nil).SScan), arg0, arg1, arg2, arg3, arg4)
+}
+
+// SSubscribe mocks base method.
+func (m *MockUniversalClient) SSubscribe(arg0 context.Context, arg1 ...string) *redis.PubSub {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SSubscribe", varargs...)
+ ret0, _ := ret[0].(*redis.PubSub)
+ return ret0
+}
+
+// SSubscribe indicates an expected call of SSubscribe.
+func (mr *MockUniversalClientMockRecorder) SSubscribe(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SSubscribe", reflect.TypeOf((*MockUniversalClient)(nil).SSubscribe), varargs...)
+}
+
+// SUnion mocks base method.
+func (m *MockUniversalClient) SUnion(arg0 context.Context, arg1 ...string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SUnion", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// SUnion indicates an expected call of SUnion.
+func (mr *MockUniversalClientMockRecorder) SUnion(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SUnion", reflect.TypeOf((*MockUniversalClient)(nil).SUnion), varargs...)
+}
+
+// SUnionStore mocks base method.
+func (m *MockUniversalClient) SUnionStore(arg0 context.Context, arg1 string, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "SUnionStore", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SUnionStore indicates an expected call of SUnionStore.
+func (mr *MockUniversalClientMockRecorder) SUnionStore(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SUnionStore", reflect.TypeOf((*MockUniversalClient)(nil).SUnionStore), varargs...)
+}
+
+// Save mocks base method.
+func (m *MockUniversalClient) Save(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Save", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// Save indicates an expected call of Save.
+func (mr *MockUniversalClientMockRecorder) Save(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockUniversalClient)(nil).Save), arg0)
+}
+
+// Scan mocks base method.
+func (m *MockUniversalClient) Scan(arg0 context.Context, arg1 uint64, arg2 string, arg3 int64) *redis.ScanCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Scan", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.ScanCmd)
+ return ret0
+}
+
+// Scan indicates an expected call of Scan.
+func (mr *MockUniversalClientMockRecorder) Scan(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scan", reflect.TypeOf((*MockUniversalClient)(nil).Scan), arg0, arg1, arg2, arg3)
+}
+
+// ScanType mocks base method.
+func (m *MockUniversalClient) ScanType(arg0 context.Context, arg1 uint64, arg2 string, arg3 int64, arg4 string) *redis.ScanCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ScanType", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.ScanCmd)
+ return ret0
+}
+
+// ScanType indicates an expected call of ScanType.
+func (mr *MockUniversalClientMockRecorder) ScanType(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScanType", reflect.TypeOf((*MockUniversalClient)(nil).ScanType), arg0, arg1, arg2, arg3, arg4)
+}
+
+// ScriptExists mocks base method.
+func (m *MockUniversalClient) ScriptExists(arg0 context.Context, arg1 ...string) *redis.BoolSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ScriptExists", varargs...)
+ ret0, _ := ret[0].(*redis.BoolSliceCmd)
+ return ret0
+}
+
+// ScriptExists indicates an expected call of ScriptExists.
+func (mr *MockUniversalClientMockRecorder) ScriptExists(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScriptExists", reflect.TypeOf((*MockUniversalClient)(nil).ScriptExists), varargs...)
+}
+
+// ScriptFlush mocks base method.
+func (m *MockUniversalClient) ScriptFlush(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ScriptFlush", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ScriptFlush indicates an expected call of ScriptFlush.
+func (mr *MockUniversalClientMockRecorder) ScriptFlush(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScriptFlush", reflect.TypeOf((*MockUniversalClient)(nil).ScriptFlush), arg0)
+}
+
+// ScriptKill mocks base method.
+func (m *MockUniversalClient) ScriptKill(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ScriptKill", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ScriptKill indicates an expected call of ScriptKill.
+func (mr *MockUniversalClientMockRecorder) ScriptKill(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScriptKill", reflect.TypeOf((*MockUniversalClient)(nil).ScriptKill), arg0)
+}
+
+// ScriptLoad mocks base method.
+func (m *MockUniversalClient) ScriptLoad(arg0 context.Context, arg1 string) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ScriptLoad", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// ScriptLoad indicates an expected call of ScriptLoad.
+func (mr *MockUniversalClientMockRecorder) ScriptLoad(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScriptLoad", reflect.TypeOf((*MockUniversalClient)(nil).ScriptLoad), arg0, arg1)
+}
+
+// Set mocks base method.
+func (m *MockUniversalClient) Set(arg0 context.Context, arg1 string, arg2 any, arg3 time.Duration) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Set", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// Set indicates an expected call of Set.
+func (mr *MockUniversalClientMockRecorder) Set(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockUniversalClient)(nil).Set), arg0, arg1, arg2, arg3)
+}
+
+// SetArgs mocks base method.
+func (m *MockUniversalClient) SetArgs(arg0 context.Context, arg1 string, arg2 any, arg3 redis.SetArgs) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SetArgs", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// SetArgs indicates an expected call of SetArgs.
+func (mr *MockUniversalClientMockRecorder) SetArgs(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetArgs", reflect.TypeOf((*MockUniversalClient)(nil).SetArgs), arg0, arg1, arg2, arg3)
+}
+
+// SetBit mocks base method.
+func (m *MockUniversalClient) SetBit(arg0 context.Context, arg1 string, arg2 int64, arg3 int) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SetBit", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SetBit indicates an expected call of SetBit.
+func (mr *MockUniversalClientMockRecorder) SetBit(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetBit", reflect.TypeOf((*MockUniversalClient)(nil).SetBit), arg0, arg1, arg2, arg3)
+}
+
+// SetEx mocks base method.
+func (m *MockUniversalClient) SetEx(arg0 context.Context, arg1 string, arg2 any, arg3 time.Duration) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SetEx", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// SetEx indicates an expected call of SetEx.
+func (mr *MockUniversalClientMockRecorder) SetEx(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetEx", reflect.TypeOf((*MockUniversalClient)(nil).SetEx), arg0, arg1, arg2, arg3)
+}
+
+// SetNX mocks base method.
+func (m *MockUniversalClient) SetNX(arg0 context.Context, arg1 string, arg2 any, arg3 time.Duration) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SetNX", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// SetNX indicates an expected call of SetNX.
+func (mr *MockUniversalClientMockRecorder) SetNX(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetNX", reflect.TypeOf((*MockUniversalClient)(nil).SetNX), arg0, arg1, arg2, arg3)
+}
+
+// SetRange mocks base method.
+func (m *MockUniversalClient) SetRange(arg0 context.Context, arg1 string, arg2 int64, arg3 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SetRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SetRange indicates an expected call of SetRange.
+func (mr *MockUniversalClientMockRecorder) SetRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRange", reflect.TypeOf((*MockUniversalClient)(nil).SetRange), arg0, arg1, arg2, arg3)
+}
+
+// SetXX mocks base method.
+func (m *MockUniversalClient) SetXX(arg0 context.Context, arg1 string, arg2 any, arg3 time.Duration) *redis.BoolCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SetXX", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.BoolCmd)
+ return ret0
+}
+
+// SetXX indicates an expected call of SetXX.
+func (mr *MockUniversalClientMockRecorder) SetXX(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetXX", reflect.TypeOf((*MockUniversalClient)(nil).SetXX), arg0, arg1, arg2, arg3)
+}
+
+// Shutdown mocks base method.
+func (m *MockUniversalClient) Shutdown(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Shutdown", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// Shutdown indicates an expected call of Shutdown.
+func (mr *MockUniversalClientMockRecorder) Shutdown(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockUniversalClient)(nil).Shutdown), arg0)
+}
+
+// ShutdownNoSave mocks base method.
+func (m *MockUniversalClient) ShutdownNoSave(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ShutdownNoSave", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ShutdownNoSave indicates an expected call of ShutdownNoSave.
+func (mr *MockUniversalClientMockRecorder) ShutdownNoSave(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShutdownNoSave", reflect.TypeOf((*MockUniversalClient)(nil).ShutdownNoSave), arg0)
+}
+
+// ShutdownSave mocks base method.
+func (m *MockUniversalClient) ShutdownSave(arg0 context.Context) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ShutdownSave", arg0)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// ShutdownSave indicates an expected call of ShutdownSave.
+func (mr *MockUniversalClientMockRecorder) ShutdownSave(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShutdownSave", reflect.TypeOf((*MockUniversalClient)(nil).ShutdownSave), arg0)
+}
+
+// SlaveOf mocks base method.
+func (m *MockUniversalClient) SlaveOf(arg0 context.Context, arg1, arg2 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SlaveOf", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// SlaveOf indicates an expected call of SlaveOf.
+func (mr *MockUniversalClientMockRecorder) SlaveOf(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SlaveOf", reflect.TypeOf((*MockUniversalClient)(nil).SlaveOf), arg0, arg1, arg2)
+}
+
+// SlowLogGet mocks base method.
+func (m *MockUniversalClient) SlowLogGet(arg0 context.Context, arg1 int64) *redis.SlowLogCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SlowLogGet", arg0, arg1)
+ ret0, _ := ret[0].(*redis.SlowLogCmd)
+ return ret0
+}
+
+// SlowLogGet indicates an expected call of SlowLogGet.
+func (mr *MockUniversalClientMockRecorder) SlowLogGet(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SlowLogGet", reflect.TypeOf((*MockUniversalClient)(nil).SlowLogGet), arg0, arg1)
+}
+
+// Sort mocks base method.
+func (m *MockUniversalClient) Sort(arg0 context.Context, arg1 string, arg2 *redis.Sort) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Sort", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// Sort indicates an expected call of Sort.
+func (mr *MockUniversalClientMockRecorder) Sort(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sort", reflect.TypeOf((*MockUniversalClient)(nil).Sort), arg0, arg1, arg2)
+}
+
+// SortInterfaces mocks base method.
+func (m *MockUniversalClient) SortInterfaces(arg0 context.Context, arg1 string, arg2 *redis.Sort) *redis.SliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SortInterfaces", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.SliceCmd)
+ return ret0
+}
+
+// SortInterfaces indicates an expected call of SortInterfaces.
+func (mr *MockUniversalClientMockRecorder) SortInterfaces(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SortInterfaces", reflect.TypeOf((*MockUniversalClient)(nil).SortInterfaces), arg0, arg1, arg2)
+}
+
+// SortRO mocks base method.
+func (m *MockUniversalClient) SortRO(arg0 context.Context, arg1 string, arg2 *redis.Sort) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SortRO", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// SortRO indicates an expected call of SortRO.
+func (mr *MockUniversalClientMockRecorder) SortRO(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SortRO", reflect.TypeOf((*MockUniversalClient)(nil).SortRO), arg0, arg1, arg2)
+}
+
+// SortStore mocks base method.
+func (m *MockUniversalClient) SortStore(arg0 context.Context, arg1, arg2 string, arg3 *redis.Sort) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "SortStore", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// SortStore indicates an expected call of SortStore.
+func (mr *MockUniversalClientMockRecorder) SortStore(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SortStore", reflect.TypeOf((*MockUniversalClient)(nil).SortStore), arg0, arg1, arg2, arg3)
+}
+
+// StrLen mocks base method.
+func (m *MockUniversalClient) StrLen(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "StrLen", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// StrLen indicates an expected call of StrLen.
+func (mr *MockUniversalClientMockRecorder) StrLen(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StrLen", reflect.TypeOf((*MockUniversalClient)(nil).StrLen), arg0, arg1)
+}
+
+// Subscribe mocks base method.
+func (m *MockUniversalClient) Subscribe(arg0 context.Context, arg1 ...string) *redis.PubSub {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "Subscribe", varargs...)
+ ret0, _ := ret[0].(*redis.PubSub)
+ return ret0
+}
+
+// Subscribe indicates an expected call of Subscribe.
+func (mr *MockUniversalClientMockRecorder) Subscribe(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockUniversalClient)(nil).Subscribe), varargs...)
+}
+
+// TDigestAdd mocks base method.
+func (m *MockUniversalClient) TDigestAdd(arg0 context.Context, arg1 string, arg2 ...float64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TDigestAdd", varargs...)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TDigestAdd indicates an expected call of TDigestAdd.
+func (mr *MockUniversalClientMockRecorder) TDigestAdd(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestAdd", reflect.TypeOf((*MockUniversalClient)(nil).TDigestAdd), varargs...)
+}
+
+// TDigestByRank mocks base method.
+func (m *MockUniversalClient) TDigestByRank(arg0 context.Context, arg1 string, arg2 ...uint64) *redis.FloatSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TDigestByRank", varargs...)
+ ret0, _ := ret[0].(*redis.FloatSliceCmd)
+ return ret0
+}
+
+// TDigestByRank indicates an expected call of TDigestByRank.
+func (mr *MockUniversalClientMockRecorder) TDigestByRank(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestByRank", reflect.TypeOf((*MockUniversalClient)(nil).TDigestByRank), varargs...)
+}
+
+// TDigestByRevRank mocks base method.
+func (m *MockUniversalClient) TDigestByRevRank(arg0 context.Context, arg1 string, arg2 ...uint64) *redis.FloatSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TDigestByRevRank", varargs...)
+ ret0, _ := ret[0].(*redis.FloatSliceCmd)
+ return ret0
+}
+
+// TDigestByRevRank indicates an expected call of TDigestByRevRank.
+func (mr *MockUniversalClientMockRecorder) TDigestByRevRank(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestByRevRank", reflect.TypeOf((*MockUniversalClient)(nil).TDigestByRevRank), varargs...)
+}
+
+// TDigestCDF mocks base method.
+func (m *MockUniversalClient) TDigestCDF(arg0 context.Context, arg1 string, arg2 ...float64) *redis.FloatSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TDigestCDF", varargs...)
+ ret0, _ := ret[0].(*redis.FloatSliceCmd)
+ return ret0
+}
+
+// TDigestCDF indicates an expected call of TDigestCDF.
+func (mr *MockUniversalClientMockRecorder) TDigestCDF(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestCDF", reflect.TypeOf((*MockUniversalClient)(nil).TDigestCDF), varargs...)
+}
+
+// TDigestCreate mocks base method.
+func (m *MockUniversalClient) TDigestCreate(arg0 context.Context, arg1 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TDigestCreate", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TDigestCreate indicates an expected call of TDigestCreate.
+func (mr *MockUniversalClientMockRecorder) TDigestCreate(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestCreate", reflect.TypeOf((*MockUniversalClient)(nil).TDigestCreate), arg0, arg1)
+}
+
+// TDigestCreateWithCompression mocks base method.
+func (m *MockUniversalClient) TDigestCreateWithCompression(arg0 context.Context, arg1 string, arg2 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TDigestCreateWithCompression", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TDigestCreateWithCompression indicates an expected call of TDigestCreateWithCompression.
+func (mr *MockUniversalClientMockRecorder) TDigestCreateWithCompression(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestCreateWithCompression", reflect.TypeOf((*MockUniversalClient)(nil).TDigestCreateWithCompression), arg0, arg1, arg2)
+}
+
+// TDigestInfo mocks base method.
+func (m *MockUniversalClient) TDigestInfo(arg0 context.Context, arg1 string) *redis.TDigestInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TDigestInfo", arg0, arg1)
+ ret0, _ := ret[0].(*redis.TDigestInfoCmd)
+ return ret0
+}
+
+// TDigestInfo indicates an expected call of TDigestInfo.
+func (mr *MockUniversalClientMockRecorder) TDigestInfo(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestInfo", reflect.TypeOf((*MockUniversalClient)(nil).TDigestInfo), arg0, arg1)
+}
+
+// TDigestMax mocks base method.
+func (m *MockUniversalClient) TDigestMax(arg0 context.Context, arg1 string) *redis.FloatCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TDigestMax", arg0, arg1)
+ ret0, _ := ret[0].(*redis.FloatCmd)
+ return ret0
+}
+
+// TDigestMax indicates an expected call of TDigestMax.
+func (mr *MockUniversalClientMockRecorder) TDigestMax(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestMax", reflect.TypeOf((*MockUniversalClient)(nil).TDigestMax), arg0, arg1)
+}
+
+// TDigestMerge mocks base method.
+func (m *MockUniversalClient) TDigestMerge(arg0 context.Context, arg1 string, arg2 *redis.TDigestMergeOptions, arg3 ...string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TDigestMerge", varargs...)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TDigestMerge indicates an expected call of TDigestMerge.
+func (mr *MockUniversalClientMockRecorder) TDigestMerge(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestMerge", reflect.TypeOf((*MockUniversalClient)(nil).TDigestMerge), varargs...)
+}
+
+// TDigestMin mocks base method.
+func (m *MockUniversalClient) TDigestMin(arg0 context.Context, arg1 string) *redis.FloatCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TDigestMin", arg0, arg1)
+ ret0, _ := ret[0].(*redis.FloatCmd)
+ return ret0
+}
+
+// TDigestMin indicates an expected call of TDigestMin.
+func (mr *MockUniversalClientMockRecorder) TDigestMin(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestMin", reflect.TypeOf((*MockUniversalClient)(nil).TDigestMin), arg0, arg1)
+}
+
+// TDigestQuantile mocks base method.
+func (m *MockUniversalClient) TDigestQuantile(arg0 context.Context, arg1 string, arg2 ...float64) *redis.FloatSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TDigestQuantile", varargs...)
+ ret0, _ := ret[0].(*redis.FloatSliceCmd)
+ return ret0
+}
+
+// TDigestQuantile indicates an expected call of TDigestQuantile.
+func (mr *MockUniversalClientMockRecorder) TDigestQuantile(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestQuantile", reflect.TypeOf((*MockUniversalClient)(nil).TDigestQuantile), varargs...)
+}
+
+// TDigestRank mocks base method.
+func (m *MockUniversalClient) TDigestRank(arg0 context.Context, arg1 string, arg2 ...float64) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TDigestRank", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// TDigestRank indicates an expected call of TDigestRank.
+func (mr *MockUniversalClientMockRecorder) TDigestRank(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestRank", reflect.TypeOf((*MockUniversalClient)(nil).TDigestRank), varargs...)
+}
+
+// TDigestReset mocks base method.
+func (m *MockUniversalClient) TDigestReset(arg0 context.Context, arg1 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TDigestReset", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TDigestReset indicates an expected call of TDigestReset.
+func (mr *MockUniversalClientMockRecorder) TDigestReset(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestReset", reflect.TypeOf((*MockUniversalClient)(nil).TDigestReset), arg0, arg1)
+}
+
+// TDigestRevRank mocks base method.
+func (m *MockUniversalClient) TDigestRevRank(arg0 context.Context, arg1 string, arg2 ...float64) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TDigestRevRank", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// TDigestRevRank indicates an expected call of TDigestRevRank.
+func (mr *MockUniversalClientMockRecorder) TDigestRevRank(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestRevRank", reflect.TypeOf((*MockUniversalClient)(nil).TDigestRevRank), varargs...)
+}
+
+// TDigestTrimmedMean mocks base method.
+func (m *MockUniversalClient) TDigestTrimmedMean(arg0 context.Context, arg1 string, arg2, arg3 float64) *redis.FloatCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TDigestTrimmedMean", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.FloatCmd)
+ return ret0
+}
+
+// TDigestTrimmedMean indicates an expected call of TDigestTrimmedMean.
+func (mr *MockUniversalClientMockRecorder) TDigestTrimmedMean(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TDigestTrimmedMean", reflect.TypeOf((*MockUniversalClient)(nil).TDigestTrimmedMean), arg0, arg1, arg2, arg3)
+}
+
+// TFCall mocks base method.
+func (m *MockUniversalClient) TFCall(arg0 context.Context, arg1, arg2 string, arg3 int) *redis.Cmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TFCall", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// TFCall indicates an expected call of TFCall.
+func (mr *MockUniversalClientMockRecorder) TFCall(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TFCall", reflect.TypeOf((*MockUniversalClient)(nil).TFCall), arg0, arg1, arg2, arg3)
+}
+
+// TFCallASYNC mocks base method.
+func (m *MockUniversalClient) TFCallASYNC(arg0 context.Context, arg1, arg2 string, arg3 int) *redis.Cmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TFCallASYNC", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// TFCallASYNC indicates an expected call of TFCallASYNC.
+func (mr *MockUniversalClientMockRecorder) TFCallASYNC(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TFCallASYNC", reflect.TypeOf((*MockUniversalClient)(nil).TFCallASYNC), arg0, arg1, arg2, arg3)
+}
+
+// TFCallASYNCArgs mocks base method.
+func (m *MockUniversalClient) TFCallASYNCArgs(arg0 context.Context, arg1, arg2 string, arg3 int, arg4 *redis.TFCallOptions) *redis.Cmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TFCallASYNCArgs", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// TFCallASYNCArgs indicates an expected call of TFCallASYNCArgs.
+func (mr *MockUniversalClientMockRecorder) TFCallASYNCArgs(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TFCallASYNCArgs", reflect.TypeOf((*MockUniversalClient)(nil).TFCallASYNCArgs), arg0, arg1, arg2, arg3, arg4)
+}
+
+// TFCallArgs mocks base method.
+func (m *MockUniversalClient) TFCallArgs(arg0 context.Context, arg1, arg2 string, arg3 int, arg4 *redis.TFCallOptions) *redis.Cmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TFCallArgs", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.Cmd)
+ return ret0
+}
+
+// TFCallArgs indicates an expected call of TFCallArgs.
+func (mr *MockUniversalClientMockRecorder) TFCallArgs(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TFCallArgs", reflect.TypeOf((*MockUniversalClient)(nil).TFCallArgs), arg0, arg1, arg2, arg3, arg4)
+}
+
+// TFunctionDelete mocks base method.
+func (m *MockUniversalClient) TFunctionDelete(arg0 context.Context, arg1 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TFunctionDelete", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TFunctionDelete indicates an expected call of TFunctionDelete.
+func (mr *MockUniversalClientMockRecorder) TFunctionDelete(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TFunctionDelete", reflect.TypeOf((*MockUniversalClient)(nil).TFunctionDelete), arg0, arg1)
+}
+
+// TFunctionList mocks base method.
+func (m *MockUniversalClient) TFunctionList(arg0 context.Context) *redis.MapStringInterfaceSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TFunctionList", arg0)
+ ret0, _ := ret[0].(*redis.MapStringInterfaceSliceCmd)
+ return ret0
+}
+
+// TFunctionList indicates an expected call of TFunctionList.
+func (mr *MockUniversalClientMockRecorder) TFunctionList(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TFunctionList", reflect.TypeOf((*MockUniversalClient)(nil).TFunctionList), arg0)
+}
+
+// TFunctionListArgs mocks base method.
+func (m *MockUniversalClient) TFunctionListArgs(arg0 context.Context, arg1 *redis.TFunctionListOptions) *redis.MapStringInterfaceSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TFunctionListArgs", arg0, arg1)
+ ret0, _ := ret[0].(*redis.MapStringInterfaceSliceCmd)
+ return ret0
+}
+
+// TFunctionListArgs indicates an expected call of TFunctionListArgs.
+func (mr *MockUniversalClientMockRecorder) TFunctionListArgs(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TFunctionListArgs", reflect.TypeOf((*MockUniversalClient)(nil).TFunctionListArgs), arg0, arg1)
+}
+
+// TFunctionLoad mocks base method.
+func (m *MockUniversalClient) TFunctionLoad(arg0 context.Context, arg1 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TFunctionLoad", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TFunctionLoad indicates an expected call of TFunctionLoad.
+func (mr *MockUniversalClientMockRecorder) TFunctionLoad(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TFunctionLoad", reflect.TypeOf((*MockUniversalClient)(nil).TFunctionLoad), arg0, arg1)
+}
+
+// TFunctionLoadArgs mocks base method.
+func (m *MockUniversalClient) TFunctionLoadArgs(arg0 context.Context, arg1 string, arg2 *redis.TFunctionLoadOptions) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TFunctionLoadArgs", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TFunctionLoadArgs indicates an expected call of TFunctionLoadArgs.
+func (mr *MockUniversalClientMockRecorder) TFunctionLoadArgs(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TFunctionLoadArgs", reflect.TypeOf((*MockUniversalClient)(nil).TFunctionLoadArgs), arg0, arg1, arg2)
+}
+
+// TSAdd mocks base method.
+func (m *MockUniversalClient) TSAdd(arg0 context.Context, arg1 string, arg2 any, arg3 float64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSAdd", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// TSAdd indicates an expected call of TSAdd.
+func (mr *MockUniversalClientMockRecorder) TSAdd(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSAdd", reflect.TypeOf((*MockUniversalClient)(nil).TSAdd), arg0, arg1, arg2, arg3)
+}
+
+// TSAddWithArgs mocks base method.
+func (m *MockUniversalClient) TSAddWithArgs(arg0 context.Context, arg1 string, arg2 any, arg3 float64, arg4 *redis.TSOptions) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSAddWithArgs", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// TSAddWithArgs indicates an expected call of TSAddWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSAddWithArgs(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSAddWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSAddWithArgs), arg0, arg1, arg2, arg3, arg4)
+}
+
+// TSAlter mocks base method.
+func (m *MockUniversalClient) TSAlter(arg0 context.Context, arg1 string, arg2 *redis.TSAlterOptions) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSAlter", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TSAlter indicates an expected call of TSAlter.
+func (mr *MockUniversalClientMockRecorder) TSAlter(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSAlter", reflect.TypeOf((*MockUniversalClient)(nil).TSAlter), arg0, arg1, arg2)
+}
+
+// TSCreate mocks base method.
+func (m *MockUniversalClient) TSCreate(arg0 context.Context, arg1 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSCreate", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TSCreate indicates an expected call of TSCreate.
+func (mr *MockUniversalClientMockRecorder) TSCreate(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSCreate", reflect.TypeOf((*MockUniversalClient)(nil).TSCreate), arg0, arg1)
+}
+
+// TSCreateRule mocks base method.
+func (m *MockUniversalClient) TSCreateRule(arg0 context.Context, arg1, arg2 string, arg3 redis.Aggregator, arg4 int) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSCreateRule", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TSCreateRule indicates an expected call of TSCreateRule.
+func (mr *MockUniversalClientMockRecorder) TSCreateRule(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSCreateRule", reflect.TypeOf((*MockUniversalClient)(nil).TSCreateRule), arg0, arg1, arg2, arg3, arg4)
+}
+
+// TSCreateRuleWithArgs mocks base method.
+func (m *MockUniversalClient) TSCreateRuleWithArgs(arg0 context.Context, arg1, arg2 string, arg3 redis.Aggregator, arg4 int, arg5 *redis.TSCreateRuleOptions) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSCreateRuleWithArgs", arg0, arg1, arg2, arg3, arg4, arg5)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TSCreateRuleWithArgs indicates an expected call of TSCreateRuleWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSCreateRuleWithArgs(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSCreateRuleWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSCreateRuleWithArgs), arg0, arg1, arg2, arg3, arg4, arg5)
+}
+
+// TSCreateWithArgs mocks base method.
+func (m *MockUniversalClient) TSCreateWithArgs(arg0 context.Context, arg1 string, arg2 *redis.TSOptions) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSCreateWithArgs", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TSCreateWithArgs indicates an expected call of TSCreateWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSCreateWithArgs(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSCreateWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSCreateWithArgs), arg0, arg1, arg2)
+}
+
+// TSDecrBy mocks base method.
+func (m *MockUniversalClient) TSDecrBy(arg0 context.Context, arg1 string, arg2 float64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSDecrBy", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// TSDecrBy indicates an expected call of TSDecrBy.
+func (mr *MockUniversalClientMockRecorder) TSDecrBy(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSDecrBy", reflect.TypeOf((*MockUniversalClient)(nil).TSDecrBy), arg0, arg1, arg2)
+}
+
+// TSDecrByWithArgs mocks base method.
+func (m *MockUniversalClient) TSDecrByWithArgs(arg0 context.Context, arg1 string, arg2 float64, arg3 *redis.TSIncrDecrOptions) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSDecrByWithArgs", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// TSDecrByWithArgs indicates an expected call of TSDecrByWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSDecrByWithArgs(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSDecrByWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSDecrByWithArgs), arg0, arg1, arg2, arg3)
+}
+
+// TSDel mocks base method.
+func (m *MockUniversalClient) TSDel(arg0 context.Context, arg1 string, arg2, arg3 int) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSDel", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// TSDel indicates an expected call of TSDel.
+func (mr *MockUniversalClientMockRecorder) TSDel(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSDel", reflect.TypeOf((*MockUniversalClient)(nil).TSDel), arg0, arg1, arg2, arg3)
+}
+
+// TSDeleteRule mocks base method.
+func (m *MockUniversalClient) TSDeleteRule(arg0 context.Context, arg1, arg2 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSDeleteRule", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TSDeleteRule indicates an expected call of TSDeleteRule.
+func (mr *MockUniversalClientMockRecorder) TSDeleteRule(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSDeleteRule", reflect.TypeOf((*MockUniversalClient)(nil).TSDeleteRule), arg0, arg1, arg2)
+}
+
+// TSGet mocks base method.
+func (m *MockUniversalClient) TSGet(arg0 context.Context, arg1 string) *redis.TSTimestampValueCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSGet", arg0, arg1)
+ ret0, _ := ret[0].(*redis.TSTimestampValueCmd)
+ return ret0
+}
+
+// TSGet indicates an expected call of TSGet.
+func (mr *MockUniversalClientMockRecorder) TSGet(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSGet", reflect.TypeOf((*MockUniversalClient)(nil).TSGet), arg0, arg1)
+}
+
+// TSGetWithArgs mocks base method.
+func (m *MockUniversalClient) TSGetWithArgs(arg0 context.Context, arg1 string, arg2 *redis.TSGetOptions) *redis.TSTimestampValueCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSGetWithArgs", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.TSTimestampValueCmd)
+ return ret0
+}
+
+// TSGetWithArgs indicates an expected call of TSGetWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSGetWithArgs(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSGetWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSGetWithArgs), arg0, arg1, arg2)
+}
+
+// TSIncrBy mocks base method.
+func (m *MockUniversalClient) TSIncrBy(arg0 context.Context, arg1 string, arg2 float64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSIncrBy", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// TSIncrBy indicates an expected call of TSIncrBy.
+func (mr *MockUniversalClientMockRecorder) TSIncrBy(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSIncrBy", reflect.TypeOf((*MockUniversalClient)(nil).TSIncrBy), arg0, arg1, arg2)
+}
+
+// TSIncrByWithArgs mocks base method.
+func (m *MockUniversalClient) TSIncrByWithArgs(arg0 context.Context, arg1 string, arg2 float64, arg3 *redis.TSIncrDecrOptions) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSIncrByWithArgs", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// TSIncrByWithArgs indicates an expected call of TSIncrByWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSIncrByWithArgs(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSIncrByWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSIncrByWithArgs), arg0, arg1, arg2, arg3)
+}
+
+// TSInfo mocks base method.
+func (m *MockUniversalClient) TSInfo(arg0 context.Context, arg1 string) *redis.MapStringInterfaceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSInfo", arg0, arg1)
+ ret0, _ := ret[0].(*redis.MapStringInterfaceCmd)
+ return ret0
+}
+
+// TSInfo indicates an expected call of TSInfo.
+func (mr *MockUniversalClientMockRecorder) TSInfo(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSInfo", reflect.TypeOf((*MockUniversalClient)(nil).TSInfo), arg0, arg1)
+}
+
+// TSInfoWithArgs mocks base method.
+func (m *MockUniversalClient) TSInfoWithArgs(arg0 context.Context, arg1 string, arg2 *redis.TSInfoOptions) *redis.MapStringInterfaceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSInfoWithArgs", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.MapStringInterfaceCmd)
+ return ret0
+}
+
+// TSInfoWithArgs indicates an expected call of TSInfoWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSInfoWithArgs(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSInfoWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSInfoWithArgs), arg0, arg1, arg2)
+}
+
+// TSMAdd mocks base method.
+func (m *MockUniversalClient) TSMAdd(arg0 context.Context, arg1 [][]any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSMAdd", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// TSMAdd indicates an expected call of TSMAdd.
+func (mr *MockUniversalClientMockRecorder) TSMAdd(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSMAdd", reflect.TypeOf((*MockUniversalClient)(nil).TSMAdd), arg0, arg1)
+}
+
+// TSMGet mocks base method.
+func (m *MockUniversalClient) TSMGet(arg0 context.Context, arg1 []string) *redis.MapStringSliceInterfaceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSMGet", arg0, arg1)
+ ret0, _ := ret[0].(*redis.MapStringSliceInterfaceCmd)
+ return ret0
+}
+
+// TSMGet indicates an expected call of TSMGet.
+func (mr *MockUniversalClientMockRecorder) TSMGet(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSMGet", reflect.TypeOf((*MockUniversalClient)(nil).TSMGet), arg0, arg1)
+}
+
+// TSMGetWithArgs mocks base method.
+func (m *MockUniversalClient) TSMGetWithArgs(arg0 context.Context, arg1 []string, arg2 *redis.TSMGetOptions) *redis.MapStringSliceInterfaceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSMGetWithArgs", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.MapStringSliceInterfaceCmd)
+ return ret0
+}
+
+// TSMGetWithArgs indicates an expected call of TSMGetWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSMGetWithArgs(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSMGetWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSMGetWithArgs), arg0, arg1, arg2)
+}
+
+// TSMRange mocks base method.
+func (m *MockUniversalClient) TSMRange(arg0 context.Context, arg1, arg2 int, arg3 []string) *redis.MapStringSliceInterfaceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSMRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.MapStringSliceInterfaceCmd)
+ return ret0
+}
+
+// TSMRange indicates an expected call of TSMRange.
+func (mr *MockUniversalClientMockRecorder) TSMRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSMRange", reflect.TypeOf((*MockUniversalClient)(nil).TSMRange), arg0, arg1, arg2, arg3)
+}
+
+// TSMRangeWithArgs mocks base method.
+func (m *MockUniversalClient) TSMRangeWithArgs(arg0 context.Context, arg1, arg2 int, arg3 []string, arg4 *redis.TSMRangeOptions) *redis.MapStringSliceInterfaceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSMRangeWithArgs", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.MapStringSliceInterfaceCmd)
+ return ret0
+}
+
+// TSMRangeWithArgs indicates an expected call of TSMRangeWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSMRangeWithArgs(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSMRangeWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSMRangeWithArgs), arg0, arg1, arg2, arg3, arg4)
+}
+
+// TSMRevRange mocks base method.
+func (m *MockUniversalClient) TSMRevRange(arg0 context.Context, arg1, arg2 int, arg3 []string) *redis.MapStringSliceInterfaceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSMRevRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.MapStringSliceInterfaceCmd)
+ return ret0
+}
+
+// TSMRevRange indicates an expected call of TSMRevRange.
+func (mr *MockUniversalClientMockRecorder) TSMRevRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSMRevRange", reflect.TypeOf((*MockUniversalClient)(nil).TSMRevRange), arg0, arg1, arg2, arg3)
+}
+
+// TSMRevRangeWithArgs mocks base method.
+func (m *MockUniversalClient) TSMRevRangeWithArgs(arg0 context.Context, arg1, arg2 int, arg3 []string, arg4 *redis.TSMRevRangeOptions) *redis.MapStringSliceInterfaceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSMRevRangeWithArgs", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.MapStringSliceInterfaceCmd)
+ return ret0
+}
+
+// TSMRevRangeWithArgs indicates an expected call of TSMRevRangeWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSMRevRangeWithArgs(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSMRevRangeWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSMRevRangeWithArgs), arg0, arg1, arg2, arg3, arg4)
+}
+
+// TSQueryIndex mocks base method.
+func (m *MockUniversalClient) TSQueryIndex(arg0 context.Context, arg1 []string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSQueryIndex", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// TSQueryIndex indicates an expected call of TSQueryIndex.
+func (mr *MockUniversalClientMockRecorder) TSQueryIndex(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSQueryIndex", reflect.TypeOf((*MockUniversalClient)(nil).TSQueryIndex), arg0, arg1)
+}
+
+// TSRange mocks base method.
+func (m *MockUniversalClient) TSRange(arg0 context.Context, arg1 string, arg2, arg3 int) *redis.TSTimestampValueSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.TSTimestampValueSliceCmd)
+ return ret0
+}
+
+// TSRange indicates an expected call of TSRange.
+func (mr *MockUniversalClientMockRecorder) TSRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSRange", reflect.TypeOf((*MockUniversalClient)(nil).TSRange), arg0, arg1, arg2, arg3)
+}
+
+// TSRangeWithArgs mocks base method.
+func (m *MockUniversalClient) TSRangeWithArgs(arg0 context.Context, arg1 string, arg2, arg3 int, arg4 *redis.TSRangeOptions) *redis.TSTimestampValueSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSRangeWithArgs", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.TSTimestampValueSliceCmd)
+ return ret0
+}
+
+// TSRangeWithArgs indicates an expected call of TSRangeWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSRangeWithArgs(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSRangeWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSRangeWithArgs), arg0, arg1, arg2, arg3, arg4)
+}
+
+// TSRevRange mocks base method.
+func (m *MockUniversalClient) TSRevRange(arg0 context.Context, arg1 string, arg2, arg3 int) *redis.TSTimestampValueSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSRevRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.TSTimestampValueSliceCmd)
+ return ret0
+}
+
+// TSRevRange indicates an expected call of TSRevRange.
+func (mr *MockUniversalClientMockRecorder) TSRevRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSRevRange", reflect.TypeOf((*MockUniversalClient)(nil).TSRevRange), arg0, arg1, arg2, arg3)
+}
+
+// TSRevRangeWithArgs mocks base method.
+func (m *MockUniversalClient) TSRevRangeWithArgs(arg0 context.Context, arg1 string, arg2, arg3 int, arg4 *redis.TSRevRangeOptions) *redis.TSTimestampValueSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TSRevRangeWithArgs", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.TSTimestampValueSliceCmd)
+ return ret0
+}
+
+// TSRevRangeWithArgs indicates an expected call of TSRevRangeWithArgs.
+func (mr *MockUniversalClientMockRecorder) TSRevRangeWithArgs(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TSRevRangeWithArgs", reflect.TypeOf((*MockUniversalClient)(nil).TSRevRangeWithArgs), arg0, arg1, arg2, arg3, arg4)
+}
+
+// TTL mocks base method.
+func (m *MockUniversalClient) TTL(arg0 context.Context, arg1 string) *redis.DurationCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TTL", arg0, arg1)
+ ret0, _ := ret[0].(*redis.DurationCmd)
+ return ret0
+}
+
+// TTL indicates an expected call of TTL.
+func (mr *MockUniversalClientMockRecorder) TTL(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TTL", reflect.TypeOf((*MockUniversalClient)(nil).TTL), arg0, arg1)
+}
+
+// Time mocks base method.
+func (m *MockUniversalClient) Time(arg0 context.Context) *redis.TimeCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Time", arg0)
+ ret0, _ := ret[0].(*redis.TimeCmd)
+ return ret0
+}
+
+// Time indicates an expected call of Time.
+func (mr *MockUniversalClientMockRecorder) Time(arg0 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Time", reflect.TypeOf((*MockUniversalClient)(nil).Time), arg0)
+}
+
+// TopKAdd mocks base method.
+func (m *MockUniversalClient) TopKAdd(arg0 context.Context, arg1 string, arg2 ...any) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TopKAdd", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// TopKAdd indicates an expected call of TopKAdd.
+func (mr *MockUniversalClientMockRecorder) TopKAdd(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopKAdd", reflect.TypeOf((*MockUniversalClient)(nil).TopKAdd), varargs...)
+}
+
+// TopKCount mocks base method.
+func (m *MockUniversalClient) TopKCount(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TopKCount", varargs...)
+ ret0, _ := ret[0].(*redis.IntSliceCmd)
+ return ret0
+}
+
+// TopKCount indicates an expected call of TopKCount.
+func (mr *MockUniversalClientMockRecorder) TopKCount(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopKCount", reflect.TypeOf((*MockUniversalClient)(nil).TopKCount), varargs...)
+}
+
+// TopKIncrBy mocks base method.
+func (m *MockUniversalClient) TopKIncrBy(arg0 context.Context, arg1 string, arg2 ...any) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TopKIncrBy", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// TopKIncrBy indicates an expected call of TopKIncrBy.
+func (mr *MockUniversalClientMockRecorder) TopKIncrBy(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopKIncrBy", reflect.TypeOf((*MockUniversalClient)(nil).TopKIncrBy), varargs...)
+}
+
+// TopKInfo mocks base method.
+func (m *MockUniversalClient) TopKInfo(arg0 context.Context, arg1 string) *redis.TopKInfoCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TopKInfo", arg0, arg1)
+ ret0, _ := ret[0].(*redis.TopKInfoCmd)
+ return ret0
+}
+
+// TopKInfo indicates an expected call of TopKInfo.
+func (mr *MockUniversalClientMockRecorder) TopKInfo(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopKInfo", reflect.TypeOf((*MockUniversalClient)(nil).TopKInfo), arg0, arg1)
+}
+
+// TopKList mocks base method.
+func (m *MockUniversalClient) TopKList(arg0 context.Context, arg1 string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TopKList", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// TopKList indicates an expected call of TopKList.
+func (mr *MockUniversalClientMockRecorder) TopKList(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopKList", reflect.TypeOf((*MockUniversalClient)(nil).TopKList), arg0, arg1)
+}
+
+// TopKListWithCount mocks base method.
+func (m *MockUniversalClient) TopKListWithCount(arg0 context.Context, arg1 string) *redis.MapStringIntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TopKListWithCount", arg0, arg1)
+ ret0, _ := ret[0].(*redis.MapStringIntCmd)
+ return ret0
+}
+
+// TopKListWithCount indicates an expected call of TopKListWithCount.
+func (mr *MockUniversalClientMockRecorder) TopKListWithCount(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopKListWithCount", reflect.TypeOf((*MockUniversalClient)(nil).TopKListWithCount), arg0, arg1)
+}
+
+// TopKQuery mocks base method.
+func (m *MockUniversalClient) TopKQuery(arg0 context.Context, arg1 string, arg2 ...any) *redis.BoolSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "TopKQuery", varargs...)
+ ret0, _ := ret[0].(*redis.BoolSliceCmd)
+ return ret0
+}
+
+// TopKQuery indicates an expected call of TopKQuery.
+func (mr *MockUniversalClientMockRecorder) TopKQuery(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopKQuery", reflect.TypeOf((*MockUniversalClient)(nil).TopKQuery), varargs...)
+}
+
+// TopKReserve mocks base method.
+func (m *MockUniversalClient) TopKReserve(arg0 context.Context, arg1 string, arg2 int64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TopKReserve", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TopKReserve indicates an expected call of TopKReserve.
+func (mr *MockUniversalClientMockRecorder) TopKReserve(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopKReserve", reflect.TypeOf((*MockUniversalClient)(nil).TopKReserve), arg0, arg1, arg2)
+}
+
+// TopKReserveWithOptions mocks base method.
+func (m *MockUniversalClient) TopKReserveWithOptions(arg0 context.Context, arg1 string, arg2, arg3, arg4 int64, arg5 float64) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TopKReserveWithOptions", arg0, arg1, arg2, arg3, arg4, arg5)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// TopKReserveWithOptions indicates an expected call of TopKReserveWithOptions.
+func (mr *MockUniversalClientMockRecorder) TopKReserveWithOptions(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopKReserveWithOptions", reflect.TypeOf((*MockUniversalClient)(nil).TopKReserveWithOptions), arg0, arg1, arg2, arg3, arg4, arg5)
+}
+
+// Touch mocks base method.
+func (m *MockUniversalClient) Touch(arg0 context.Context, arg1 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "Touch", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// Touch indicates an expected call of Touch.
+func (mr *MockUniversalClientMockRecorder) Touch(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Touch", reflect.TypeOf((*MockUniversalClient)(nil).Touch), varargs...)
+}
+
+// TxPipeline mocks base method.
+func (m *MockUniversalClient) TxPipeline() redis.Pipeliner {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TxPipeline")
+ ret0, _ := ret[0].(redis.Pipeliner)
+ return ret0
+}
+
+// TxPipeline indicates an expected call of TxPipeline.
+func (mr *MockUniversalClientMockRecorder) TxPipeline() *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TxPipeline", reflect.TypeOf((*MockUniversalClient)(nil).TxPipeline))
+}
+
+// TxPipelined mocks base method.
+func (m *MockUniversalClient) TxPipelined(arg0 context.Context, arg1 func(redis.Pipeliner) error) ([]redis.Cmder, error) {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "TxPipelined", arg0, arg1)
+ ret0, _ := ret[0].([]redis.Cmder)
+ ret1, _ := ret[1].(error)
+ return ret0, ret1
+}
+
+// TxPipelined indicates an expected call of TxPipelined.
+func (mr *MockUniversalClientMockRecorder) TxPipelined(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TxPipelined", reflect.TypeOf((*MockUniversalClient)(nil).TxPipelined), arg0, arg1)
+}
+
+// Type mocks base method.
+func (m *MockUniversalClient) Type(arg0 context.Context, arg1 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Type", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// Type indicates an expected call of Type.
+func (mr *MockUniversalClientMockRecorder) Type(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockUniversalClient)(nil).Type), arg0, arg1)
+}
+
+// Unlink mocks base method.
+func (m *MockUniversalClient) Unlink(arg0 context.Context, arg1 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "Unlink", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// Unlink indicates an expected call of Unlink.
+func (mr *MockUniversalClientMockRecorder) Unlink(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlink", reflect.TypeOf((*MockUniversalClient)(nil).Unlink), varargs...)
+}
+
+// Watch mocks base method.
+func (m *MockUniversalClient) Watch(arg0 context.Context, arg1 func(*redis.Tx) error, arg2 ...string) error {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "Watch", varargs...)
+ ret0, _ := ret[0].(error)
+ return ret0
+}
+
+// Watch indicates an expected call of Watch.
+func (mr *MockUniversalClientMockRecorder) Watch(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockUniversalClient)(nil).Watch), varargs...)
+}
+
+// XAck mocks base method.
+func (m *MockUniversalClient) XAck(arg0 context.Context, arg1, arg2 string, arg3 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "XAck", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XAck indicates an expected call of XAck.
+func (mr *MockUniversalClientMockRecorder) XAck(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XAck", reflect.TypeOf((*MockUniversalClient)(nil).XAck), varargs...)
+}
+
+// XAdd mocks base method.
+func (m *MockUniversalClient) XAdd(arg0 context.Context, arg1 *redis.XAddArgs) *redis.StringCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XAdd", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringCmd)
+ return ret0
+}
+
+// XAdd indicates an expected call of XAdd.
+func (mr *MockUniversalClientMockRecorder) XAdd(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XAdd", reflect.TypeOf((*MockUniversalClient)(nil).XAdd), arg0, arg1)
+}
+
+// XAutoClaim mocks base method.
+func (m *MockUniversalClient) XAutoClaim(arg0 context.Context, arg1 *redis.XAutoClaimArgs) *redis.XAutoClaimCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XAutoClaim", arg0, arg1)
+ ret0, _ := ret[0].(*redis.XAutoClaimCmd)
+ return ret0
+}
+
+// XAutoClaim indicates an expected call of XAutoClaim.
+func (mr *MockUniversalClientMockRecorder) XAutoClaim(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XAutoClaim", reflect.TypeOf((*MockUniversalClient)(nil).XAutoClaim), arg0, arg1)
+}
+
+// XAutoClaimJustID mocks base method.
+func (m *MockUniversalClient) XAutoClaimJustID(arg0 context.Context, arg1 *redis.XAutoClaimArgs) *redis.XAutoClaimJustIDCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XAutoClaimJustID", arg0, arg1)
+ ret0, _ := ret[0].(*redis.XAutoClaimJustIDCmd)
+ return ret0
+}
+
+// XAutoClaimJustID indicates an expected call of XAutoClaimJustID.
+func (mr *MockUniversalClientMockRecorder) XAutoClaimJustID(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XAutoClaimJustID", reflect.TypeOf((*MockUniversalClient)(nil).XAutoClaimJustID), arg0, arg1)
+}
+
+// XClaim mocks base method.
+func (m *MockUniversalClient) XClaim(arg0 context.Context, arg1 *redis.XClaimArgs) *redis.XMessageSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XClaim", arg0, arg1)
+ ret0, _ := ret[0].(*redis.XMessageSliceCmd)
+ return ret0
+}
+
+// XClaim indicates an expected call of XClaim.
+func (mr *MockUniversalClientMockRecorder) XClaim(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XClaim", reflect.TypeOf((*MockUniversalClient)(nil).XClaim), arg0, arg1)
+}
+
+// XClaimJustID mocks base method.
+func (m *MockUniversalClient) XClaimJustID(arg0 context.Context, arg1 *redis.XClaimArgs) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XClaimJustID", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// XClaimJustID indicates an expected call of XClaimJustID.
+func (mr *MockUniversalClientMockRecorder) XClaimJustID(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XClaimJustID", reflect.TypeOf((*MockUniversalClient)(nil).XClaimJustID), arg0, arg1)
+}
+
+// XDel mocks base method.
+func (m *MockUniversalClient) XDel(arg0 context.Context, arg1 string, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "XDel", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XDel indicates an expected call of XDel.
+func (mr *MockUniversalClientMockRecorder) XDel(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XDel", reflect.TypeOf((*MockUniversalClient)(nil).XDel), varargs...)
+}
+
+// XGroupCreate mocks base method.
+func (m *MockUniversalClient) XGroupCreate(arg0 context.Context, arg1, arg2, arg3 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XGroupCreate", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// XGroupCreate indicates an expected call of XGroupCreate.
+func (mr *MockUniversalClientMockRecorder) XGroupCreate(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XGroupCreate", reflect.TypeOf((*MockUniversalClient)(nil).XGroupCreate), arg0, arg1, arg2, arg3)
+}
+
+// XGroupCreateConsumer mocks base method.
+func (m *MockUniversalClient) XGroupCreateConsumer(arg0 context.Context, arg1, arg2, arg3 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XGroupCreateConsumer", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XGroupCreateConsumer indicates an expected call of XGroupCreateConsumer.
+func (mr *MockUniversalClientMockRecorder) XGroupCreateConsumer(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XGroupCreateConsumer", reflect.TypeOf((*MockUniversalClient)(nil).XGroupCreateConsumer), arg0, arg1, arg2, arg3)
+}
+
+// XGroupCreateMkStream mocks base method.
+func (m *MockUniversalClient) XGroupCreateMkStream(arg0 context.Context, arg1, arg2, arg3 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XGroupCreateMkStream", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// XGroupCreateMkStream indicates an expected call of XGroupCreateMkStream.
+func (mr *MockUniversalClientMockRecorder) XGroupCreateMkStream(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XGroupCreateMkStream", reflect.TypeOf((*MockUniversalClient)(nil).XGroupCreateMkStream), arg0, arg1, arg2, arg3)
+}
+
+// XGroupDelConsumer mocks base method.
+func (m *MockUniversalClient) XGroupDelConsumer(arg0 context.Context, arg1, arg2, arg3 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XGroupDelConsumer", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XGroupDelConsumer indicates an expected call of XGroupDelConsumer.
+func (mr *MockUniversalClientMockRecorder) XGroupDelConsumer(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XGroupDelConsumer", reflect.TypeOf((*MockUniversalClient)(nil).XGroupDelConsumer), arg0, arg1, arg2, arg3)
+}
+
+// XGroupDestroy mocks base method.
+func (m *MockUniversalClient) XGroupDestroy(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XGroupDestroy", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XGroupDestroy indicates an expected call of XGroupDestroy.
+func (mr *MockUniversalClientMockRecorder) XGroupDestroy(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XGroupDestroy", reflect.TypeOf((*MockUniversalClient)(nil).XGroupDestroy), arg0, arg1, arg2)
+}
+
+// XGroupSetID mocks base method.
+func (m *MockUniversalClient) XGroupSetID(arg0 context.Context, arg1, arg2, arg3 string) *redis.StatusCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XGroupSetID", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StatusCmd)
+ return ret0
+}
+
+// XGroupSetID indicates an expected call of XGroupSetID.
+func (mr *MockUniversalClientMockRecorder) XGroupSetID(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XGroupSetID", reflect.TypeOf((*MockUniversalClient)(nil).XGroupSetID), arg0, arg1, arg2, arg3)
+}
+
+// XInfoConsumers mocks base method.
+func (m *MockUniversalClient) XInfoConsumers(arg0 context.Context, arg1, arg2 string) *redis.XInfoConsumersCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XInfoConsumers", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.XInfoConsumersCmd)
+ return ret0
+}
+
+// XInfoConsumers indicates an expected call of XInfoConsumers.
+func (mr *MockUniversalClientMockRecorder) XInfoConsumers(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XInfoConsumers", reflect.TypeOf((*MockUniversalClient)(nil).XInfoConsumers), arg0, arg1, arg2)
+}
+
+// XInfoGroups mocks base method.
+func (m *MockUniversalClient) XInfoGroups(arg0 context.Context, arg1 string) *redis.XInfoGroupsCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XInfoGroups", arg0, arg1)
+ ret0, _ := ret[0].(*redis.XInfoGroupsCmd)
+ return ret0
+}
+
+// XInfoGroups indicates an expected call of XInfoGroups.
+func (mr *MockUniversalClientMockRecorder) XInfoGroups(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XInfoGroups", reflect.TypeOf((*MockUniversalClient)(nil).XInfoGroups), arg0, arg1)
+}
+
+// XInfoStream mocks base method.
+func (m *MockUniversalClient) XInfoStream(arg0 context.Context, arg1 string) *redis.XInfoStreamCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XInfoStream", arg0, arg1)
+ ret0, _ := ret[0].(*redis.XInfoStreamCmd)
+ return ret0
+}
+
+// XInfoStream indicates an expected call of XInfoStream.
+func (mr *MockUniversalClientMockRecorder) XInfoStream(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XInfoStream", reflect.TypeOf((*MockUniversalClient)(nil).XInfoStream), arg0, arg1)
+}
+
+// XInfoStreamFull mocks base method.
+func (m *MockUniversalClient) XInfoStreamFull(arg0 context.Context, arg1 string, arg2 int) *redis.XInfoStreamFullCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XInfoStreamFull", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.XInfoStreamFullCmd)
+ return ret0
+}
+
+// XInfoStreamFull indicates an expected call of XInfoStreamFull.
+func (mr *MockUniversalClientMockRecorder) XInfoStreamFull(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XInfoStreamFull", reflect.TypeOf((*MockUniversalClient)(nil).XInfoStreamFull), arg0, arg1, arg2)
+}
+
+// XLen mocks base method.
+func (m *MockUniversalClient) XLen(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XLen", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XLen indicates an expected call of XLen.
+func (mr *MockUniversalClientMockRecorder) XLen(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XLen", reflect.TypeOf((*MockUniversalClient)(nil).XLen), arg0, arg1)
+}
+
+// XPending mocks base method.
+func (m *MockUniversalClient) XPending(arg0 context.Context, arg1, arg2 string) *redis.XPendingCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XPending", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.XPendingCmd)
+ return ret0
+}
+
+// XPending indicates an expected call of XPending.
+func (mr *MockUniversalClientMockRecorder) XPending(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XPending", reflect.TypeOf((*MockUniversalClient)(nil).XPending), arg0, arg1, arg2)
+}
+
+// XPendingExt mocks base method.
+func (m *MockUniversalClient) XPendingExt(arg0 context.Context, arg1 *redis.XPendingExtArgs) *redis.XPendingExtCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XPendingExt", arg0, arg1)
+ ret0, _ := ret[0].(*redis.XPendingExtCmd)
+ return ret0
+}
+
+// XPendingExt indicates an expected call of XPendingExt.
+func (mr *MockUniversalClientMockRecorder) XPendingExt(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XPendingExt", reflect.TypeOf((*MockUniversalClient)(nil).XPendingExt), arg0, arg1)
+}
+
+// XRange mocks base method.
+func (m *MockUniversalClient) XRange(arg0 context.Context, arg1, arg2, arg3 string) *redis.XMessageSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.XMessageSliceCmd)
+ return ret0
+}
+
+// XRange indicates an expected call of XRange.
+func (mr *MockUniversalClientMockRecorder) XRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XRange", reflect.TypeOf((*MockUniversalClient)(nil).XRange), arg0, arg1, arg2, arg3)
+}
+
+// XRangeN mocks base method.
+func (m *MockUniversalClient) XRangeN(arg0 context.Context, arg1, arg2, arg3 string, arg4 int64) *redis.XMessageSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XRangeN", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.XMessageSliceCmd)
+ return ret0
+}
+
+// XRangeN indicates an expected call of XRangeN.
+func (mr *MockUniversalClientMockRecorder) XRangeN(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XRangeN", reflect.TypeOf((*MockUniversalClient)(nil).XRangeN), arg0, arg1, arg2, arg3, arg4)
+}
+
+// XRead mocks base method.
+func (m *MockUniversalClient) XRead(arg0 context.Context, arg1 *redis.XReadArgs) *redis.XStreamSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XRead", arg0, arg1)
+ ret0, _ := ret[0].(*redis.XStreamSliceCmd)
+ return ret0
+}
+
+// XRead indicates an expected call of XRead.
+func (mr *MockUniversalClientMockRecorder) XRead(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XRead", reflect.TypeOf((*MockUniversalClient)(nil).XRead), arg0, arg1)
+}
+
+// XReadGroup mocks base method.
+func (m *MockUniversalClient) XReadGroup(arg0 context.Context, arg1 *redis.XReadGroupArgs) *redis.XStreamSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XReadGroup", arg0, arg1)
+ ret0, _ := ret[0].(*redis.XStreamSliceCmd)
+ return ret0
+}
+
+// XReadGroup indicates an expected call of XReadGroup.
+func (mr *MockUniversalClientMockRecorder) XReadGroup(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XReadGroup", reflect.TypeOf((*MockUniversalClient)(nil).XReadGroup), arg0, arg1)
+}
+
+// XReadStreams mocks base method.
+func (m *MockUniversalClient) XReadStreams(arg0 context.Context, arg1 ...string) *redis.XStreamSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "XReadStreams", varargs...)
+ ret0, _ := ret[0].(*redis.XStreamSliceCmd)
+ return ret0
+}
+
+// XReadStreams indicates an expected call of XReadStreams.
+func (mr *MockUniversalClientMockRecorder) XReadStreams(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XReadStreams", reflect.TypeOf((*MockUniversalClient)(nil).XReadStreams), varargs...)
+}
+
+// XRevRange mocks base method.
+func (m *MockUniversalClient) XRevRange(arg0 context.Context, arg1, arg2, arg3 string) *redis.XMessageSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XRevRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.XMessageSliceCmd)
+ return ret0
+}
+
+// XRevRange indicates an expected call of XRevRange.
+func (mr *MockUniversalClientMockRecorder) XRevRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XRevRange", reflect.TypeOf((*MockUniversalClient)(nil).XRevRange), arg0, arg1, arg2, arg3)
+}
+
+// XRevRangeN mocks base method.
+func (m *MockUniversalClient) XRevRangeN(arg0 context.Context, arg1, arg2, arg3 string, arg4 int64) *redis.XMessageSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XRevRangeN", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.XMessageSliceCmd)
+ return ret0
+}
+
+// XRevRangeN indicates an expected call of XRevRangeN.
+func (mr *MockUniversalClientMockRecorder) XRevRangeN(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XRevRangeN", reflect.TypeOf((*MockUniversalClient)(nil).XRevRangeN), arg0, arg1, arg2, arg3, arg4)
+}
+
+// XTrimMaxLen mocks base method.
+func (m *MockUniversalClient) XTrimMaxLen(arg0 context.Context, arg1 string, arg2 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XTrimMaxLen", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XTrimMaxLen indicates an expected call of XTrimMaxLen.
+func (mr *MockUniversalClientMockRecorder) XTrimMaxLen(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XTrimMaxLen", reflect.TypeOf((*MockUniversalClient)(nil).XTrimMaxLen), arg0, arg1, arg2)
+}
+
+// XTrimMaxLenApprox mocks base method.
+func (m *MockUniversalClient) XTrimMaxLenApprox(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XTrimMaxLenApprox", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XTrimMaxLenApprox indicates an expected call of XTrimMaxLenApprox.
+func (mr *MockUniversalClientMockRecorder) XTrimMaxLenApprox(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XTrimMaxLenApprox", reflect.TypeOf((*MockUniversalClient)(nil).XTrimMaxLenApprox), arg0, arg1, arg2, arg3)
+}
+
+// XTrimMinID mocks base method.
+func (m *MockUniversalClient) XTrimMinID(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XTrimMinID", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XTrimMinID indicates an expected call of XTrimMinID.
+func (mr *MockUniversalClientMockRecorder) XTrimMinID(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XTrimMinID", reflect.TypeOf((*MockUniversalClient)(nil).XTrimMinID), arg0, arg1, arg2)
+}
+
+// XTrimMinIDApprox mocks base method.
+func (m *MockUniversalClient) XTrimMinIDApprox(arg0 context.Context, arg1, arg2 string, arg3 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "XTrimMinIDApprox", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// XTrimMinIDApprox indicates an expected call of XTrimMinIDApprox.
+func (mr *MockUniversalClientMockRecorder) XTrimMinIDApprox(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XTrimMinIDApprox", reflect.TypeOf((*MockUniversalClient)(nil).XTrimMinIDApprox), arg0, arg1, arg2, arg3)
+}
+
+// ZAdd mocks base method.
+func (m *MockUniversalClient) ZAdd(arg0 context.Context, arg1 string, arg2 ...redis.Z) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZAdd", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZAdd indicates an expected call of ZAdd.
+func (mr *MockUniversalClientMockRecorder) ZAdd(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZAdd", reflect.TypeOf((*MockUniversalClient)(nil).ZAdd), varargs...)
+}
+
+// ZAddArgs mocks base method.
+func (m *MockUniversalClient) ZAddArgs(arg0 context.Context, arg1 string, arg2 redis.ZAddArgs) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZAddArgs", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZAddArgs indicates an expected call of ZAddArgs.
+func (mr *MockUniversalClientMockRecorder) ZAddArgs(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZAddArgs", reflect.TypeOf((*MockUniversalClient)(nil).ZAddArgs), arg0, arg1, arg2)
+}
+
+// ZAddArgsIncr mocks base method.
+func (m *MockUniversalClient) ZAddArgsIncr(arg0 context.Context, arg1 string, arg2 redis.ZAddArgs) *redis.FloatCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZAddArgsIncr", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.FloatCmd)
+ return ret0
+}
+
+// ZAddArgsIncr indicates an expected call of ZAddArgsIncr.
+func (mr *MockUniversalClientMockRecorder) ZAddArgsIncr(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZAddArgsIncr", reflect.TypeOf((*MockUniversalClient)(nil).ZAddArgsIncr), arg0, arg1, arg2)
+}
+
+// ZAddGT mocks base method.
+func (m *MockUniversalClient) ZAddGT(arg0 context.Context, arg1 string, arg2 ...redis.Z) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZAddGT", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZAddGT indicates an expected call of ZAddGT.
+func (mr *MockUniversalClientMockRecorder) ZAddGT(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZAddGT", reflect.TypeOf((*MockUniversalClient)(nil).ZAddGT), varargs...)
+}
+
+// ZAddLT mocks base method.
+func (m *MockUniversalClient) ZAddLT(arg0 context.Context, arg1 string, arg2 ...redis.Z) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZAddLT", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZAddLT indicates an expected call of ZAddLT.
+func (mr *MockUniversalClientMockRecorder) ZAddLT(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZAddLT", reflect.TypeOf((*MockUniversalClient)(nil).ZAddLT), varargs...)
+}
+
+// ZAddNX mocks base method.
+func (m *MockUniversalClient) ZAddNX(arg0 context.Context, arg1 string, arg2 ...redis.Z) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZAddNX", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZAddNX indicates an expected call of ZAddNX.
+func (mr *MockUniversalClientMockRecorder) ZAddNX(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZAddNX", reflect.TypeOf((*MockUniversalClient)(nil).ZAddNX), varargs...)
+}
+
+// ZAddXX mocks base method.
+func (m *MockUniversalClient) ZAddXX(arg0 context.Context, arg1 string, arg2 ...redis.Z) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZAddXX", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZAddXX indicates an expected call of ZAddXX.
+func (mr *MockUniversalClientMockRecorder) ZAddXX(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZAddXX", reflect.TypeOf((*MockUniversalClient)(nil).ZAddXX), varargs...)
+}
+
+// ZCard mocks base method.
+func (m *MockUniversalClient) ZCard(arg0 context.Context, arg1 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZCard", arg0, arg1)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZCard indicates an expected call of ZCard.
+func (mr *MockUniversalClientMockRecorder) ZCard(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZCard", reflect.TypeOf((*MockUniversalClient)(nil).ZCard), arg0, arg1)
+}
+
+// ZCount mocks base method.
+func (m *MockUniversalClient) ZCount(arg0 context.Context, arg1, arg2, arg3 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZCount", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZCount indicates an expected call of ZCount.
+func (mr *MockUniversalClientMockRecorder) ZCount(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZCount", reflect.TypeOf((*MockUniversalClient)(nil).ZCount), arg0, arg1, arg2, arg3)
+}
+
+// ZDiff mocks base method.
+func (m *MockUniversalClient) ZDiff(arg0 context.Context, arg1 ...string) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZDiff", varargs...)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZDiff indicates an expected call of ZDiff.
+func (mr *MockUniversalClientMockRecorder) ZDiff(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZDiff", reflect.TypeOf((*MockUniversalClient)(nil).ZDiff), varargs...)
+}
+
+// ZDiffStore mocks base method.
+func (m *MockUniversalClient) ZDiffStore(arg0 context.Context, arg1 string, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZDiffStore", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZDiffStore indicates an expected call of ZDiffStore.
+func (mr *MockUniversalClientMockRecorder) ZDiffStore(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZDiffStore", reflect.TypeOf((*MockUniversalClient)(nil).ZDiffStore), varargs...)
+}
+
+// ZDiffWithScores mocks base method.
+func (m *MockUniversalClient) ZDiffWithScores(arg0 context.Context, arg1 ...string) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0}
+ for _, a := range arg1 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZDiffWithScores", varargs...)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZDiffWithScores indicates an expected call of ZDiffWithScores.
+func (mr *MockUniversalClientMockRecorder) ZDiffWithScores(arg0 any, arg1 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0}, arg1...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZDiffWithScores", reflect.TypeOf((*MockUniversalClient)(nil).ZDiffWithScores), varargs...)
+}
+
+// ZIncrBy mocks base method.
+func (m *MockUniversalClient) ZIncrBy(arg0 context.Context, arg1 string, arg2 float64, arg3 string) *redis.FloatCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZIncrBy", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.FloatCmd)
+ return ret0
+}
+
+// ZIncrBy indicates an expected call of ZIncrBy.
+func (mr *MockUniversalClientMockRecorder) ZIncrBy(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZIncrBy", reflect.TypeOf((*MockUniversalClient)(nil).ZIncrBy), arg0, arg1, arg2, arg3)
+}
+
+// ZInter mocks base method.
+func (m *MockUniversalClient) ZInter(arg0 context.Context, arg1 *redis.ZStore) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZInter", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZInter indicates an expected call of ZInter.
+func (mr *MockUniversalClientMockRecorder) ZInter(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZInter", reflect.TypeOf((*MockUniversalClient)(nil).ZInter), arg0, arg1)
+}
+
+// ZInterCard mocks base method.
+func (m *MockUniversalClient) ZInterCard(arg0 context.Context, arg1 int64, arg2 ...string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZInterCard", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZInterCard indicates an expected call of ZInterCard.
+func (mr *MockUniversalClientMockRecorder) ZInterCard(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZInterCard", reflect.TypeOf((*MockUniversalClient)(nil).ZInterCard), varargs...)
+}
+
+// ZInterStore mocks base method.
+func (m *MockUniversalClient) ZInterStore(arg0 context.Context, arg1 string, arg2 *redis.ZStore) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZInterStore", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZInterStore indicates an expected call of ZInterStore.
+func (mr *MockUniversalClientMockRecorder) ZInterStore(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZInterStore", reflect.TypeOf((*MockUniversalClient)(nil).ZInterStore), arg0, arg1, arg2)
+}
+
+// ZInterWithScores mocks base method.
+func (m *MockUniversalClient) ZInterWithScores(arg0 context.Context, arg1 *redis.ZStore) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZInterWithScores", arg0, arg1)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZInterWithScores indicates an expected call of ZInterWithScores.
+func (mr *MockUniversalClientMockRecorder) ZInterWithScores(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZInterWithScores", reflect.TypeOf((*MockUniversalClient)(nil).ZInterWithScores), arg0, arg1)
+}
+
+// ZLexCount mocks base method.
+func (m *MockUniversalClient) ZLexCount(arg0 context.Context, arg1, arg2, arg3 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZLexCount", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZLexCount indicates an expected call of ZLexCount.
+func (mr *MockUniversalClientMockRecorder) ZLexCount(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZLexCount", reflect.TypeOf((*MockUniversalClient)(nil).ZLexCount), arg0, arg1, arg2, arg3)
+}
+
+// ZMPop mocks base method.
+func (m *MockUniversalClient) ZMPop(arg0 context.Context, arg1 string, arg2 int64, arg3 ...string) *redis.ZSliceWithKeyCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1, arg2}
+ for _, a := range arg3 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZMPop", varargs...)
+ ret0, _ := ret[0].(*redis.ZSliceWithKeyCmd)
+ return ret0
+}
+
+// ZMPop indicates an expected call of ZMPop.
+func (mr *MockUniversalClientMockRecorder) ZMPop(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1, arg2}, arg3...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZMPop", reflect.TypeOf((*MockUniversalClient)(nil).ZMPop), varargs...)
+}
+
+// ZMScore mocks base method.
+func (m *MockUniversalClient) ZMScore(arg0 context.Context, arg1 string, arg2 ...string) *redis.FloatSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZMScore", varargs...)
+ ret0, _ := ret[0].(*redis.FloatSliceCmd)
+ return ret0
+}
+
+// ZMScore indicates an expected call of ZMScore.
+func (mr *MockUniversalClientMockRecorder) ZMScore(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZMScore", reflect.TypeOf((*MockUniversalClient)(nil).ZMScore), varargs...)
+}
+
+// ZPopMax mocks base method.
+func (m *MockUniversalClient) ZPopMax(arg0 context.Context, arg1 string, arg2 ...int64) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZPopMax", varargs...)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZPopMax indicates an expected call of ZPopMax.
+func (mr *MockUniversalClientMockRecorder) ZPopMax(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZPopMax", reflect.TypeOf((*MockUniversalClient)(nil).ZPopMax), varargs...)
+}
+
+// ZPopMin mocks base method.
+func (m *MockUniversalClient) ZPopMin(arg0 context.Context, arg1 string, arg2 ...int64) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZPopMin", varargs...)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZPopMin indicates an expected call of ZPopMin.
+func (mr *MockUniversalClientMockRecorder) ZPopMin(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZPopMin", reflect.TypeOf((*MockUniversalClient)(nil).ZPopMin), varargs...)
+}
+
+// ZRandMember mocks base method.
+func (m *MockUniversalClient) ZRandMember(arg0 context.Context, arg1 string, arg2 int) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRandMember", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZRandMember indicates an expected call of ZRandMember.
+func (mr *MockUniversalClientMockRecorder) ZRandMember(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRandMember", reflect.TypeOf((*MockUniversalClient)(nil).ZRandMember), arg0, arg1, arg2)
+}
+
+// ZRandMemberWithScores mocks base method.
+func (m *MockUniversalClient) ZRandMemberWithScores(arg0 context.Context, arg1 string, arg2 int) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRandMemberWithScores", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZRandMemberWithScores indicates an expected call of ZRandMemberWithScores.
+func (mr *MockUniversalClientMockRecorder) ZRandMemberWithScores(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRandMemberWithScores", reflect.TypeOf((*MockUniversalClient)(nil).ZRandMemberWithScores), arg0, arg1, arg2)
+}
+
+// ZRange mocks base method.
+func (m *MockUniversalClient) ZRange(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZRange indicates an expected call of ZRange.
+func (mr *MockUniversalClientMockRecorder) ZRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRange", reflect.TypeOf((*MockUniversalClient)(nil).ZRange), arg0, arg1, arg2, arg3)
+}
+
+// ZRangeArgs mocks base method.
+func (m *MockUniversalClient) ZRangeArgs(arg0 context.Context, arg1 redis.ZRangeArgs) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRangeArgs", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZRangeArgs indicates an expected call of ZRangeArgs.
+func (mr *MockUniversalClientMockRecorder) ZRangeArgs(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRangeArgs", reflect.TypeOf((*MockUniversalClient)(nil).ZRangeArgs), arg0, arg1)
+}
+
+// ZRangeArgsWithScores mocks base method.
+func (m *MockUniversalClient) ZRangeArgsWithScores(arg0 context.Context, arg1 redis.ZRangeArgs) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRangeArgsWithScores", arg0, arg1)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZRangeArgsWithScores indicates an expected call of ZRangeArgsWithScores.
+func (mr *MockUniversalClientMockRecorder) ZRangeArgsWithScores(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRangeArgsWithScores", reflect.TypeOf((*MockUniversalClient)(nil).ZRangeArgsWithScores), arg0, arg1)
+}
+
+// ZRangeByLex mocks base method.
+func (m *MockUniversalClient) ZRangeByLex(arg0 context.Context, arg1 string, arg2 *redis.ZRangeBy) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRangeByLex", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZRangeByLex indicates an expected call of ZRangeByLex.
+func (mr *MockUniversalClientMockRecorder) ZRangeByLex(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRangeByLex", reflect.TypeOf((*MockUniversalClient)(nil).ZRangeByLex), arg0, arg1, arg2)
+}
+
+// ZRangeByScore mocks base method.
+func (m *MockUniversalClient) ZRangeByScore(arg0 context.Context, arg1 string, arg2 *redis.ZRangeBy) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRangeByScore", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZRangeByScore indicates an expected call of ZRangeByScore.
+func (mr *MockUniversalClientMockRecorder) ZRangeByScore(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRangeByScore", reflect.TypeOf((*MockUniversalClient)(nil).ZRangeByScore), arg0, arg1, arg2)
+}
+
+// ZRangeByScoreWithScores mocks base method.
+func (m *MockUniversalClient) ZRangeByScoreWithScores(arg0 context.Context, arg1 string, arg2 *redis.ZRangeBy) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRangeByScoreWithScores", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZRangeByScoreWithScores indicates an expected call of ZRangeByScoreWithScores.
+func (mr *MockUniversalClientMockRecorder) ZRangeByScoreWithScores(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRangeByScoreWithScores", reflect.TypeOf((*MockUniversalClient)(nil).ZRangeByScoreWithScores), arg0, arg1, arg2)
+}
+
+// ZRangeStore mocks base method.
+func (m *MockUniversalClient) ZRangeStore(arg0 context.Context, arg1 string, arg2 redis.ZRangeArgs) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRangeStore", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZRangeStore indicates an expected call of ZRangeStore.
+func (mr *MockUniversalClientMockRecorder) ZRangeStore(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRangeStore", reflect.TypeOf((*MockUniversalClient)(nil).ZRangeStore), arg0, arg1, arg2)
+}
+
+// ZRangeWithScores mocks base method.
+func (m *MockUniversalClient) ZRangeWithScores(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRangeWithScores", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZRangeWithScores indicates an expected call of ZRangeWithScores.
+func (mr *MockUniversalClientMockRecorder) ZRangeWithScores(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRangeWithScores", reflect.TypeOf((*MockUniversalClient)(nil).ZRangeWithScores), arg0, arg1, arg2, arg3)
+}
+
+// ZRank mocks base method.
+func (m *MockUniversalClient) ZRank(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRank", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZRank indicates an expected call of ZRank.
+func (mr *MockUniversalClientMockRecorder) ZRank(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRank", reflect.TypeOf((*MockUniversalClient)(nil).ZRank), arg0, arg1, arg2)
+}
+
+// ZRankWithScore mocks base method.
+func (m *MockUniversalClient) ZRankWithScore(arg0 context.Context, arg1, arg2 string) *redis.RankWithScoreCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRankWithScore", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.RankWithScoreCmd)
+ return ret0
+}
+
+// ZRankWithScore indicates an expected call of ZRankWithScore.
+func (mr *MockUniversalClientMockRecorder) ZRankWithScore(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRankWithScore", reflect.TypeOf((*MockUniversalClient)(nil).ZRankWithScore), arg0, arg1, arg2)
+}
+
+// ZRem mocks base method.
+func (m *MockUniversalClient) ZRem(arg0 context.Context, arg1 string, arg2 ...any) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ varargs := []any{arg0, arg1}
+ for _, a := range arg2 {
+ varargs = append(varargs, a)
+ }
+ ret := m.ctrl.Call(m, "ZRem", varargs...)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZRem indicates an expected call of ZRem.
+func (mr *MockUniversalClientMockRecorder) ZRem(arg0, arg1 any, arg2 ...any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ varargs := append([]any{arg0, arg1}, arg2...)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRem", reflect.TypeOf((*MockUniversalClient)(nil).ZRem), varargs...)
+}
+
+// ZRemRangeByLex mocks base method.
+func (m *MockUniversalClient) ZRemRangeByLex(arg0 context.Context, arg1, arg2, arg3 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRemRangeByLex", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZRemRangeByLex indicates an expected call of ZRemRangeByLex.
+func (mr *MockUniversalClientMockRecorder) ZRemRangeByLex(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRemRangeByLex", reflect.TypeOf((*MockUniversalClient)(nil).ZRemRangeByLex), arg0, arg1, arg2, arg3)
+}
+
+// ZRemRangeByRank mocks base method.
+func (m *MockUniversalClient) ZRemRangeByRank(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRemRangeByRank", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZRemRangeByRank indicates an expected call of ZRemRangeByRank.
+func (mr *MockUniversalClientMockRecorder) ZRemRangeByRank(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRemRangeByRank", reflect.TypeOf((*MockUniversalClient)(nil).ZRemRangeByRank), arg0, arg1, arg2, arg3)
+}
+
+// ZRemRangeByScore mocks base method.
+func (m *MockUniversalClient) ZRemRangeByScore(arg0 context.Context, arg1, arg2, arg3 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRemRangeByScore", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZRemRangeByScore indicates an expected call of ZRemRangeByScore.
+func (mr *MockUniversalClientMockRecorder) ZRemRangeByScore(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRemRangeByScore", reflect.TypeOf((*MockUniversalClient)(nil).ZRemRangeByScore), arg0, arg1, arg2, arg3)
+}
+
+// ZRevRange mocks base method.
+func (m *MockUniversalClient) ZRevRange(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRevRange", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZRevRange indicates an expected call of ZRevRange.
+func (mr *MockUniversalClientMockRecorder) ZRevRange(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRevRange", reflect.TypeOf((*MockUniversalClient)(nil).ZRevRange), arg0, arg1, arg2, arg3)
+}
+
+// ZRevRangeByLex mocks base method.
+func (m *MockUniversalClient) ZRevRangeByLex(arg0 context.Context, arg1 string, arg2 *redis.ZRangeBy) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRevRangeByLex", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZRevRangeByLex indicates an expected call of ZRevRangeByLex.
+func (mr *MockUniversalClientMockRecorder) ZRevRangeByLex(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRevRangeByLex", reflect.TypeOf((*MockUniversalClient)(nil).ZRevRangeByLex), arg0, arg1, arg2)
+}
+
+// ZRevRangeByScore mocks base method.
+func (m *MockUniversalClient) ZRevRangeByScore(arg0 context.Context, arg1 string, arg2 *redis.ZRangeBy) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRevRangeByScore", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZRevRangeByScore indicates an expected call of ZRevRangeByScore.
+func (mr *MockUniversalClientMockRecorder) ZRevRangeByScore(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRevRangeByScore", reflect.TypeOf((*MockUniversalClient)(nil).ZRevRangeByScore), arg0, arg1, arg2)
+}
+
+// ZRevRangeByScoreWithScores mocks base method.
+func (m *MockUniversalClient) ZRevRangeByScoreWithScores(arg0 context.Context, arg1 string, arg2 *redis.ZRangeBy) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRevRangeByScoreWithScores", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZRevRangeByScoreWithScores indicates an expected call of ZRevRangeByScoreWithScores.
+func (mr *MockUniversalClientMockRecorder) ZRevRangeByScoreWithScores(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRevRangeByScoreWithScores", reflect.TypeOf((*MockUniversalClient)(nil).ZRevRangeByScoreWithScores), arg0, arg1, arg2)
+}
+
+// ZRevRangeWithScores mocks base method.
+func (m *MockUniversalClient) ZRevRangeWithScores(arg0 context.Context, arg1 string, arg2, arg3 int64) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRevRangeWithScores", arg0, arg1, arg2, arg3)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZRevRangeWithScores indicates an expected call of ZRevRangeWithScores.
+func (mr *MockUniversalClientMockRecorder) ZRevRangeWithScores(arg0, arg1, arg2, arg3 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRevRangeWithScores", reflect.TypeOf((*MockUniversalClient)(nil).ZRevRangeWithScores), arg0, arg1, arg2, arg3)
+}
+
+// ZRevRank mocks base method.
+func (m *MockUniversalClient) ZRevRank(arg0 context.Context, arg1, arg2 string) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRevRank", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZRevRank indicates an expected call of ZRevRank.
+func (mr *MockUniversalClientMockRecorder) ZRevRank(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRevRank", reflect.TypeOf((*MockUniversalClient)(nil).ZRevRank), arg0, arg1, arg2)
+}
+
+// ZRevRankWithScore mocks base method.
+func (m *MockUniversalClient) ZRevRankWithScore(arg0 context.Context, arg1, arg2 string) *redis.RankWithScoreCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZRevRankWithScore", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.RankWithScoreCmd)
+ return ret0
+}
+
+// ZRevRankWithScore indicates an expected call of ZRevRankWithScore.
+func (mr *MockUniversalClientMockRecorder) ZRevRankWithScore(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZRevRankWithScore", reflect.TypeOf((*MockUniversalClient)(nil).ZRevRankWithScore), arg0, arg1, arg2)
+}
+
+// ZScan mocks base method.
+func (m *MockUniversalClient) ZScan(arg0 context.Context, arg1 string, arg2 uint64, arg3 string, arg4 int64) *redis.ScanCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZScan", arg0, arg1, arg2, arg3, arg4)
+ ret0, _ := ret[0].(*redis.ScanCmd)
+ return ret0
+}
+
+// ZScan indicates an expected call of ZScan.
+func (mr *MockUniversalClientMockRecorder) ZScan(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZScan", reflect.TypeOf((*MockUniversalClient)(nil).ZScan), arg0, arg1, arg2, arg3, arg4)
+}
+
+// ZScore mocks base method.
+func (m *MockUniversalClient) ZScore(arg0 context.Context, arg1, arg2 string) *redis.FloatCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZScore", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.FloatCmd)
+ return ret0
+}
+
+// ZScore indicates an expected call of ZScore.
+func (mr *MockUniversalClientMockRecorder) ZScore(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZScore", reflect.TypeOf((*MockUniversalClient)(nil).ZScore), arg0, arg1, arg2)
+}
+
+// ZUnion mocks base method.
+func (m *MockUniversalClient) ZUnion(arg0 context.Context, arg1 redis.ZStore) *redis.StringSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZUnion", arg0, arg1)
+ ret0, _ := ret[0].(*redis.StringSliceCmd)
+ return ret0
+}
+
+// ZUnion indicates an expected call of ZUnion.
+func (mr *MockUniversalClientMockRecorder) ZUnion(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZUnion", reflect.TypeOf((*MockUniversalClient)(nil).ZUnion), arg0, arg1)
+}
+
+// ZUnionStore mocks base method.
+func (m *MockUniversalClient) ZUnionStore(arg0 context.Context, arg1 string, arg2 *redis.ZStore) *redis.IntCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZUnionStore", arg0, arg1, arg2)
+ ret0, _ := ret[0].(*redis.IntCmd)
+ return ret0
+}
+
+// ZUnionStore indicates an expected call of ZUnionStore.
+func (mr *MockUniversalClientMockRecorder) ZUnionStore(arg0, arg1, arg2 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZUnionStore", reflect.TypeOf((*MockUniversalClient)(nil).ZUnionStore), arg0, arg1, arg2)
+}
+
+// ZUnionWithScores mocks base method.
+func (m *MockUniversalClient) ZUnionWithScores(arg0 context.Context, arg1 redis.ZStore) *redis.ZSliceCmd {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "ZUnionWithScores", arg0, arg1)
+ ret0, _ := ret[0].(*redis.ZSliceCmd)
+ return ret0
+}
+
+// ZUnionWithScores indicates an expected call of ZUnionWithScores.
+func (mr *MockUniversalClientMockRecorder) ZUnionWithScores(arg0, arg1 any) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZUnionWithScores", reflect.TypeOf((*MockUniversalClient)(nil).ZUnionWithScores), arg0, arg1)
+}
diff --git a/modules/queue/queue.go b/modules/queue/queue.go
new file mode 100644
index 00000000..56835014
--- /dev/null
+++ b/modules/queue/queue.go
@@ -0,0 +1,68 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+// Package queue implements a specialized concurrent queue system for Gitea.
+//
+// Terminology:
+//
+// 1. Item:
+// - An item can be a simple value, such as an integer, or a more complex structure that has multiple fields.
+// Usually a item serves as a task or a message. Sets of items will be sent to a queue handler to be processed.
+// - It's represented as a JSON-marshaled binary slice in the queue
+// - Since the item is marshaled by JSON, and JSON doesn't have stable key-order/type support,
+// so the decoded handler item may not be the same as the original "pushed" one if you use map/any types,
+//
+// 2. Batch:
+// - A collection of items that are grouped together for processing. Each worker receives a batch of items.
+//
+// 3. Worker:
+// - Individual unit of execution designed to process items from the queue. It's a goroutine that calls the Handler.
+// - Workers will get new items through a channel (WorkerPoolQueue is responsible for the distribution).
+// - Workers operate in parallel. The default value of max workers is determined by the setting system.
+//
+// 4. Handler (represented by HandlerFuncT type):
+// - It's the function responsible for processing items. Each active worker will call it.
+// - If an item or some items are not successfully processed, the handler could return them as "unhandled items".
+// In such scenarios, the queue system ensures these unhandled items are returned to the base queue after a brief delay.
+// This mechanism is particularly beneficial in cases where the processing entity (like a document indexer) is
+// temporarily unavailable. It ensures that no item is skipped or lost due to transient failures in the processing
+// mechanism.
+//
+// 5. Base queue:
+// - Represents the underlying storage mechanism for the queue. There are several implementations:
+// - Channel: Uses Go's native channel constructs to manage the queue, suitable for in-memory queuing.
+// - LevelDB: Especially useful in persistent queues for single instances.
+// - Redis: Suitable for clusters, where we may have multiple nodes.
+// - Dummy: This is special, it's not a real queue, it's a immediate no-op queue, which is useful for tests.
+// - They all have the same abstraction, the same interface, and they are tested by the same testing code.
+//
+// 6. WorkerPoolQueue:
+// - It's responsible to glue all together, using the "base queue" to provide "worker pool" functionality. It creates
+// new workers if needed and can flush the queue, running all the items synchronously till it finishes.
+// - Its "Push" function doesn't block forever, it will return an error if the queue is full after the timeout.
+//
+// 7. Manager:
+// - The purpose of it is to serve as a centralized manager for multiple WorkerPoolQueue instances. Whenever we want
+// to create a new queue, flush, or get a specific queue, we could use it.
+//
+// A queue can be "simple" or "unique". A unique queue will try to avoid duplicate items.
+// Unique queue's "Has" function can be used to check whether an item is already in the queue,
+// although it's not 100% reliable due to the lack of proper transaction support.
+// Simple queue's "Has" function always returns "has=false".
+//
+// A WorkerPoolQueue is a generic struct; this means it will work with any type but just for that type.
+// If you want another kind of items to run, you would have to call the manager to create a new WorkerPoolQueue for you
+// with a different handler that works with this new type of item. As an example of this:
+//
+// func Init() error {
+// itemQueue = queue.CreateSimpleQueue(graceful.GetManager().ShutdownContext(), "queue-name", handler)
+// ...
+// }
+// func handler(items ...*mypkg.QueueItem) []*mypkg.QueueItem { ... }
+package queue
+
+import "code.gitea.io/gitea/modules/util"
+
+type HandlerFuncT[T any] func(...T) (unhandled []T)
+
+var ErrAlreadyInQueue = util.NewAlreadyExistErrorf("already in queue")
diff --git a/modules/queue/testhelper.go b/modules/queue/testhelper.go
new file mode 100644
index 00000000..edfa438b
--- /dev/null
+++ b/modules/queue/testhelper.go
@@ -0,0 +1,40 @@
+// Copyright 2019 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "fmt"
+ "sync"
+)
+
+// testStateRecorder is used to record state changes for testing, to help debug async behaviors
+type testStateRecorder struct {
+ records []string
+ mu sync.Mutex
+}
+
+var testRecorder = &testStateRecorder{}
+
+func (t *testStateRecorder) Record(format string, args ...any) {
+ t.mu.Lock()
+ t.records = append(t.records, fmt.Sprintf(format, args...))
+ if len(t.records) > 1000 {
+ t.records = t.records[len(t.records)-1000:]
+ }
+ t.mu.Unlock()
+}
+
+func (t *testStateRecorder) Records() []string {
+ t.mu.Lock()
+ r := make([]string, len(t.records))
+ copy(r, t.records)
+ t.mu.Unlock()
+ return r
+}
+
+func (t *testStateRecorder) Reset() {
+ t.mu.Lock()
+ t.records = nil
+ t.mu.Unlock()
+}
diff --git a/modules/queue/workergroup.go b/modules/queue/workergroup.go
new file mode 100644
index 00000000..ea4c0020
--- /dev/null
+++ b/modules/queue/workergroup.go
@@ -0,0 +1,350 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "runtime/pprof"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "code.gitea.io/gitea/modules/log"
+)
+
+var (
+ infiniteTimerC = make(chan time.Time)
+ batchDebounceDuration = 100 * time.Millisecond
+ workerIdleDuration = 1 * time.Second
+ shutdownDefaultTimeout = 2 * time.Second
+
+ unhandledItemRequeueDuration atomic.Int64 // to avoid data race during test
+)
+
+func init() {
+ unhandledItemRequeueDuration.Store(int64(5 * time.Second))
+}
+
+// workerGroup is a group of workers to work with a WorkerPoolQueue
+type workerGroup[T any] struct {
+ q *WorkerPoolQueue[T]
+ wg sync.WaitGroup
+
+ ctxWorker context.Context
+ ctxWorkerCancel context.CancelFunc
+
+ batchBuffer []T
+ popItemChan chan []byte
+ popItemErr chan error
+}
+
+func (wg *workerGroup[T]) doPrepareWorkerContext() {
+ wg.ctxWorker, wg.ctxWorkerCancel = context.WithCancel(wg.q.ctxRun)
+}
+
+// doDispatchBatchToWorker dispatches a batch of items to worker's channel.
+// If the channel is full, it tries to start a new worker if possible.
+func (q *WorkerPoolQueue[T]) doDispatchBatchToWorker(wg *workerGroup[T], flushChan chan flushType) {
+ batch := wg.batchBuffer
+ wg.batchBuffer = nil
+
+ if len(batch) == 0 {
+ return
+ }
+
+ full := false
+ select {
+ case q.batchChan <- batch:
+ default:
+ full = true
+ }
+
+ // TODO: the logic could be improved in the future, to avoid a data-race between "doStartNewWorker" and "workerNum"
+ // The root problem is that if we skip "doStartNewWorker" here, the "workerNum" might be decreased by other workers later
+ // So ideally, it should check whether there are enough workers by some approaches, and start new workers if necessary.
+ q.workerNumMu.Lock()
+ noWorker := q.workerNum == 0
+ if full || noWorker {
+ if q.workerNum < q.workerMaxNum || noWorker && q.workerMaxNum <= 0 {
+ q.workerNum++
+ q.doStartNewWorker(wg)
+ }
+ }
+ q.workerNumMu.Unlock()
+
+ if full {
+ select {
+ case q.batchChan <- batch:
+ case flush := <-flushChan:
+ q.doWorkerHandle(batch)
+ q.doFlush(wg, flush)
+ case <-q.ctxRun.Done():
+ wg.batchBuffer = batch // return the batch to buffer, the "doRun" function will handle it
+ }
+ }
+}
+
+// doWorkerHandle calls the safeHandler to handle a batch of items, and it increases/decreases the active worker number.
+// If the context has been canceled, it should not be caller because the "Push" still needs the context, in such case, call q.safeHandler directly
+func (q *WorkerPoolQueue[T]) doWorkerHandle(batch []T) {
+ q.workerNumMu.Lock()
+ q.workerActiveNum++
+ q.workerNumMu.Unlock()
+
+ defer func() {
+ q.workerNumMu.Lock()
+ q.workerActiveNum--
+ q.workerNumMu.Unlock()
+ }()
+
+ unhandled := q.safeHandler(batch...)
+ // if none of the items were handled, it should back-off for a few seconds
+ // in this case the handler (eg: document indexer) may have encountered some errors/failures
+ if len(unhandled) == len(batch) && unhandledItemRequeueDuration.Load() != 0 {
+ log.Error("Queue %q failed to handle batch of %d items, backoff for a few seconds", q.GetName(), len(batch))
+ select {
+ case <-q.ctxRun.Done():
+ case <-time.After(time.Duration(unhandledItemRequeueDuration.Load())):
+ }
+ }
+ for _, item := range unhandled {
+ if err := q.Push(item); err != nil {
+ if !q.basePushForShutdown(item) {
+ log.Error("Failed to requeue item for queue %q when calling handler: %v", q.GetName(), err)
+ }
+ }
+ }
+}
+
+// basePushForShutdown tries to requeue items into the base queue when the WorkerPoolQueue is shutting down.
+// If the queue is shutting down, it returns true and try to push the items
+// Otherwise it does nothing and returns false
+func (q *WorkerPoolQueue[T]) basePushForShutdown(items ...T) bool {
+ shutdownTimeout := time.Duration(q.shutdownTimeout.Load())
+ if shutdownTimeout == 0 {
+ return false
+ }
+ ctxShutdown, ctxShutdownCancel := context.WithTimeout(context.Background(), shutdownTimeout)
+ defer ctxShutdownCancel()
+ for _, item := range items {
+ // if there is still any error, the queue can do nothing instead of losing the items
+ if err := q.baseQueue.PushItem(ctxShutdown, q.marshal(item)); err != nil {
+ log.Error("Failed to requeue item for queue %q when shutting down: %v", q.GetName(), err)
+ }
+ }
+ return true
+}
+
+// doStartNewWorker starts a new worker for the queue, the worker reads from worker's channel and handles the items.
+func (q *WorkerPoolQueue[T]) doStartNewWorker(wp *workerGroup[T]) {
+ wp.wg.Add(1)
+
+ go func() {
+ defer wp.wg.Done()
+
+ log.Debug("Queue %q starts new worker", q.GetName())
+ defer log.Debug("Queue %q stops idle worker", q.GetName())
+
+ t := time.NewTicker(workerIdleDuration)
+ defer t.Stop()
+
+ keepWorking := true
+ stopWorking := func() {
+ q.workerNumMu.Lock()
+ keepWorking = false
+ q.workerNum--
+ q.workerNumMu.Unlock()
+ }
+ for keepWorking {
+ select {
+ case <-wp.ctxWorker.Done():
+ stopWorking()
+ case batch, ok := <-q.batchChan:
+ if !ok {
+ stopWorking()
+ continue
+ }
+ q.doWorkerHandle(batch)
+ // reset the idle ticker, and drain the tick after reset in case a tick is already triggered
+ t.Reset(workerIdleDuration)
+ select {
+ case <-t.C:
+ default:
+ }
+ case <-t.C:
+ q.workerNumMu.Lock()
+ keepWorking = q.workerNum <= 1 // keep the last worker running
+ if !keepWorking {
+ q.workerNum--
+ }
+ q.workerNumMu.Unlock()
+ }
+ }
+ }()
+}
+
+// doFlush flushes the queue: it tries to read all items from the queue and handles them.
+// It is for testing purpose only. It's not designed to work for a cluster.
+func (q *WorkerPoolQueue[T]) doFlush(wg *workerGroup[T], flush flushType) {
+ log.Debug("Queue %q starts flushing", q.GetName())
+ defer log.Debug("Queue %q finishes flushing", q.GetName())
+
+ // stop all workers, and prepare a new worker context to start new workers
+
+ wg.ctxWorkerCancel()
+ wg.wg.Wait()
+
+ defer func() {
+ close(flush)
+ wg.doPrepareWorkerContext()
+ }()
+
+ // drain the batch channel first
+loop:
+ for {
+ select {
+ case batch := <-q.batchChan:
+ q.doWorkerHandle(batch)
+ default:
+ break loop
+ }
+ }
+
+ // drain the popItem channel
+ emptyCounter := 0
+ for {
+ select {
+ case data, dataOk := <-wg.popItemChan:
+ if !dataOk {
+ return
+ }
+ emptyCounter = 0
+ if v, jsonOk := q.unmarshal(data); !jsonOk {
+ continue
+ } else {
+ q.doWorkerHandle([]T{v})
+ }
+ case err := <-wg.popItemErr:
+ if !q.isCtxRunCanceled() {
+ log.Error("Failed to pop item from queue %q (doFlush): %v", q.GetName(), err)
+ }
+ return
+ case <-q.ctxRun.Done():
+ log.Debug("Queue %q is shutting down", q.GetName())
+ return
+ case <-time.After(20 * time.Millisecond):
+ // There is no reliable way to make sure all queue items are consumed by the Flush, there always might be some items stored in some buffers/temp variables.
+ // If we run Gitea in a cluster, we can even not guarantee all items are consumed in a deterministic instance.
+ // Luckily, the "Flush" trick is only used in tests, so far so good.
+ if cnt, _ := q.baseQueue.Len(q.ctxRun); cnt == 0 && len(wg.popItemChan) == 0 {
+ emptyCounter++
+ }
+ if emptyCounter >= 2 {
+ return
+ }
+ }
+ }
+}
+
+func (q *WorkerPoolQueue[T]) isCtxRunCanceled() bool {
+ select {
+ case <-q.ctxRun.Done():
+ return true
+ default:
+ return false
+ }
+}
+
+var skipFlushChan = make(chan flushType) // an empty flush chan, used to skip reading other flush requests
+
+// doRun is the main loop of the queue. All related "doXxx" functions are executed in its context.
+func (q *WorkerPoolQueue[T]) doRun() {
+ pprof.SetGoroutineLabels(q.ctxRun)
+
+ log.Debug("Queue %q starts running", q.GetName())
+ defer log.Debug("Queue %q stops running", q.GetName())
+
+ wg := &workerGroup[T]{q: q}
+ wg.doPrepareWorkerContext()
+ wg.popItemChan, wg.popItemErr = popItemByChan(q.ctxRun, q.baseQueue.PopItem)
+
+ defer func() {
+ q.ctxRunCancel()
+
+ // drain all data on the fly
+ // since the queue is shutting down, the items can't be dispatched to workers because the context is canceled
+ // it can't call doWorkerHandle either, because there is no chance to push unhandled items back to the queue
+ var unhandled []T
+ close(q.batchChan)
+ for batch := range q.batchChan {
+ unhandled = append(unhandled, batch...)
+ }
+ unhandled = append(unhandled, wg.batchBuffer...)
+ for data := range wg.popItemChan {
+ if v, ok := q.unmarshal(data); ok {
+ unhandled = append(unhandled, v)
+ }
+ }
+
+ shutdownTimeout := time.Duration(q.shutdownTimeout.Load())
+ if shutdownTimeout != 0 {
+ // if there is a shutdown context, try to push the items back to the base queue
+ q.basePushForShutdown(unhandled...)
+ workerDone := make(chan struct{})
+ // the only way to wait for the workers, because the handlers do not have context to wait for
+ go func() { wg.wg.Wait(); close(workerDone) }()
+ select {
+ case <-workerDone:
+ case <-time.After(shutdownTimeout):
+ log.Error("Queue %q is shutting down, but workers are still running after timeout", q.GetName())
+ }
+ } else {
+ // if there is no shutdown context, just call the handler to try to handle the items. if the handler fails again, the items are lost
+ q.safeHandler(unhandled...)
+ }
+
+ close(q.shutdownDone)
+ }()
+
+ var batchDispatchC <-chan time.Time = infiniteTimerC
+ for {
+ select {
+ case data, dataOk := <-wg.popItemChan:
+ if !dataOk {
+ return
+ }
+ if v, jsonOk := q.unmarshal(data); !jsonOk {
+ testRecorder.Record("pop:corrupted:%s", data) // in rare cases the levelqueue(leveldb) might be corrupted
+ continue
+ } else {
+ wg.batchBuffer = append(wg.batchBuffer, v)
+ }
+ if len(wg.batchBuffer) >= q.batchLength {
+ q.doDispatchBatchToWorker(wg, q.flushChan)
+ } else if batchDispatchC == infiniteTimerC {
+ batchDispatchC = time.After(batchDebounceDuration)
+ } // else: batchDispatchC is already a debounce timer, it will be triggered soon
+ case <-batchDispatchC:
+ batchDispatchC = infiniteTimerC
+ q.doDispatchBatchToWorker(wg, q.flushChan)
+ case flush := <-q.flushChan:
+ // before flushing, it needs to try to dispatch the batch to worker first, in case there is no worker running
+ // after the flushing, there is at least one worker running, so "doFlush" could wait for workers to finish
+ // since we are already in a "flush" operation, so the dispatching function shouldn't read the flush chan.
+ q.doDispatchBatchToWorker(wg, skipFlushChan)
+ q.doFlush(wg, flush)
+ case err, errOk := <-wg.popItemErr:
+ if !errOk {
+ return
+ }
+ if !q.isCtxRunCanceled() {
+ log.Error("Failed to pop item from queue %q (doRun): %v", q.GetName(), err)
+ }
+ return
+ case <-q.ctxRun.Done():
+ log.Debug("Queue %q is shutting down", q.GetName())
+ return
+ }
+ }
+}
diff --git a/modules/queue/workerqueue.go b/modules/queue/workerqueue.go
new file mode 100644
index 00000000..041ce9a3
--- /dev/null
+++ b/modules/queue/workerqueue.go
@@ -0,0 +1,260 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "context"
+ "fmt"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "code.gitea.io/gitea/modules/json"
+ "code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/process"
+ "code.gitea.io/gitea/modules/setting"
+)
+
+// WorkerPoolQueue is a queue that uses a pool of workers to process items
+// It can use different underlying (base) queue types
+type WorkerPoolQueue[T any] struct {
+ ctxRun context.Context
+ ctxRunCancel context.CancelFunc
+
+ shutdownDone chan struct{}
+ shutdownTimeout atomic.Int64 // in case some buggy handlers (workers) would hang forever, "shutdown" should finish in predictable time
+
+ origHandler HandlerFuncT[T]
+ safeHandler HandlerFuncT[T]
+
+ baseQueueType string
+ baseConfig *BaseConfig
+ baseQueue baseQueue
+
+ batchChan chan []T
+ flushChan chan flushType
+
+ batchLength int
+ workerNum int
+ workerMaxNum int
+ workerActiveNum int
+ workerNumMu sync.Mutex
+}
+
+type flushType chan struct{}
+
+var _ ManagedWorkerPoolQueue = (*WorkerPoolQueue[any])(nil)
+
+func (q *WorkerPoolQueue[T]) GetName() string {
+ return q.baseConfig.ManagedName
+}
+
+func (q *WorkerPoolQueue[T]) GetType() string {
+ return q.baseQueueType
+}
+
+func (q *WorkerPoolQueue[T]) GetItemTypeName() string {
+ var t T
+ return fmt.Sprintf("%T", t)
+}
+
+func (q *WorkerPoolQueue[T]) GetWorkerNumber() int {
+ q.workerNumMu.Lock()
+ defer q.workerNumMu.Unlock()
+ return q.workerNum
+}
+
+func (q *WorkerPoolQueue[T]) GetWorkerActiveNumber() int {
+ q.workerNumMu.Lock()
+ defer q.workerNumMu.Unlock()
+ return q.workerActiveNum
+}
+
+func (q *WorkerPoolQueue[T]) GetWorkerMaxNumber() int {
+ q.workerNumMu.Lock()
+ defer q.workerNumMu.Unlock()
+ return q.workerMaxNum
+}
+
+func (q *WorkerPoolQueue[T]) SetWorkerMaxNumber(num int) {
+ q.workerNumMu.Lock()
+ defer q.workerNumMu.Unlock()
+ q.workerMaxNum = num
+}
+
+func (q *WorkerPoolQueue[T]) GetQueueItemNumber() int {
+ cnt, err := q.baseQueue.Len(q.ctxRun)
+ if err != nil {
+ log.Error("Failed to get number of items in queue %q: %v", q.GetName(), err)
+ }
+ return cnt
+}
+
+func (q *WorkerPoolQueue[T]) FlushWithContext(ctx context.Context, timeout time.Duration) (err error) {
+ if q.isBaseQueueDummy() {
+ return nil
+ }
+
+ log.Debug("Try to flush queue %q with timeout %v", q.GetName(), timeout)
+ defer log.Debug("Finish flushing queue %q, err: %v", q.GetName(), err)
+
+ var after <-chan time.Time
+ after = infiniteTimerC
+ if timeout > 0 {
+ after = time.After(timeout)
+ }
+ c := make(flushType)
+
+ // send flush request
+ // if it blocks, it means that there is a flush in progress or the queue hasn't been started yet
+ select {
+ case q.flushChan <- c:
+ case <-ctx.Done():
+ return ctx.Err()
+ case <-q.ctxRun.Done():
+ return q.ctxRun.Err()
+ case <-after:
+ return context.DeadlineExceeded
+ }
+
+ // wait for flush to finish
+ select {
+ case <-c:
+ return nil
+ case <-ctx.Done():
+ return ctx.Err()
+ case <-q.ctxRun.Done():
+ return q.ctxRun.Err()
+ case <-after:
+ return context.DeadlineExceeded
+ }
+}
+
+// RemoveAllItems removes all items in the baes queue
+func (q *WorkerPoolQueue[T]) RemoveAllItems(ctx context.Context) error {
+ return q.baseQueue.RemoveAll(ctx)
+}
+
+func (q *WorkerPoolQueue[T]) marshal(data T) []byte {
+ bs, err := json.Marshal(data)
+ if err != nil {
+ log.Error("Failed to marshal item for queue %q: %v", q.GetName(), err)
+ return nil
+ }
+ return bs
+}
+
+func (q *WorkerPoolQueue[T]) unmarshal(data []byte) (t T, ok bool) {
+ if err := json.Unmarshal(data, &t); err != nil {
+ log.Error("Failed to unmarshal item from queue %q: %v", q.GetName(), err)
+ return t, false
+ }
+ return t, true
+}
+
+func (q *WorkerPoolQueue[T]) isBaseQueueDummy() bool {
+ _, isDummy := q.baseQueue.(*baseDummy)
+ return isDummy
+}
+
+// Push adds an item to the queue, it may block for a while and then returns an error if the queue is full
+func (q *WorkerPoolQueue[T]) Push(data T) error {
+ if q.isBaseQueueDummy() && q.safeHandler != nil {
+ // FIXME: the "immediate" queue is only for testing, but it really causes problems because its behavior is different from a real queue.
+ // Even if tests pass, it doesn't mean that there is no bug in code.
+ if data, ok := q.unmarshal(q.marshal(data)); ok {
+ q.safeHandler(data)
+ }
+ }
+ return q.baseQueue.PushItem(q.ctxRun, q.marshal(data))
+}
+
+// Has only works for unique queues. Keep in mind that this check may not be reliable (due to lacking of proper transaction support)
+// There could be a small chance that duplicate items appear in the queue
+func (q *WorkerPoolQueue[T]) Has(data T) (bool, error) {
+ return q.baseQueue.HasItem(q.ctxRun, q.marshal(data))
+}
+
+func (q *WorkerPoolQueue[T]) Run() {
+ q.doRun()
+}
+
+func (q *WorkerPoolQueue[T]) Cancel() {
+ q.ctxRunCancel()
+}
+
+// ShutdownWait shuts down the queue, waits for all workers to finish their jobs, and pushes the unhandled items back to the base queue
+// It waits for all workers (handlers) to finish their jobs, in case some buggy handlers would hang forever, a reasonable timeout is needed
+func (q *WorkerPoolQueue[T]) ShutdownWait(timeout time.Duration) {
+ q.shutdownTimeout.Store(int64(timeout))
+ q.ctxRunCancel()
+ <-q.shutdownDone
+}
+
+func getNewQueue(t string, cfg *BaseConfig, unique bool) (string, baseQueue, error) {
+ switch t {
+ case "dummy", "immediate":
+ queue, err := newBaseDummy(cfg, unique)
+
+ return t, queue, err
+ case "channel":
+ queue, err := newBaseChannelGeneric(cfg, unique)
+
+ return t, queue, err
+ case "redis":
+ queue, err := newBaseRedisGeneric(cfg, unique, nil)
+
+ return t, queue, err
+ default: // level(leveldb,levelqueue,persistable-channel)
+ queue, err := newBaseLevelQueueGeneric(cfg, unique)
+
+ return "level", queue, err
+ }
+}
+
+func newWorkerPoolQueueForTest[T any](name string, queueSetting setting.QueueSettings, handler HandlerFuncT[T], unique bool) (*WorkerPoolQueue[T], error) {
+ return NewWorkerPoolQueueWithContext(context.Background(), name, queueSetting, handler, unique)
+}
+
+func NewWorkerPoolQueueWithContext[T any](ctx context.Context, name string, queueSetting setting.QueueSettings, handler HandlerFuncT[T], unique bool) (*WorkerPoolQueue[T], error) {
+ if handler == nil {
+ log.Debug("Use dummy queue for %q because handler is nil and caller doesn't want to process the queue items", name)
+ queueSetting.Type = "dummy"
+ }
+
+ var w WorkerPoolQueue[T]
+ var err error
+
+ w.baseConfig = toBaseConfig(name, queueSetting)
+
+ w.baseQueueType, w.baseQueue, err = getNewQueue(queueSetting.Type, w.baseConfig, unique)
+ if err != nil {
+ return nil, err
+ }
+ log.Trace("Created queue %q of type %q", name, w.baseQueueType)
+
+ w.ctxRun, _, w.ctxRunCancel = process.GetManager().AddTypedContext(ctx, "Queue: "+w.GetName(), process.SystemProcessType, false)
+ w.batchChan = make(chan []T)
+ w.flushChan = make(chan flushType)
+ w.shutdownDone = make(chan struct{})
+ w.shutdownTimeout.Store(int64(shutdownDefaultTimeout))
+ w.workerMaxNum = queueSetting.MaxWorkers
+ w.batchLength = queueSetting.BatchLength
+
+ w.origHandler = handler
+ w.safeHandler = func(t ...T) (unhandled []T) {
+ defer func() {
+ err := recover()
+ if err != nil {
+ log.Error("Recovered from panic in queue %q handler: %v\n%s", name, err, log.Stack(2))
+ }
+ }()
+ if w.origHandler != nil {
+ return w.origHandler(t...)
+ }
+ return nil
+ }
+
+ return &w, nil
+}
diff --git a/modules/queue/workerqueue_test.go b/modules/queue/workerqueue_test.go
new file mode 100644
index 00000000..112a16c8
--- /dev/null
+++ b/modules/queue/workerqueue_test.go
@@ -0,0 +1,291 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package queue
+
+import (
+ "bytes"
+ "context"
+ "runtime"
+ "strconv"
+ "sync"
+ "testing"
+ "time"
+
+ "code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/test"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func runWorkerPoolQueue[T any](q *WorkerPoolQueue[T]) func() {
+ go q.Run()
+ return func() {
+ q.ShutdownWait(1 * time.Second)
+ }
+}
+
+func TestWorkerPoolQueueUnhandled(t *testing.T) {
+ oldUnhandledItemRequeueDuration := unhandledItemRequeueDuration.Load()
+ unhandledItemRequeueDuration.Store(0)
+ defer unhandledItemRequeueDuration.Store(oldUnhandledItemRequeueDuration)
+
+ mu := sync.Mutex{}
+
+ test := func(t *testing.T, queueSetting setting.QueueSettings) {
+ queueSetting.Length = 100
+ queueSetting.Type = "channel"
+ queueSetting.Datadir = t.TempDir() + "/test-queue"
+ m := map[int]int{}
+
+ // odds are handled once, evens are handled twice
+ handler := func(items ...int) (unhandled []int) {
+ testRecorder.Record("handle:%v", items)
+ for _, item := range items {
+ mu.Lock()
+ if item%2 == 0 && m[item] == 0 {
+ unhandled = append(unhandled, item)
+ }
+ m[item]++
+ mu.Unlock()
+ }
+ return unhandled
+ }
+
+ q, _ := newWorkerPoolQueueForTest("test-workpoolqueue", queueSetting, handler, false)
+ stop := runWorkerPoolQueue(q)
+ for i := 0; i < queueSetting.Length; i++ {
+ testRecorder.Record("push:%v", i)
+ require.NoError(t, q.Push(i))
+ }
+ require.NoError(t, q.FlushWithContext(context.Background(), 0))
+ stop()
+
+ ok := true
+ for i := 0; i < queueSetting.Length; i++ {
+ if i%2 == 0 {
+ ok = ok && assert.EqualValues(t, 2, m[i], "test %s: item %d", t.Name(), i)
+ } else {
+ ok = ok && assert.EqualValues(t, 1, m[i], "test %s: item %d", t.Name(), i)
+ }
+ }
+ if !ok {
+ t.Logf("m: %v", m)
+ t.Logf("records: %v", testRecorder.Records())
+ }
+ testRecorder.Reset()
+ }
+
+ runCount := 2 // we can run these tests even hundreds times to see its stability
+ t.Run("1/1", func(t *testing.T) {
+ for i := 0; i < runCount; i++ {
+ test(t, setting.QueueSettings{BatchLength: 1, MaxWorkers: 1})
+ }
+ })
+ t.Run("3/1", func(t *testing.T) {
+ for i := 0; i < runCount; i++ {
+ test(t, setting.QueueSettings{BatchLength: 3, MaxWorkers: 1})
+ }
+ })
+ t.Run("4/5", func(t *testing.T) {
+ for i := 0; i < runCount; i++ {
+ test(t, setting.QueueSettings{BatchLength: 4, MaxWorkers: 5})
+ }
+ })
+}
+
+func TestWorkerPoolQueuePersistence(t *testing.T) {
+ runCount := 2 // we can run these tests even hundreds times to see its stability
+ t.Run("1/1", func(t *testing.T) {
+ for i := 0; i < runCount; i++ {
+ testWorkerPoolQueuePersistence(t, setting.QueueSettings{BatchLength: 1, MaxWorkers: 1, Length: 100})
+ }
+ })
+ t.Run("3/1", func(t *testing.T) {
+ for i := 0; i < runCount; i++ {
+ testWorkerPoolQueuePersistence(t, setting.QueueSettings{BatchLength: 3, MaxWorkers: 1, Length: 100})
+ }
+ })
+ t.Run("4/5", func(t *testing.T) {
+ for i := 0; i < runCount; i++ {
+ testWorkerPoolQueuePersistence(t, setting.QueueSettings{BatchLength: 4, MaxWorkers: 5, Length: 100})
+ }
+ })
+}
+
+func testWorkerPoolQueuePersistence(t *testing.T, queueSetting setting.QueueSettings) {
+ testCount := queueSetting.Length
+ queueSetting.Type = "level"
+ queueSetting.Datadir = t.TempDir() + "/test-queue"
+
+ mu := sync.Mutex{}
+
+ var tasksQ1, tasksQ2 []string
+ q1 := func() {
+ startWhenAllReady := make(chan struct{}) // only start data consuming when the "testCount" tasks are all pushed into queue
+ stopAt20Shutdown := make(chan struct{}) // stop and shutdown at the 20th item
+
+ testHandler := func(data ...string) []string {
+ <-startWhenAllReady
+ time.Sleep(10 * time.Millisecond)
+ for _, s := range data {
+ mu.Lock()
+ tasksQ1 = append(tasksQ1, s)
+ mu.Unlock()
+
+ if s == "task-20" {
+ close(stopAt20Shutdown)
+ }
+ }
+ return nil
+ }
+
+ q, _ := newWorkerPoolQueueForTest("pr_patch_checker_test", queueSetting, testHandler, true)
+ stop := runWorkerPoolQueue(q)
+ for i := 0; i < testCount; i++ {
+ _ = q.Push("task-" + strconv.Itoa(i))
+ }
+ close(startWhenAllReady)
+ <-stopAt20Shutdown // it's possible to have more than 20 tasks executed
+ stop()
+ }
+
+ q1() // run some tasks and shutdown at an intermediate point
+
+ time.Sleep(100 * time.Millisecond) // because the handler in q1 has a slight delay, we need to wait for it to finish
+
+ q2 := func() {
+ testHandler := func(data ...string) []string {
+ for _, s := range data {
+ mu.Lock()
+ tasksQ2 = append(tasksQ2, s)
+ mu.Unlock()
+ }
+ return nil
+ }
+
+ q, _ := newWorkerPoolQueueForTest("pr_patch_checker_test", queueSetting, testHandler, true)
+ stop := runWorkerPoolQueue(q)
+ require.NoError(t, q.FlushWithContext(context.Background(), 0))
+ stop()
+ }
+
+ q2() // restart the queue to continue to execute the tasks in it
+
+ assert.NotZero(t, len(tasksQ1))
+ assert.NotZero(t, len(tasksQ2))
+ assert.EqualValues(t, testCount, len(tasksQ1)+len(tasksQ2))
+}
+
+func TestWorkerPoolQueueActiveWorkers(t *testing.T) {
+ defer test.MockVariableValue(&workerIdleDuration, 300*time.Millisecond)()
+
+ handler := func(items ...int) (unhandled []int) {
+ time.Sleep(100 * time.Millisecond)
+ return nil
+ }
+
+ q, _ := newWorkerPoolQueueForTest("test-workpoolqueue", setting.QueueSettings{Type: "channel", BatchLength: 1, MaxWorkers: 1, Length: 100}, handler, false)
+ stop := runWorkerPoolQueue(q)
+ for i := 0; i < 5; i++ {
+ require.NoError(t, q.Push(i))
+ }
+
+ time.Sleep(50 * time.Millisecond)
+ assert.EqualValues(t, 1, q.GetWorkerNumber())
+ assert.EqualValues(t, 1, q.GetWorkerActiveNumber())
+ time.Sleep(500 * time.Millisecond)
+ assert.EqualValues(t, 1, q.GetWorkerNumber())
+ assert.EqualValues(t, 0, q.GetWorkerActiveNumber())
+ time.Sleep(workerIdleDuration)
+ assert.EqualValues(t, 1, q.GetWorkerNumber()) // there is at least one worker after the queue begins working
+ stop()
+
+ q, _ = newWorkerPoolQueueForTest("test-workpoolqueue", setting.QueueSettings{Type: "channel", BatchLength: 1, MaxWorkers: 3, Length: 100}, handler, false)
+ stop = runWorkerPoolQueue(q)
+ for i := 0; i < 15; i++ {
+ require.NoError(t, q.Push(i))
+ }
+
+ time.Sleep(50 * time.Millisecond)
+ assert.EqualValues(t, 3, q.GetWorkerNumber())
+ assert.EqualValues(t, 3, q.GetWorkerActiveNumber())
+ time.Sleep(500 * time.Millisecond)
+ assert.EqualValues(t, 3, q.GetWorkerNumber())
+ assert.EqualValues(t, 0, q.GetWorkerActiveNumber())
+ time.Sleep(workerIdleDuration)
+ assert.EqualValues(t, 1, q.GetWorkerNumber()) // there is at least one worker after the queue begins working
+ stop()
+}
+
+func TestWorkerPoolQueueShutdown(t *testing.T) {
+ oldUnhandledItemRequeueDuration := unhandledItemRequeueDuration.Load()
+ unhandledItemRequeueDuration.Store(int64(100 * time.Millisecond))
+ defer unhandledItemRequeueDuration.Store(oldUnhandledItemRequeueDuration)
+
+ // simulate a slow handler, it doesn't handle any item (all items will be pushed back to the queue)
+ handlerCalled := make(chan struct{})
+ handler := func(items ...int) (unhandled []int) {
+ if items[0] == 0 {
+ close(handlerCalled)
+ }
+ time.Sleep(400 * time.Millisecond)
+ return items
+ }
+
+ qs := setting.QueueSettings{Type: "level", Datadir: t.TempDir() + "/queue", BatchLength: 3, MaxWorkers: 4, Length: 20}
+ q, _ := newWorkerPoolQueueForTest("test-workpoolqueue", qs, handler, false)
+ stop := runWorkerPoolQueue(q)
+ for i := 0; i < qs.Length; i++ {
+ require.NoError(t, q.Push(i))
+ }
+ <-handlerCalled
+ time.Sleep(200 * time.Millisecond) // wait for a while to make sure all workers are active
+ assert.EqualValues(t, 4, q.GetWorkerActiveNumber())
+ stop() // stop triggers shutdown
+ assert.EqualValues(t, 0, q.GetWorkerActiveNumber())
+
+ // no item was ever handled, so we still get all of them again
+ q, _ = newWorkerPoolQueueForTest("test-workpoolqueue", qs, handler, false)
+ assert.EqualValues(t, 20, q.GetQueueItemNumber())
+}
+
+func TestWorkerPoolQueueWorkerIdleReset(t *testing.T) {
+ defer test.MockVariableValue(&workerIdleDuration, 1*time.Millisecond)()
+
+ chGoroutineIDs := make(chan string)
+ handler := func(items ...int) (unhandled []int) {
+ time.Sleep(10 * workerIdleDuration)
+ chGoroutineIDs <- goroutineID() // hacky way to identify a worker
+ return nil
+ }
+
+ q, _ := newWorkerPoolQueueForTest("test-workpoolqueue", setting.QueueSettings{Type: "channel", BatchLength: 1, MaxWorkers: 2, Length: 100}, handler, false)
+ stop := runWorkerPoolQueue(q)
+
+ const workloadSize = 12
+ for i := 0; i < workloadSize; i++ {
+ require.NoError(t, q.Push(i))
+ }
+
+ workerIDs := make(map[string]struct{})
+ for i := 0; i < workloadSize; i++ {
+ c := <-chGoroutineIDs
+ workerIDs[c] = struct{}{}
+ t.Logf("%d workers: overall=%d current=%d", i, len(workerIDs), q.GetWorkerNumber())
+
+ // ensure that no more than qs.MaxWorkers workers are created over the whole lifetime of the queue
+ // (otherwise it would mean that some workers got shut down while the queue was full)
+ require.LessOrEqual(t, len(workerIDs), q.GetWorkerMaxNumber())
+ }
+ close(chGoroutineIDs)
+
+ stop()
+}
+
+func goroutineID() string {
+ var buffer [31]byte
+ _ = runtime.Stack(buffer[:], false)
+ return string(bytes.Fields(buffer[10:])[0])
+}