Arango-Tango
view release on metacpan or search on metacpan
0.021 2026-11-16
- API.pm
- fixed: percent-encode path placeholder values and the database
name, so keys such as 'a/b' or 'x?y' can no longer change the
target endpoint (#36)
- fixed: '_url_parameters' was not removed from the request options
(typo in the list of internal keys), so it could leak into the
query string or the JSON body (#16)
- fixed: the 'Missing <argument>' error named the wrong argument
(off by one, and counting optional arguments), and was stored in
the sub-object instead of the Arango::Tango instance, so it could
not be read with $collection->error or $database->error (#18)
- fixed: parsing of optional arguments no longer clobbers the
package global $a (#18)
- modified: GET query values are now encoded with
- Clear user access level (clear_access_level)
- Update user data (update_user)
- Replace user data (replace_user)
- Collection.pm
- Obtain user access level (get_access_level)
- Set user access level (set_access_level)
- Clear user access level (clear_access_level)
0.008 2019-04-26
- User admin routes (list_users, user, user_databases)
- Cluster metadata routes (server_role/cluster_endpoints)
- Server routes (engine)
0.007 2019-04-24
- Cluster metadata routes (server_id)
- Metadata routes (target_version, log, log_level, server_availability, server_mode)
- Be creative. New module name: Arango-Tango
0.006 2019-04-22
- User routes (create/delete)
- Metadata routes (status/time/statistics and statistics_description)
lib/Arango/Tango.pm view on Meta::CPAN
use strict;
use warnings;
use HTTP::Tiny;
use JSON;
use MIME::Base64 3.11 'encode_base64url';
BEGIN {
Arango::Tango::API::_install_methods "Arango::Tango" => {
engine => { rest => [ get => '_api/engine' ] },
cluster_endpoints => { rest => [ get => '_api/cluster/endpoints' ] },
server_id => { rest => [ get => '_admin/server/id' ] },
status => { rest => [ get => '_admin/status' ] },
time => { rest => [ get => '_admin/time' ] },
statistics => { rest => [ get => '_admin/statistics' ] },
statistics_description => { rest => [ get => '_admin/statistics-description' ] },
target_version => { rest => [ get => '_admin/database/target-version' ] },
log_level => { rest => [ get => '_admin/log/level' ] },
server_role => { rest => [ get => '_admin/server/role' ] },
server_mode => { rest => [ get => '_admin/server/mode' ] },
server_availability => { rest => [ get => '_admin/server/availability' ] },
lib/Arango/Tango.pm view on Meta::CPAN
my $mode = $db->server_mode();
Return mode information about a server.
=item C<server_role>
my $mode = $db->server_role();
Returns the role of a server in a cluster.
=item C<cluster_endpoints>
my $endpoints = $db->cluster_endpoints;
Returns an object with an attribute endpoints, which contains an array
of objects, which each have the attribute endpoint, whose value is a
string with the endpoint description. There is an entry for each
coordinator in the cluster. This method only works on coordinators in
cluster mode. In case of an error the error attribute is set to true.
=item C<version>
my $version_info = $db->version;
my $detailed_info = $db->version( 'details' => 1 );
Returns a hash reference with basic server info. Detailed information can be requested with the C<details> option.
t/01-database.t view on Meta::CPAN
ok exists($mode->{mode});
## --- Cluster mode
my $id = eval { $arango->server_id };
SKIP: {
skip "Not running in cluster mode" if $arango->error =~ /Internal Server Error/;
is ref($id), "HASH"; ## not sure, until some cluster user can confirm me
my $eps = $arango->cluster_endpoints;
ok exists($eps->{endpoints}); ## not sure, until some cluster user can confirm me
}
my $role = $arango->server_role;
ok !$role->{error};
### engine
my $engine = $arango->engine;
like $engine->{name}, qr/^(mmfiles|rocksdb)$/;
( run in 1.496 second using v1.01-cache-2.11-cpan-eb134014566 )