mirror of
				https://github.com/redis/go-redis.git
				synced 2025-11-04 02:33:24 +03:00 
			
		
		
		
	Merge branch 'v5'
This commit is contained in:
		@@ -374,6 +374,11 @@ func NewClusterClient(opt *ClusterOptions) *ClusterClient {
 | 
				
			|||||||
	return c
 | 
						return c
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Options returns read-only Options that were used to create the client.
 | 
				
			||||||
 | 
					func (c *ClusterClient) Options() *ClusterOptions {
 | 
				
			||||||
 | 
						return c.opt
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *ClusterClient) state() *clusterState {
 | 
					func (c *ClusterClient) state() *clusterState {
 | 
				
			||||||
	v := c._state.Load()
 | 
						v := c._state.Load()
 | 
				
			||||||
	if v != nil {
 | 
						if v != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								redis.go
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								redis.go
									
									
									
									
									
								
							@@ -21,6 +21,11 @@ func (c *baseClient) String() string {
 | 
				
			|||||||
	return fmt.Sprintf("Redis<%s db:%d>", c.getAddr(), c.opt.DB)
 | 
						return fmt.Sprintf("Redis<%s db:%d>", c.getAddr(), c.opt.DB)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Options returns read-only Options that were used to create the client.
 | 
				
			||||||
 | 
					func (c *baseClient) Options() *Options {
 | 
				
			||||||
 | 
						return c.opt
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *baseClient) conn() (*pool.Conn, bool, error) {
 | 
					func (c *baseClient) conn() (*pool.Conn, bool, error) {
 | 
				
			||||||
	cn, isNew, err := c.connPool.Get()
 | 
						cn, isNew, err := c.connPool.Get()
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								ring.go
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								ring.go
									
									
									
									
									
								
							@@ -158,6 +158,11 @@ func NewRing(opt *RingOptions) *Ring {
 | 
				
			|||||||
	return ring
 | 
						return ring
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Options returns read-only Options that were used to create the client.
 | 
				
			||||||
 | 
					func (c *Ring) Options() *RingOptions {
 | 
				
			||||||
 | 
						return c.opt
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// PoolStats returns accumulated connection pool stats.
 | 
					// PoolStats returns accumulated connection pool stats.
 | 
				
			||||||
func (c *Ring) PoolStats() *PoolStats {
 | 
					func (c *Ring) PoolStats() *PoolStats {
 | 
				
			||||||
	var acc PoolStats
 | 
						var acc PoolStats
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user