Documentation ¶
Index ¶
- Variables
- func CloneDefaultClient() *http.Client
- func CloneDefaultTransport() *http.Transport
- func GetProxyClient(addr string) *http.Client
- func GetRedisConnPool(addr, password string, initDb, maxActive int) (pool *redis.Pool)
- func InitRedis(addr, password string, initDB, maxActive int) *redis.Pool
- type Logger
- type Proxy
- type ProxyConn
- type RedisAdapterClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultClient *http.Client // 30s timeout forbidden redirect DefaultTransport *http.Transport )
View Source
var ( RedisPool *redis.Pool ErrNil = redis.ErrNil )
Functions ¶
func CloneDefaultClient ¶
func CloneDefaultTransport ¶
func GetProxyClient ¶
func GetRedisConnPool ¶
得到一个redis连接池
Types ¶
type Logger ¶
type Logger interface { Print(...interface{}) Printf(string, ...interface{}) Println(...interface{}) }
type Proxy ¶
type ProxyConn ¶
func (*ProxyConn) RPushProxy ¶
type RedisAdapterClient ¶
type RedisAdapterClient struct { Client *http.Client Name string // contains filtered or unexported fields }
func NewRedisAdapter ¶
func NewRedisAdapter(name string, logger Logger) (*RedisAdapterClient, error)
func (*RedisAdapterClient) Reset ¶
func (rac *RedisAdapterClient) Reset() error
Click to show internal directories.
Click to hide internal directories.