NAME

OpenSearch::Cluster::Health - OpenSearch Cluster Health API

SYNOPSIS

use strict;
use warnings;
use OpenSearch;

my $opensearch = OpenSearch->new(
  user => 'admin',
  pass => 'admin',
  hosts => ['http://localhost:9200'],
  secure => 0,
  allow_insecure => 1,
);

my $cluster = $opensearch->cluster;

my $stats = $cluster->stats;

my $response = $stats->get;

DESCRIPTION

This is the Module for the OpenSearch Cluster Stats API.

ATTRIBUTES (optional)

For a detailed description of these attributes, see the OpenSearch documentation. Attrubutes can be chained like:

my $response = $object
  ->attribute_1(1)
  ->attribute_2('string')

THERE ARE NONE FOR STATS

METHODS

get

returns the results of the query as a hash reference.

my $response = $health->get;

get_p

returns the results of the query as a promise.

$health->get_p->then(sub {
  my $response = shift;
});

LICENSE

Copyright (C) localh0rst.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

localh0rst <git@fail.ninja>