Grpc-XS

 view release on metacpan or  search on metacpan

t/10-base_stub.t  view on Meta::CPAN

#!perl -w
use strict;
use Data::Dumper;
use Test::More;

plan tests => 2;

use_ok("Grpc::Client::BaseStub");
use_ok("Grpc::XS::ChannelCredentials");

my $credentials = Grpc::XS::ChannelCredentials::createInsecure();
print STDERR Dumper($credentials);

my $stub = new Grpc::Client::BaseStub(
                'localhost:50051',
                credentials => $credentials,
                timeout => 1000000 );
print STDERR Dumper($stub);

my $unmarshall = sub { return $_; };
my $result = $stub->_simpleRequest(
                   method      => "/test/timeout",
                   deserialize => $unmarshall,
                   argument    => "testcall",
                   metadata    => undef,
                   options     => undef );
print STDERR Dumper($result);



( run in 0.842 second using v1.01-cache-2.11-cpan-99c4e6809bf )