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

#include "mst_transport_grpc.hpp"

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

Public Types

using SenderFactory = std::function< std::unique_ptr< transport::MstTransportGrpc::StubInterface >(const shared_model::interface::Peer &)>
 
using TransportFactoryType = shared_model::interface::AbstractTransportFactory< shared_model::interface::Transaction, iroha::protocol::Transaction >
 

Public Member Functions

 MstTransportGrpc (std::shared_ptr< network::AsyncGrpcClient< google::protobuf::Empty >> async_call, std::shared_ptr< TransportFactoryType > transaction_factory, std::shared_ptr< shared_model::interface::TransactionBatchParser > batch_parser, std::shared_ptr< shared_model::interface::TransactionBatchFactory > transaction_batch_factory, std::shared_ptr< iroha::ametsuchi::TxPresenceCache > tx_presence_cache, std::shared_ptr< Completer > mst_completer, shared_model::crypto::PublicKey my_key, logger::LoggerPtr mst_state_logger, logger::LoggerPtr log, boost::optional< SenderFactory >=boost::none)
 
grpc::Status SendState (::grpc::ServerContext *context, const ::iroha::network::transport::MstState *request,::google::protobuf::Empty *response) override
 
void subscribe (std::shared_ptr< MstTransportNotification > notification) override
 
void sendState (const shared_model::interface::Peer &to, ConstRefState providing_state) override
 
- Public Member Functions inherited from iroha::network::MstTransport
virtual void sendState (const shared_model::interface::Peer &to, const MstState &providing_state)=0
 
virtual ~MstTransport ()=default
 

Member Typedef Documentation

using iroha::network::MstTransportGrpc::SenderFactory = std::function< std::unique_ptr<transport::MstTransportGrpc::StubInterface>( const shared_model::interface::Peer &)>

Constructor & Destructor Documentation

MstTransportGrpc::MstTransportGrpc ( std::shared_ptr< network::AsyncGrpcClient< google::protobuf::Empty >>  async_call,
std::shared_ptr< TransportFactoryType transaction_factory,
std::shared_ptr< shared_model::interface::TransactionBatchParser batch_parser,
std::shared_ptr< shared_model::interface::TransactionBatchFactory transaction_batch_factory,
std::shared_ptr< iroha::ametsuchi::TxPresenceCache tx_presence_cache,
std::shared_ptr< Completer mst_completer,
shared_model::crypto::PublicKey  my_key,
logger::LoggerPtr  mst_state_logger,
logger::LoggerPtr  log,
boost::optional< SenderFactory = boost::none 
)

Member Function Documentation

grpc::Status MstTransportGrpc::SendState ( ::grpc::ServerContext *  context,
const ::iroha::network::transport::MstState *  request,
::google::protobuf::Empty *  response 
)
override

Server part of grpc SendState method call

Parameters
context- server context with information about call
request- received new MstState object
response- buffer for response data, not used
Returns
grpc::Status (always OK)

Here is the call graph for this function:

void MstTransportGrpc::sendState ( const shared_model::interface::Peer to,
ConstRefState  providing_state 
)
override

Here is the call graph for this function:

void MstTransportGrpc::subscribe ( std::shared_ptr< MstTransportNotification notification)
overridevirtual

Subscribe object for receiving notifications

Parameters
notification- object that will be notified on updates

Implements iroha::network::MstTransport.


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