Consul::API::Status - System status API
use Consul; my $status = Consul->status; my $peers = $status->peers; say "@$peers";
The system status API is used to get information about the status of the Consul cluster.
This API is fully documented at https://www.consul.io/docs/agent/http/status.html.
$status->leader;
Returns the address of the Raft leader for the datacenter in which the agent is running. Returns an IP:port string.
$status->peers;
Retrieves the Raft peers for the datacenter in which the agent is running. Returns an arrayref of IP:port strings.
L<Consul>
To install Consul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Consul
CPAN shell
perl -MCPAN -e shell install Consul
For more information on module installation, please visit the detailed CPAN module installation guide.