6 #ifndef IROHA_GENERIC_CLIENT_FACTORY_HPP 7 #define IROHA_GENERIC_CLIENT_FACTORY_HPP 28 template <
typename Service>
32 using iroha::expected::operator|;
33 return channel_provider_->getChannel(Service::service_full_name(), peer)
35 -> std::unique_ptr<typename Service::StubInterface> {
36 return Service::NewStub(channel);
41 std::unique_ptr<ChannelProvider> channel_provider_;
Definition: result_fwd.hpp:27
Definition: block_query.hpp:15
iroha::expected::Result< std::unique_ptr< typename Service::StubInterface >, std::string > createClient(const shared_model::interface::Peer &peer) const
Definition: generic_client_factory.hpp:31
Definition: generic_client_factory.hpp:17
GenericClientFactory(std::unique_ptr< ChannelProvider > channel_provider)
Definition: generic_client_factory.cpp:10