godis

package module
v0.0.0-...-7bb2647 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2018 License: MIT Imports: 9 Imported by: 0

README

godis

#Godis - Golang client for codis

Build Status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoundRobinPool

type RoundRobinPool struct {
	// contains filtered or unexported fields
}

RoundRobinPool is a round-robin redis client pool for connecting multiple codis proxies based on zookeeper-go and redis-go.

func NewRoundRobinPool

func NewRoundRobinPool(zkConn *zk.Conn, zkProxyDir string, options redis.Options) (*RoundRobinPool, error)

NewRoundRobinPool return a round-robin redis client pool specified by zk client and redis options.

func (*RoundRobinPool) Close

func (p *RoundRobinPool) Close()

Close closes the pool, releasing all resources except zookeeper client.

func (*RoundRobinPool) GetClient

func (p *RoundRobinPool) GetClient() *redis.Client

GetClient can get a redis client from pool with round-robin policy. It's safe for concurrent use by multiple goroutines.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL