| 1 | <?php |
||
| 6 | class Cluster { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @var array |
||
| 10 | */ |
||
| 11 | private $nodes; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param array $nodes |
||
| 15 | */ |
||
| 16 | public function __construct(array $nodes = []) { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param string $host |
||
| 22 | */ |
||
| 23 | public function appendNode($host) { |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return Node |
||
| 29 | * @throws Exception\ClusterException |
||
| 30 | */ |
||
| 31 | public function getRandomNode() { |
||
| 49 | } |