hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::network::ChannelPool Class Reference

#include "channel_pool.hpp"

Inheritance diagram for iroha::network::ChannelPool:
Inheritance graph
Collaboration diagram for iroha::network::ChannelPool:
Collaboration graph

Classes

class  Impl
 

Public Member Functions

 ChannelPool (std::unique_ptr< ChannelProvider > channel_provider)
 
 ~ChannelPool ()
 
iroha::expected::Result< std::shared_ptr< grpc::Channel >, std::string > getChannel (const std::string &service_full_name, const shared_model::interface::Peer &peer) override
 
- Public Member Functions inherited from iroha::network::ChannelProvider
virtual ~ChannelProvider ()=default
 

Constructor & Destructor Documentation

◆ ChannelPool()

ChannelPool::ChannelPool ( std::unique_ptr< ChannelProvider channel_provider)
explicit
Parameters
channel_provider- Factory that is used to create missing channels.
Here is the call graph for this function:

◆ ~ChannelPool()

ChannelPool::~ChannelPool ( )
default
Here is the caller graph for this function:

Member Function Documentation

◆ getChannel()

Result< std::shared_ptr< grpc::Channel >, std::string > ChannelPool::getChannel ( const std::string &  service_full_name,
const shared_model::interface::Peer peer 
)
overridevirtual

Get or create a grpc::Channel (from a pool of channels)

Parameters
service_full_namethe full name of grpc service, e.g. iroha.consensus.yac.proto.Yac
peerthe target peer
Returns
std::shared_ptr<grpc::Channel> to that address

Implements iroha::network::ChannelProvider.


The documentation for this class was generated from the following files: