mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 19:10:10 +00:00
36edb24b56
For applications wishing to use perl to script to confluent, this library facilitates that.
15 lines
304 B
Perl
15 lines
304 B
Perl
use strict;
|
|
use warnings;
|
|
|
|
use Confluent::Client;
|
|
|
|
my $client = Confluent::Client->new();
|
|
$client->read('/nodes/n1/power/state');
|
|
my $data = $client->next_result();
|
|
while ($data) {
|
|
if (exists $data->{state}) {
|
|
print $data->{state}->{value} . "\n";
|
|
}
|
|
$data = $client->next_result();
|
|
}
|