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

#include "command_service_transport_grpc.hpp"

Inheritance diagram for iroha::torii::CommandServiceTransportGrpc:
Inheritance graph
Collaboration diagram for iroha::torii::CommandServiceTransportGrpc:
Collaboration graph

Classes

struct  ConsensusGateEvent
 

Public Types

using TransportFactoryType = shared_model::interface::AbstractTransportFactory< shared_model::interface::Transaction, iroha::protocol::Transaction >
 

Public Member Functions

 CommandServiceTransportGrpc (std::shared_ptr< CommandService > command_service, std::shared_ptr< iroha::torii::StatusBus > status_bus, std::shared_ptr< shared_model::interface::TxStatusFactory > status_factory, 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, rxcpp::observable< ConsensusGateEvent > consensus_gate_objects, int maximum_rounds_without_update, logger::Logger log=logger::log("CommandServiceTransportGrpc"))
 
grpc::Status Torii (grpc::ServerContext *context, const iroha::protocol::Transaction *request, google::protobuf::Empty *response) override
 
grpc::Status ListTorii (grpc::ServerContext *context, const iroha::protocol::TxList *request, google::protobuf::Empty *response) override
 
grpc::Status Status (grpc::ServerContext *context, const iroha::protocol::TxStatusRequest *request, iroha::protocol::ToriiResponse *response) override
 
grpc::Status StatusStream (grpc::ServerContext *context, const iroha::protocol::TxStatusRequest *request, grpc::ServerWriter< iroha::protocol::ToriiResponse > *response_writer) override
 

Member Typedef Documentation

Constructor & Destructor Documentation

iroha::torii::CommandServiceTransportGrpc::CommandServiceTransportGrpc ( std::shared_ptr< CommandService command_service,
std::shared_ptr< iroha::torii::StatusBus status_bus,
std::shared_ptr< shared_model::interface::TxStatusFactory status_factory,
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,
rxcpp::observable< ConsensusGateEvent consensus_gate_objects,
int  maximum_rounds_without_update,
logger::Logger  log = logger::log("CommandServiceTransportGrpc") 
)

Creates a new instance of CommandServiceTransportGrpc

Parameters
command_service- to delegate logic work
status_busis a common notifier for tx statuses
status_factory- factory of statuses
transaction_factory- factory of transactions
batch_parser- parses of batches
transaction_batch_factory- factory of batchesof transactions
consensus_gate_objects- events from consensus gate
maximum_rounds_without_update- defines how long tx status stream is kept alive when no new tx statuses appear
logto print progress

Member Function Documentation

grpc::Status iroha::torii::CommandServiceTransportGrpc::ListTorii ( grpc::ServerContext *  context,
const iroha::protocol::TxList *  request,
google::protobuf::Empty *  response 
)
override

Torii call for transactions list via grpc

Parameters
context- call context (see grpc docs for details)
request- list of transactions received
response- no actual response (grpc stub for empty answer)
Returns
status

Here is the call graph for this function:

Here is the caller graph for this function:

grpc::Status iroha::torii::CommandServiceTransportGrpc::Status ( grpc::ServerContext *  context,
const iroha::protocol::TxStatusRequest *  request,
iroha::protocol::ToriiResponse *  response 
)
override

Status call via grpc

Parameters
context- call context
request- TxStatusRequest object which identifies transaction uniquely
response- ToriiResponse which contains a current state of requested transaction
Returns
status

Here is the call graph for this function:

grpc::Status iroha::torii::CommandServiceTransportGrpc::StatusStream ( grpc::ServerContext *  context,
const iroha::protocol::TxStatusRequest *  request,
grpc::ServerWriter< iroha::protocol::ToriiResponse > *  response_writer 
)
override

StatusStream call via grpc

Parameters
context- call context
request- TxStatusRequest object which identifies transaction uniquely
response_writer- grpc::ServerWriter which can repeatedly send transaction statuses back to the client
Returns
status

Here is the call graph for this function:

grpc::Status iroha::torii::CommandServiceTransportGrpc::Torii ( grpc::ServerContext *  context,
const iroha::protocol::Transaction *  request,
google::protobuf::Empty *  response 
)
override

Torii call via grpc

Parameters
context- call context (see grpc docs for details)
request- transaction received
response- no actual response (grpc stub for empty answer)
Returns
status

Here is the call graph for this function:


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