The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Consul::API::Status - System status API

SYNOPSIS

    use Consul;
    my $status = Consul->status;
    my $peers = $status->peers;
    say "@$peers";

DESCRIPTION

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.

METHODS

leader

    $status->leader;

Returns the address of the Raft leader for the datacenter in which the agent is running. Returns an IP:port string.

peers

    $status->peers;

Retrieves the Raft peers for the datacenter in which the agent is running. Returns an arrayref of IP:port strings.

SEE ALSO

    L<Consul>