You are here

function _acquia_purge_get_balancers in Acquia Purge 6

Same name and namespace in other branches
  1. 7 acquia_purge.deprecated.inc \_acquia_purge_get_balancers()

Get a list of load balancer IP addresses in front of this Acquia Cloud site.

@warning Please note that the returned IP addresses are internal addresses.

@returns Array with string values pointing to every Acquia Cloud load balancer.

4 calls to _acquia_purge_get_balancers()
_acquia_purge_are_we_on_acquiacloud in ./acquia_purge.module
Determine whether we are running on Acquia Cloud or not.
_acquia_purge_get_diagnosis_balancers in ./acquia_purge.diagnostics.inc
Test the amount of load balancers configured.
_acquia_purge_queue_pop in ./acquia_purge.module
Queue manager: pop X amount of items from the queue.
_acquia_purge_queue_processpurge in ./acquia_purge.module
Queue manager: process a single path (on all domains and balancers).

File

./acquia_purge.module, line 320
Acquia Purge, Top-notch Varnish purging on Acquia Cloud!

Code

function _acquia_purge_get_balancers() {
  static $balancers;

  // Cache the results statically, preventing multiple lookups during runtime.
  if (is_null($balancers)) {
    $balancers = array();
    foreach (variable_get('reverse_proxies', array()) as $ip_address) {
      $balancers[] = $ip_address;
    }
  }
  return $balancers;
}