Module: Fabric

Extended by:
Configuration
Defined in:
lib/fabric.rb,
lib/fabric/peer.rb,
lib/fabric/error.rb,
lib/fabric/queue.rb,
lib/fabric/client.rb,
lib/fabric/helper.rb,
lib/fabric/channel.rb,
lib/fabric/orderer.rb,
lib/fabric/version.rb,
lib/fabric/identity.rb,
lib/fabric/proposal.rb,
lib/fabric/constants.rb,
lib/fabric/event_hub.rb,
lib/fabric/client_stub.rb,
lib/fabric/transaction.rb,
lib/fabric/crypto_suite.rb,
lib/fabric/block_decoder.rb,
lib/fabric/configuration.rb,
lib/fabric/fabric_logger.rb,
lib/fabric/enumerator_queue.rb,
lib/fabric/transaction_info.rb,
lib/fabric/chaincode_response.rb

Defined Under Namespace

Modules: Configuration, Constants, Helper Classes: BlockDecoder, ChaincodeError, ChaincodeResponse, Channel, Client, ClientStub, CryptoSuite, EnumeratorQueue, Error, ErrorFactory, EventHub, FabricLogger, Identity, NetworkOfflineError, Orderer, OrdererError, Peer, Proposal, Transaction, TransactionError, TransactionInfo, UnknownError

Constant Summary collapse

VERSION =
'0.2.0'.freeze

Constants included from Configuration

Configuration::DEFAULT_TIMEOUT, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

assign, configure, extended, options, reset

Class Method Details

.client(opts = {}) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/fabric.rb', line 40

def self.client(opts = {})
  client = Fabric::Client.new opts

  orderers.each { |config| client.register_orderer config }
  peers.each { |config| client.register_peer config }
  event_hubs.each { |config| client.register_event_hub config }

  client
end

.crypto_suite(opts = {}) ⇒ Object



50
51
52
# File 'lib/fabric.rb', line 50

def self.crypto_suite(opts = {})
  @crypto_suite ||= Fabric::CryptoSuite.new opts
end

.new(config) ⇒ Object



34
35
36
37
38
# File 'lib/fabric.rb', line 34

def self.new(config)
  assign(config)

  self
end