1
0
mirror of https://github.com/redis/go-redis.git synced 2025-12-02 06:22:31 +03:00
This commit is contained in:
Nedyalko Dyakov
2025-10-31 13:04:46 +02:00
parent 9eaeea1347
commit f672885808
12 changed files with 509 additions and 529 deletions

View File

@@ -1020,6 +1020,7 @@ type ClusterClient struct {
nodes *clusterNodes
state *clusterStateHolder
cmdsInfoCache *cmdsInfoCache
autopipeliner *AutoPipeliner
cmdable
hooksMixin
}
@@ -1051,6 +1052,14 @@ func NewClusterClient(opt *ClusterOptions) *ClusterClient {
return c
}
func (c *ClusterClient) WithAutoPipeline() AutoPipelinedClient {
if c.autopipeliner != nil && !c.autopipeliner.closed.Load() {
return c.autopipeliner
}
c.autopipeliner = c.AutoPipeline()
return c.autopipeliner
}
// Options returns read-only Options that were used to create the client.
func (c *ClusterClient) Options() *ClusterOptions {
return c.opt