parallel fetching of multiple hosts
[scpubgit/System-Introspector.git] / lib / System / Introspector / Gatherer / Bridge.pm
CommitLineData
a5e1e1c6 1package System::Introspector::Gatherer::Bridge;
2use Object::Remote;
3use Object::Remote::Future;
4use Moo;
5
6has remote_spec => (is => 'ro', required => 1);
7has remote_class => (is => 'ro', required => 1);
949dba9c 8has remote_args => (is => 'ro', required => 1);
a5e1e1c6 9has remote => (is => 'lazy');
10
11sub _build_remote {
12 my ($self) = @_;
949dba9c 13 return $self->remote_class
14 ->new::on($self->remote_spec, $self->remote_args);
a5e1e1c6 15}
16
17sub gather { (shift)->remote->gather(@_) }
18
191;