代码拉取完成,页面将自动刷新
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package nwo
func BasicSolo() *Config {
return &Config{
Organizations: []*Organization{{
Name: "OrdererOrg",
MSPID: "OrdererMSP",
Domain: "example.com",
EnableNodeOUs: false,
Users: 0,
CA: &CA{Hostname: "ca"},
}, {
Name: "Org1",
MSPID: "Org1MSP",
Domain: "org1.example.com",
EnableNodeOUs: true,
Users: 2,
CA: &CA{Hostname: "ca"},
}, {
Name: "Org2",
MSPID: "Org2MSP",
Domain: "org2.example.com",
EnableNodeOUs: true,
Users: 2,
CA: &CA{Hostname: "ca"},
}},
Consortiums: []*Consortium{{
Name: "SampleConsortium",
Organizations: []string{
"Org1",
"Org2",
},
}},
Consensus: &Consensus{
Type: "solo",
},
SystemChannel: &SystemChannel{
Name: "systemchannel",
Profile: "TwoOrgsOrdererGenesis",
},
Orderers: []*Orderer{
{Name: "orderer", Organization: "OrdererOrg"},
},
Channels: []*Channel{
{Name: "testchannel", Profile: "TwoOrgsChannel"},
},
Peers: []*Peer{{
Name: "peer0",
Organization: "Org1",
Channels: []*PeerChannel{
{Name: "testchannel", Anchor: true},
},
}, {
Name: "peer1",
Organization: "Org1",
Channels: []*PeerChannel{
{Name: "testchannel", Anchor: false},
},
}, {
Name: "peer0",
Organization: "Org2",
Channels: []*PeerChannel{
{Name: "testchannel", Anchor: true},
},
}, {
Name: "peer1",
Organization: "Org2",
Channels: []*PeerChannel{
{Name: "testchannel", Anchor: false},
},
}},
Profiles: []*Profile{{
Name: "TwoOrgsOrdererGenesis",
Orderers: []string{"orderer"},
}, {
Name: "TwoOrgsChannel",
Consortium: "SampleConsortium",
Organizations: []string{"Org1", "Org2"},
}},
}
}
func BasicKafka() *Config {
config := BasicSolo()
config.Consensus.Type = "kafka"
config.Consensus.ZooKeepers = 1
config.Consensus.Brokers = 1
return config
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。