NAME
DR::Tnt::Client::AE - AnyEvent (async) driver for tarantool
SYNOPSIS
use DR::Tnt;
my $tnt = tarantool
host => $host,
port => $port,
user => $user,
password => $password,
lua_dir => $lua_dir,
hashify_tuples => 1,
driver => 'async'
;
# the same
use DR::Tnt::Client::AE;
my $tnt = DR::Tnt::Client::AE->new(
host => $host,
port => $port,
user => $user,
password => $password,
lua_dir => $lua_dir,
hashify_tuples => 1,
driver => 'async'
);
$tnt->ping(sub {
my $res = shift;
if ($res) {
say "ping ok";
} else {
say "can not ping: %s: %s", @{ $tnt->last_error };
}
});
$tnt->select($space, 'index', 'key', sub {
my ($list) = @_;
if ($list) {
} else {
say "can not select: %s: %s", @{ $tnt->last_error };
}
});