discover命令拥有以下子命令:
- saveConfig
- peers
- config
- endorsers
-
命令行用法如下所示: usage: discover [<flags>] <command> [<args> ...] Command line client for fabric discovery service Flags: --help Show context-sensitive help (also try --help-long and --help-man). --configFile=CONFIGFILE Specifies the config file to load the configuration from --peerTLSCA=PEERTLSCA Sets the TLS CA certificate file path that verifies the TLS peer's certificate --tlsCert=TLSCERT (Optional) Sets the client TLS certificate file path that is used when the peer enforces client authentication --tlsKey=TLSKEY (Optional) Sets the client TLS key file path that is used when the peer enforces client authentication --userKey=USERKEY Sets the user's key file path that is used to sign messages sent to the peer --userCert=USERCERT Sets the user's certificate file path that is used to authenticate the messages sent to the peer --MSP=MSP Sets the MSP ID of the user, which represents the CA(s) that issued its user certificate Commands: help [<command>...] Show help. peers [<flags>] Discover peers config [<flags>] Discover channel config endorsers [<flags>] Discover chaincode endorsers saveConfig Save the config passed by flags into the file specified by --configFile
要持久化配置,需要通过标识 –configFile提供配置文件名,连同子命令saveConfig一起执行:
-
discover --configFile conf.yaml --peerTLSCA tls/ca.crt --userKey msp/keystore/ea4f6a38ac7057b6fa9502c2f5f39f182e320f71f667749100fe7dd94c23ce43_sk --userCert msp/signcerts/User1@org1.example.com-cert.pem --MSP Org1MSP saveConfig
命令行用法如下所示:
usage: discover [<flags>] <command> [<args> ...]
Command line client for fabric discovery service
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--configFile=CONFIGFILE Specifies the config file to load the configuration from
--peerTLSCA=PEERTLSCA Sets the TLS CA certificate file path that verifies the TLS peer's certificate
--tlsCert=TLSCERT (Optional) Sets the client TLS certificate file path that is used when the peer enforces client authentication
--tlsKey=TLSKEY (Optional) Sets the client TLS key file path that is used when the peer enforces client authentication
--userKey=USERKEY Sets the user's key file path that is used to sign messages sent to the peer
--userCert=USERCERT Sets the user's certificate file path that is used to authenticate the messages sent to the peer
--MSP=MSP Sets the MSP ID of the user, which represents the CA(s) that issued its user certificate
Commands:
help [<command>...]
Show help.
peers [<flags>]
Discover peers
config [<flags>]
Discover channel config
endorsers [<flags>]
Discover chaincode endorsers
saveConfig
Save the config passed by flags into the file specified by --configFile