You are here

public function Cluster::checkClusterStatus in Elasticsearch Connector 8

Check if the cluster status is OK.

Return value

bool

File

src/Entity/Cluster.php, line 236
Contains \Drupal\elasticsearch_connector\Entity\Cluster.

Class

Cluster
Defines the search server configuration entity.

Namespace

Drupal\elasticsearch_connector\Entity

Code

public function checkClusterStatus() {

  // TODO: Check if we can initialize the client in __construct().
  $client = self::getClientInstance($this);
  return $client
    ->clusterIsOk();
}