Class: Fabric::Orderer
- Inherits:
-
ClientStub
- Object
- ClientStub
- Fabric::Orderer
- Defined in:
- lib/fabric/orderer.rb
Constant Summary
Constants inherited from ClientStub
ClientStub::VALID_OPTIONS_KEYS
Instance Attribute Summary
Attributes inherited from ClientStub
#creds, #host, #logger, #options
Instance Method Summary collapse
Methods inherited from ClientStub
Constructor Details
This class inherits a constructor from Fabric::ClientStub
Instance Method Details
#client ⇒ Object
5 6 7 |
# File 'lib/fabric/orderer.rb', line 5 def client @client ||= ::Orderer::AtomicBroadcast::Stub.new host, creds, end |
#send_broadcast(envelope) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fabric/orderer.rb', line 9 def send_broadcast(envelope) logging :send_broadcast_request, envelope.to_h client.broadcast([envelope]).each do |response| logging :send_broadcast_response, response.to_h raise OrdererError response. unless response.status == :SUCCESS yield response if block_given? end end |