Documentation ¶
Index ¶
Constants ¶
View Source
const ( PeersCommand = "peers" ConfigCommand = "config" EndorsersCommand = "endorsers" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientStub ¶
type ClientStub struct { }
ClientStub是一个与发现服务通信的存根 using the discovery client implementation
func (*ClientStub) Send ¶
func (stub *ClientStub) Send(server string, conf common.Config, req *discovery.Request) (ServiceResponse, error)
发送发送请求并接收响应
type CommandRegistrar ¶
type CommandRegistrar interface { //命令将新的顶级命令添加到CLI Command(name, help string, onCommand common.CLICommand) *kingpin.CmdClause }
命令注册寄存器命令
type ConfigCmd ¶
type ConfigCmd struct {
// contains filtered or unexported fields
}
configCmd执行检索config的命令
func NewConfigCmd ¶
func NewConfigCmd(stub Stub, parser ResponseParser) *ConfigCmd
newconfigCmd创建新的configCmd
func (*ConfigCmd) SetChannel ¶
setchannel设置configCmd的通道
type ConfigResponseParser ¶
configresponseparser分析配置响应
func (*ConfigResponseParser) ParseResponse ¶
func (parser *ConfigResponseParser) ParseResponse(channel string, res ServiceResponse) error
ParseResponse解析给定通道的给定响应
type EndorserResponseParser ¶
RemarkerResponseParser解析来自对等方的认可响应
func (*EndorserResponseParser) ParseResponse ¶
func (parser *EndorserResponseParser) ParseResponse(channel string, res ServiceResponse) error
ParseResponse解析给定通道的给定响应
type EndorsersCmd ¶
type EndorsersCmd struct {
// contains filtered or unexported fields
}
背书命令执行一个命令,该命令检索链码调用链的背书人。
func NewEndorsersCmd ¶
func NewEndorsersCmd(stub Stub, parser ResponseParser) *EndorsersCmd
新建背书命令创建新的背书命令
func (*EndorsersCmd) SetChaincodes ¶
func (pc *EndorsersCmd) SetChaincodes(chaincodes *[]string)
setchaincodes将链码设置为给定的链码
func (*EndorsersCmd) SetChannel ¶
func (pc *EndorsersCmd) SetChannel(channel *string)
setchannel设置通道
func (*EndorsersCmd) SetCollections ¶
func (pc *EndorsersCmd) SetCollections(collections *map[string]string)
SetCollections sets the collections to be the given collections
type PeerCmd ¶
type PeerCmd struct {
// contains filtered or unexported fields
}
PeerCmd executes channelPeer listing command
func NewPeerCmd ¶
func NewPeerCmd(stub Stub, parser ResponseParser) *PeerCmd
newpeerCmd使用给定的存根和响应分析器创建一个新的peerCmd
type PeerResponseParser ¶
PeerResponseParser分析通道对等响应
func (*PeerResponseParser) ParseResponse ¶
func (parser *PeerResponseParser) ParseResponse(channel string, res ServiceResponse) error
ParseResponse解析给定通道的给定响应
type ResponseParser ¶
type ResponseParser interface { //ParseResponse解析响应并在发出数据时使用给定的输出 ParseResponse(channel string, response ServiceResponse) error }
ResponseParser分析从服务器发送的响应
type ServiceResponse ¶
type ServiceResponse interface { //ForChannel返回给定通道上下文中的ChannelResponse ForChannel(string) discovery.ChannelResponse //forlocal返回无通道上下文中的localresponse ForLocal() discovery.LocalResponse //RAW返回来自服务器的原始响应 Raw() *Response }
ServiceResponse表示从发现服务发送的响应
Directories ¶
Path | Synopsis |
---|---|
此源码被清华学神尹成大魔王专业翻译分析并修改 尹成QQ77025077 尹成微信18510341407 尹成所在QQ群721929980 尹成邮箱 yinc13@mails.tsinghua.edu.cn 尹成毕业于清华大学,微软区块链领域全球最有价值专家 https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 Code generated by mockery v1.0.0.
|
此源码被清华学神尹成大魔王专业翻译分析并修改 尹成QQ77025077 尹成微信18510341407 尹成所在QQ群721929980 尹成邮箱 yinc13@mails.tsinghua.edu.cn 尹成毕业于清华大学,微软区块链领域全球最有价值专家 https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 Code generated by mockery v1.0.0. |
Click to show internal directories.
Click to hide internal directories.