SelectorInterface.php 701 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Elasticsearch\ConnectionPool\Selectors;
  3. /**
  4. * Class RandomSelector
  5. *
  6. * @category Elasticsearch
  7. * @package Elasticsearch\Connections\Selectors
  8. * @author Zachary Tong <zach@elastic.co>
  9. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
  10. * @link http://elastic.co
  11. */
  12. interface SelectorInterface
  13. {
  14. /**
  15. * Perform logic to select a single ConnectionInterface instance from the array provided
  16. *
  17. * @param \Elasticsearch\Connections\ConnectionInterface[] $connections an array of ConnectionInterface instances to choose from
  18. *
  19. * @return \Elasticsearch\Connections\ConnectionInterface
  20. */
  21. public function select($connections);
  22. }