1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-26 19:21:03 +03:00

Add ability to read client options

This commit is contained in:
Vladimir Mihailenco
2017-03-20 12:15:21 +02:00
parent a16aeec10f
commit ab1e8de9ea
3 changed files with 15 additions and 0 deletions

View File

@ -21,6 +21,11 @@ func (c *baseClient) String() string {
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) {
cn, isNew, err := c.connPool.Get()
if err != nil {