src/Connection/Aggregate/MasterSlaveReplication.php
public function discover()
    {
        if (!$this->connectionFactory) {
            throw new ClientException('Discovery requires a connection factory');
        }

        RETRY_FETCH: {
            try {
                if ($connection = $this->getMaster()) {
                    $this->discoverFromMaster($connection, $this->connectionFactory);
                } elseif ($connection = $this->pickSlave()) {
                    $this->discoverFromSlave($connection, $this->connectionFactory);
                } else {
                    throw new ClientException('No connection available for discovery');
                }
            } catch (ConnectionException $exception) {
                $this->remove($connection);
                goto RETRY_FETCH;
            }
        }
    }
public function discover()
    {
        if (!$this->connectionFactory) {
            throw new ClientException('Discovery requires a connection factory');
        }

        RETRY_FETCH: {
            try {
                if ($connection = $this->getMaster()) {
                    $this->discoverFromMaster($connection, $this->connectionFactory);
                } elseif ($connection = $this->pickSlave()) {
                    $this->discoverFromSlave($connection, $this->connectionFactory);
                } else {
                    throw new ClientException('No connection available for discovery');
                }
            } catch (ConnectionException $exception) {
                $this->remove($connection);
                goto RETRY_FETCH;
            }
        }
    }
public function discover ( ) { if ( ! $ this -> connectionFactory ) { throw new ClientException ( 'Discovery requires a connection factory' ) ; } RETRY_FETCH : { try { if ( $ connection = $ this -> getMaster ( ) ) { $ this -> discoverFromMaster ( $ connection , $ this -> connectionFactory ) ; } elseif ( $ connection = $ this -> pickSlave ( ) ) { $ this -> discoverFromSlave ( $ connection , $ this -> connectionFactory ) ; } else { throw new ClientException ( 'No connection available for discovery' ) ; } } catch ( ConnectionException $ exception ) { $ this -> remove ( $ connection ) ; goto RETRY_FETCH ; } } }
Fetches the replication configuration from one of the servers.
Fetches the replication configuration from one of the servers .