hyperledger-fabric-sdk 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/crypto_suite/ecdsa_aes.rb +86 -0
- data/lib/fabric/channel.rb +54 -0
- data/lib/fabric/client.rb +45 -0
- data/lib/fabric/configuration.rb +25 -0
- data/lib/fabric/constants.rb +18 -0
- data/lib/fabric/identity.rb +36 -0
- data/lib/fabric/orderer.rb +19 -0
- data/lib/fabric/peer.rb +58 -0
- data/lib/fabric/peer_endorser.rb +85 -0
- data/lib/fabric/transaction_id.rb +11 -0
- data/lib/fabric/user.rb +24 -0
- data/lib/fabric/version.rb +3 -0
- data/lib/fabric_ca/client.rb +51 -0
- data/lib/fabric_ca/configuration.rb +25 -0
- data/lib/fabric_ca/connection.rb +32 -0
- data/lib/fabric_ca/error.rb +11 -0
- data/lib/fabric_ca/faraday_middleware/basic_auth.rb +33 -0
- data/lib/fabric_ca/faraday_middleware/raise_http_exception.rb +47 -0
- data/lib/fabric_ca/faraday_middleware/token_auth.rb +38 -0
- data/lib/fabric_ca/request.rb +50 -0
- data/lib/fabric_ca/response.rb +10 -0
- data/lib/fabric_ca/tools.rb +35 -0
- data/lib/fabric_ca/version.rb +3 -0
- data/lib/hyperledger-fabric-sdk.rb +47 -0
- data/lib/protos/common/collection_pb.rb +42 -0
- data/lib/protos/common/common_pb.rb +106 -0
- data/lib/protos/common/configtx_pb.rb +71 -0
- data/lib/protos/common/configuration_pb.rb +33 -0
- data/lib/protos/common/ledger_pb.rb +16 -0
- data/lib/protos/common/policies_pb.rb +52 -0
- data/lib/protos/discovery/protocol_pb.rb +119 -0
- data/lib/protos/discovery/protocol_services_pb.rb +30 -0
- data/lib/protos/gossip/message_pb.rb +233 -0
- data/lib/protos/gossip/message_services_pb.rb +31 -0
- data/lib/protos/idemix/idemix_pb.rb +93 -0
- data/lib/protos/ledger/queryresult/kv_query_result_pb.rb +24 -0
- data/lib/protos/ledger/rwset/kvrwset/kv_rwset_pb.rb +85 -0
- data/lib/protos/ledger/rwset/rwset_pb.rb +46 -0
- data/lib/protos/msp/identities_pb.rb +23 -0
- data/lib/protos/msp/msp_config_pb.rb +72 -0
- data/lib/protos/msp/msp_principal_pb.rb +54 -0
- data/lib/protos/orderer/ab_pb.rb +52 -0
- data/lib/protos/orderer/ab_services_pb.rb +41 -0
- data/lib/protos/orderer/configuration_pb.rb +32 -0
- data/lib/protos/orderer/kafka_pb.rb +45 -0
- data/lib/protos/peer/admin_pb.rb +41 -0
- data/lib/protos/peer/admin_services_pb.rb +33 -0
- data/lib/protos/peer/chaincode_event_pb.rb +17 -0
- data/lib/protos/peer/chaincode_pb.rb +60 -0
- data/lib/protos/peer/chaincode_shim_pb.rb +94 -0
- data/lib/protos/peer/chaincode_shim_services_pb.rb +30 -0
- data/lib/protos/peer/configuration_pb.rb +27 -0
- data/lib/protos/peer/events_pb.rb +98 -0
- data/lib/protos/peer/events_services_pb.rb +59 -0
- data/lib/protos/peer/peer_pb.rb +21 -0
- data/lib/protos/peer/peer_services_pb.rb +37 -0
- data/lib/protos/peer/proposal_pb.rb +40 -0
- data/lib/protos/peer/proposal_response_pb.rb +35 -0
- data/lib/protos/peer/query_pb.rb +32 -0
- data/lib/protos/peer/resources_pb.rb +34 -0
- data/lib/protos/peer/signed_cc_dep_spec_pb.rb +17 -0
- data/lib/protos/peer/transaction_pb.rb +72 -0
- data/lib/protos/transientstore/transientstore_pb.rb +18 -0
- metadata +123 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: ledger/rwset/rwset.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "rwset.TxReadWriteSet" do
|
8
|
+
optional :data_model, :enum, 1, "rwset.TxReadWriteSet.DataModel"
|
9
|
+
repeated :ns_rwset, :message, 2, "rwset.NsReadWriteSet"
|
10
|
+
end
|
11
|
+
add_enum "rwset.TxReadWriteSet.DataModel" do
|
12
|
+
value :KV, 0
|
13
|
+
end
|
14
|
+
add_message "rwset.NsReadWriteSet" do
|
15
|
+
optional :namespace, :string, 1
|
16
|
+
optional :rwset, :bytes, 2
|
17
|
+
repeated :collection_hashed_rwset, :message, 3, "rwset.CollectionHashedReadWriteSet"
|
18
|
+
end
|
19
|
+
add_message "rwset.CollectionHashedReadWriteSet" do
|
20
|
+
optional :collection_name, :string, 1
|
21
|
+
optional :hashed_rwset, :bytes, 2
|
22
|
+
optional :pvt_rwset_hash, :bytes, 3
|
23
|
+
end
|
24
|
+
add_message "rwset.TxPvtReadWriteSet" do
|
25
|
+
optional :data_model, :enum, 1, "rwset.TxReadWriteSet.DataModel"
|
26
|
+
repeated :ns_pvt_rwset, :message, 2, "rwset.NsPvtReadWriteSet"
|
27
|
+
end
|
28
|
+
add_message "rwset.NsPvtReadWriteSet" do
|
29
|
+
optional :namespace, :string, 1
|
30
|
+
repeated :collection_pvt_rwset, :message, 2, "rwset.CollectionPvtReadWriteSet"
|
31
|
+
end
|
32
|
+
add_message "rwset.CollectionPvtReadWriteSet" do
|
33
|
+
optional :collection_name, :string, 1
|
34
|
+
optional :rwset, :bytes, 2
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
module Rwset
|
39
|
+
TxReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("rwset.TxReadWriteSet").msgclass
|
40
|
+
TxReadWriteSet::DataModel = Google::Protobuf::DescriptorPool.generated_pool.lookup("rwset.TxReadWriteSet.DataModel").enummodule
|
41
|
+
NsReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("rwset.NsReadWriteSet").msgclass
|
42
|
+
CollectionHashedReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("rwset.CollectionHashedReadWriteSet").msgclass
|
43
|
+
TxPvtReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("rwset.TxPvtReadWriteSet").msgclass
|
44
|
+
NsPvtReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("rwset.NsPvtReadWriteSet").msgclass
|
45
|
+
CollectionPvtReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("rwset.CollectionPvtReadWriteSet").msgclass
|
46
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: msp/identities.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "msp.SerializedIdentity" do
|
8
|
+
optional :mspid, :string, 1
|
9
|
+
optional :id_bytes, :bytes, 2
|
10
|
+
end
|
11
|
+
add_message "msp.SerializedIdemixIdentity" do
|
12
|
+
optional :nym_x, :bytes, 1
|
13
|
+
optional :nym_y, :bytes, 2
|
14
|
+
optional :ou, :bytes, 3
|
15
|
+
optional :role, :bytes, 4
|
16
|
+
optional :proof, :bytes, 5
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
module Msp
|
21
|
+
SerializedIdentity = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.SerializedIdentity").msgclass
|
22
|
+
SerializedIdemixIdentity = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.SerializedIdemixIdentity").msgclass
|
23
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: msp/msp_config.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "msp.MSPConfig" do
|
8
|
+
optional :type, :int32, 1
|
9
|
+
optional :config, :bytes, 2
|
10
|
+
end
|
11
|
+
add_message "msp.FabricMSPConfig" do
|
12
|
+
optional :name, :string, 1
|
13
|
+
repeated :root_certs, :bytes, 2
|
14
|
+
repeated :intermediate_certs, :bytes, 3
|
15
|
+
repeated :admins, :bytes, 4
|
16
|
+
repeated :revocation_list, :bytes, 5
|
17
|
+
optional :signing_identity, :message, 6, "msp.SigningIdentityInfo"
|
18
|
+
repeated :organizational_unit_identifiers, :message, 7, "msp.FabricOUIdentifier"
|
19
|
+
optional :crypto_config, :message, 8, "msp.FabricCryptoConfig"
|
20
|
+
repeated :tls_root_certs, :bytes, 9
|
21
|
+
repeated :tls_intermediate_certs, :bytes, 10
|
22
|
+
optional :fabric_node_ous, :message, 11, "msp.FabricNodeOUs"
|
23
|
+
end
|
24
|
+
add_message "msp.FabricCryptoConfig" do
|
25
|
+
optional :signature_hash_family, :string, 1
|
26
|
+
optional :identity_identifier_hash_function, :string, 2
|
27
|
+
end
|
28
|
+
add_message "msp.IdemixMSPConfig" do
|
29
|
+
optional :name, :string, 1
|
30
|
+
optional :ipk, :bytes, 2
|
31
|
+
optional :signer, :message, 3, "msp.IdemixMSPSignerConfig"
|
32
|
+
optional :revocation_pk, :bytes, 4
|
33
|
+
optional :epoch, :int64, 5
|
34
|
+
end
|
35
|
+
add_message "msp.IdemixMSPSignerConfig" do
|
36
|
+
optional :cred, :bytes, 1
|
37
|
+
optional :sk, :bytes, 2
|
38
|
+
optional :organizational_unit_identifier, :string, 3
|
39
|
+
optional :is_admin, :bool, 4
|
40
|
+
optional :enrollment_id, :string, 5
|
41
|
+
optional :credential_revocation_information, :bytes, 6
|
42
|
+
end
|
43
|
+
add_message "msp.SigningIdentityInfo" do
|
44
|
+
optional :public_signer, :bytes, 1
|
45
|
+
optional :private_signer, :message, 2, "msp.KeyInfo"
|
46
|
+
end
|
47
|
+
add_message "msp.KeyInfo" do
|
48
|
+
optional :key_identifier, :string, 1
|
49
|
+
optional :key_material, :bytes, 2
|
50
|
+
end
|
51
|
+
add_message "msp.FabricOUIdentifier" do
|
52
|
+
optional :certificate, :bytes, 1
|
53
|
+
optional :organizational_unit_identifier, :string, 2
|
54
|
+
end
|
55
|
+
add_message "msp.FabricNodeOUs" do
|
56
|
+
optional :enable, :bool, 1
|
57
|
+
optional :client_ou_identifier, :message, 2, "msp.FabricOUIdentifier"
|
58
|
+
optional :peer_ou_identifier, :message, 3, "msp.FabricOUIdentifier"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
module Msp
|
63
|
+
MSPConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.MSPConfig").msgclass
|
64
|
+
FabricMSPConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.FabricMSPConfig").msgclass
|
65
|
+
FabricCryptoConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.FabricCryptoConfig").msgclass
|
66
|
+
IdemixMSPConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.IdemixMSPConfig").msgclass
|
67
|
+
IdemixMSPSignerConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.IdemixMSPSignerConfig").msgclass
|
68
|
+
SigningIdentityInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.SigningIdentityInfo").msgclass
|
69
|
+
KeyInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.KeyInfo").msgclass
|
70
|
+
FabricOUIdentifier = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.FabricOUIdentifier").msgclass
|
71
|
+
FabricNodeOUs = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.FabricNodeOUs").msgclass
|
72
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: msp/msp_principal.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "common.MSPPrincipal" do
|
8
|
+
optional :principal_classification, :enum, 1, "common.MSPPrincipal.Classification"
|
9
|
+
optional :principal, :bytes, 2
|
10
|
+
end
|
11
|
+
add_enum "common.MSPPrincipal.Classification" do
|
12
|
+
value :ROLE, 0
|
13
|
+
value :ORGANIZATION_UNIT, 1
|
14
|
+
value :IDENTITY, 2
|
15
|
+
value :ANONYMITY, 3
|
16
|
+
value :COMBINED, 4
|
17
|
+
end
|
18
|
+
add_message "common.OrganizationUnit" do
|
19
|
+
optional :msp_identifier, :string, 1
|
20
|
+
optional :organizational_unit_identifier, :string, 2
|
21
|
+
optional :certifiers_identifier, :bytes, 3
|
22
|
+
end
|
23
|
+
add_message "common.MSPRole" do
|
24
|
+
optional :msp_identifier, :string, 1
|
25
|
+
optional :role, :enum, 2, "common.MSPRole.MSPRoleType"
|
26
|
+
end
|
27
|
+
add_enum "common.MSPRole.MSPRoleType" do
|
28
|
+
value :MEMBER, 0
|
29
|
+
value :ADMIN, 1
|
30
|
+
value :CLIENT, 2
|
31
|
+
value :PEER, 3
|
32
|
+
end
|
33
|
+
add_message "common.MSPIdentityAnonymity" do
|
34
|
+
optional :anonymity_type, :enum, 1, "common.MSPIdentityAnonymity.MSPIdentityAnonymityType"
|
35
|
+
end
|
36
|
+
add_enum "common.MSPIdentityAnonymity.MSPIdentityAnonymityType" do
|
37
|
+
value :NOMINAL, 0
|
38
|
+
value :ANONYMOUS, 1
|
39
|
+
end
|
40
|
+
add_message "common.CombinedPrincipal" do
|
41
|
+
repeated :principals, :message, 1, "common.MSPPrincipal"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
module Common
|
46
|
+
MSPPrincipal = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPPrincipal").msgclass
|
47
|
+
MSPPrincipal::Classification = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPPrincipal.Classification").enummodule
|
48
|
+
OrganizationUnit = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.OrganizationUnit").msgclass
|
49
|
+
MSPRole = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPRole").msgclass
|
50
|
+
MSPRole::MSPRoleType = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPRole.MSPRoleType").enummodule
|
51
|
+
MSPIdentityAnonymity = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPIdentityAnonymity").msgclass
|
52
|
+
MSPIdentityAnonymity::MSPIdentityAnonymityType = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPIdentityAnonymity.MSPIdentityAnonymityType").enummodule
|
53
|
+
CombinedPrincipal = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.CombinedPrincipal").msgclass
|
54
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: orderer/ab.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'common/common_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message "orderer.BroadcastResponse" do
|
9
|
+
optional :status, :enum, 1, "common.Status"
|
10
|
+
optional :info, :string, 2
|
11
|
+
end
|
12
|
+
add_message "orderer.SeekNewest" do
|
13
|
+
end
|
14
|
+
add_message "orderer.SeekOldest" do
|
15
|
+
end
|
16
|
+
add_message "orderer.SeekSpecified" do
|
17
|
+
optional :number, :uint64, 1
|
18
|
+
end
|
19
|
+
add_message "orderer.SeekPosition" do
|
20
|
+
oneof :Type do
|
21
|
+
optional :newest, :message, 1, "orderer.SeekNewest"
|
22
|
+
optional :oldest, :message, 2, "orderer.SeekOldest"
|
23
|
+
optional :specified, :message, 3, "orderer.SeekSpecified"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
add_message "orderer.SeekInfo" do
|
27
|
+
optional :start, :message, 1, "orderer.SeekPosition"
|
28
|
+
optional :stop, :message, 2, "orderer.SeekPosition"
|
29
|
+
optional :behavior, :enum, 3, "orderer.SeekInfo.SeekBehavior"
|
30
|
+
end
|
31
|
+
add_enum "orderer.SeekInfo.SeekBehavior" do
|
32
|
+
value :BLOCK_UNTIL_READY, 0
|
33
|
+
value :FAIL_IF_NOT_READY, 1
|
34
|
+
end
|
35
|
+
add_message "orderer.DeliverResponse" do
|
36
|
+
oneof :Type do
|
37
|
+
optional :status, :enum, 1, "common.Status"
|
38
|
+
optional :block, :message, 2, "common.Block"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
module Orderer
|
44
|
+
BroadcastResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.BroadcastResponse").msgclass
|
45
|
+
SeekNewest = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekNewest").msgclass
|
46
|
+
SeekOldest = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekOldest").msgclass
|
47
|
+
SeekSpecified = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekSpecified").msgclass
|
48
|
+
SeekPosition = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekPosition").msgclass
|
49
|
+
SeekInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekInfo").msgclass
|
50
|
+
SeekInfo::SeekBehavior = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekInfo.SeekBehavior").enummodule
|
51
|
+
DeliverResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.DeliverResponse").msgclass
|
52
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: orderer/ab.proto for package 'orderer'
|
3
|
+
# Original file comments:
|
4
|
+
#
|
5
|
+
# Copyright IBM Corp. 2016 All Rights Reserved.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'grpc'
|
21
|
+
require 'orderer/ab_pb'
|
22
|
+
|
23
|
+
module Orderer
|
24
|
+
module AtomicBroadcast
|
25
|
+
class Service
|
26
|
+
|
27
|
+
include GRPC::GenericService
|
28
|
+
|
29
|
+
self.marshal_class_method = :encode
|
30
|
+
self.unmarshal_class_method = :decode
|
31
|
+
self.service_name = 'orderer.AtomicBroadcast'
|
32
|
+
|
33
|
+
# broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure
|
34
|
+
rpc :Broadcast, stream(Common::Envelope), stream(BroadcastResponse)
|
35
|
+
# deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled SeekInfo message, then a stream of block replies is received.
|
36
|
+
rpc :Deliver, stream(Common::Envelope), stream(DeliverResponse)
|
37
|
+
end
|
38
|
+
|
39
|
+
Stub = Service.rpc_stub_class
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: orderer/configuration.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "orderer.ConsensusType" do
|
8
|
+
optional :type, :string, 1
|
9
|
+
end
|
10
|
+
add_message "orderer.BatchSize" do
|
11
|
+
optional :max_message_count, :uint32, 1
|
12
|
+
optional :absolute_max_bytes, :uint32, 2
|
13
|
+
optional :preferred_max_bytes, :uint32, 3
|
14
|
+
end
|
15
|
+
add_message "orderer.BatchTimeout" do
|
16
|
+
optional :timeout, :string, 1
|
17
|
+
end
|
18
|
+
add_message "orderer.KafkaBrokers" do
|
19
|
+
repeated :brokers, :string, 1
|
20
|
+
end
|
21
|
+
add_message "orderer.ChannelRestrictions" do
|
22
|
+
optional :max_count, :uint64, 1
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module Orderer
|
27
|
+
ConsensusType = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.ConsensusType").msgclass
|
28
|
+
BatchSize = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.BatchSize").msgclass
|
29
|
+
BatchTimeout = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.BatchTimeout").msgclass
|
30
|
+
KafkaBrokers = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.KafkaBrokers").msgclass
|
31
|
+
ChannelRestrictions = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.ChannelRestrictions").msgclass
|
32
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: orderer/kafka.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "orderer.KafkaMessage" do
|
8
|
+
oneof :Type do
|
9
|
+
optional :regular, :message, 1, "orderer.KafkaMessageRegular"
|
10
|
+
optional :time_to_cut, :message, 2, "orderer.KafkaMessageTimeToCut"
|
11
|
+
optional :connect, :message, 3, "orderer.KafkaMessageConnect"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
add_message "orderer.KafkaMessageRegular" do
|
15
|
+
optional :payload, :bytes, 1
|
16
|
+
optional :config_seq, :uint64, 2
|
17
|
+
optional :class, :enum, 3, "orderer.KafkaMessageRegular.Class"
|
18
|
+
optional :original_offset, :int64, 4
|
19
|
+
end
|
20
|
+
add_enum "orderer.KafkaMessageRegular.Class" do
|
21
|
+
value :UNKNOWN, 0
|
22
|
+
value :NORMAL, 1
|
23
|
+
value :CONFIG, 2
|
24
|
+
end
|
25
|
+
add_message "orderer.KafkaMessageTimeToCut" do
|
26
|
+
optional :block_number, :uint64, 1
|
27
|
+
end
|
28
|
+
add_message "orderer.KafkaMessageConnect" do
|
29
|
+
optional :payload, :bytes, 1
|
30
|
+
end
|
31
|
+
add_message "orderer.KafkaMetadata" do
|
32
|
+
optional :last_offset_persisted, :int64, 1
|
33
|
+
optional :last_original_offset_processed, :int64, 2
|
34
|
+
optional :last_resubmitted_config_offset, :int64, 3
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
module Orderer
|
39
|
+
KafkaMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.KafkaMessage").msgclass
|
40
|
+
KafkaMessageRegular = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.KafkaMessageRegular").msgclass
|
41
|
+
KafkaMessageRegular::Class = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.KafkaMessageRegular.Class").enummodule
|
42
|
+
KafkaMessageTimeToCut = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.KafkaMessageTimeToCut").msgclass
|
43
|
+
KafkaMessageConnect = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.KafkaMessageConnect").msgclass
|
44
|
+
KafkaMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.KafkaMetadata").msgclass
|
45
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: peer/admin.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/empty_pb'
|
7
|
+
require 'common/common_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_message "protos.ServerStatus" do
|
10
|
+
optional :status, :enum, 1, "protos.ServerStatus.StatusCode"
|
11
|
+
end
|
12
|
+
add_enum "protos.ServerStatus.StatusCode" do
|
13
|
+
value :UNDEFINED, 0
|
14
|
+
value :STARTED, 1
|
15
|
+
value :STOPPED, 2
|
16
|
+
value :PAUSED, 3
|
17
|
+
value :ERROR, 4
|
18
|
+
value :UNKNOWN, 5
|
19
|
+
end
|
20
|
+
add_message "protos.LogLevelRequest" do
|
21
|
+
optional :log_module, :string, 1
|
22
|
+
optional :log_level, :string, 2
|
23
|
+
end
|
24
|
+
add_message "protos.LogLevelResponse" do
|
25
|
+
optional :log_module, :string, 1
|
26
|
+
optional :log_level, :string, 2
|
27
|
+
end
|
28
|
+
add_message "protos.AdminOperation" do
|
29
|
+
oneof :content do
|
30
|
+
optional :logReq, :message, 1, "protos.LogLevelRequest"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
module Protos
|
36
|
+
ServerStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ServerStatus").msgclass
|
37
|
+
ServerStatus::StatusCode = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ServerStatus.StatusCode").enummodule
|
38
|
+
LogLevelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.LogLevelRequest").msgclass
|
39
|
+
LogLevelResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.LogLevelResponse").msgclass
|
40
|
+
AdminOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.AdminOperation").msgclass
|
41
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: peer/admin.proto for package 'protos'
|
3
|
+
# Original file comments:
|
4
|
+
#
|
5
|
+
# Copyright IBM Corp. All Rights Reserved.
|
6
|
+
#
|
7
|
+
# SPDX-License-Identifier: Apache-2.0
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'grpc'
|
11
|
+
require 'peer/admin_pb'
|
12
|
+
|
13
|
+
module Protos
|
14
|
+
module Admin
|
15
|
+
# Interface exported by the server.
|
16
|
+
class Service
|
17
|
+
|
18
|
+
include GRPC::GenericService
|
19
|
+
|
20
|
+
self.marshal_class_method = :encode
|
21
|
+
self.unmarshal_class_method = :decode
|
22
|
+
self.service_name = 'protos.Admin'
|
23
|
+
|
24
|
+
rpc :GetStatus, Common::Envelope, ServerStatus
|
25
|
+
rpc :StartServer, Common::Envelope, ServerStatus
|
26
|
+
rpc :GetModuleLogLevel, Common::Envelope, LogLevelResponse
|
27
|
+
rpc :SetModuleLogLevel, Common::Envelope, LogLevelResponse
|
28
|
+
rpc :RevertLogLevels, Common::Envelope, Google::Protobuf::Empty
|
29
|
+
end
|
30
|
+
|
31
|
+
Stub = Service.rpc_stub_class
|
32
|
+
end
|
33
|
+
end
|