\PG\MSF\ProxyRedisProxyMasterSlave

Class RedisProxyMasterSlave

Summary

Methods
Properties
Constants
__construct()
startCheck()
handle()
check()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$name
$pools
$master
$slaves
$goodPools
$readOperation
N/A

Properties

$name

$name : string

Type

string — 代理标识,它代表一个Redis集群

$pools

$pools : array

Type

array — 连接池列表,数字索引的连接池名称列表

$master

$master : string

Type

string — Redis集群中主节点的连接池名称

$slaves

$slaves : array

Type

array — Redis集群中从节点的连接池名称列表

$goodPools

$goodPools : array

Type

array — 通过探活检测的连接池列表

$readOperation

$readOperation : array

Type

array — 读的Redis指令列表

Methods

__construct()

__construct(string  $name, array  $config) 

RedisProxyMasterSlave constructor.

Parameters

string $name

代理标识

array $config

配置对象

startCheck()

startCheck() : boolean

启动时检测Redis集群状态

Returns

boolean

handle()

handle(string  $method, array  $arguments) : mixed

发送异步Redis请求

Parameters

string $method

Redis指令

array $arguments

Redis指令参数

Returns

mixed

check()

check() : boolean

定时检测

Returns

boolean