Documentation ¶
Index ¶
- Constants
- func CheckLogLevel(level string) error
- func GetAdminClient() (pb.AdminClient, error)
- func GetDefaultSigner() (msp.SigningIdentity, error)
- func GetEndorserClient() (pb.EndorserClient, error)
- func GetMockAdminClient(err error) pb.AdminClient
- func GetMockEndorserClient(response *pb.ProposalResponse, err error) pb.EndorserClient
- func GetOrdererEndpointOfChain(chainID string, signer msp.SigningIdentity, endorserClient pb.EndorserClient) ([]string, error)
- func InitConfig(cmdRoot string) error
- func InitCrypto(mspMgrConfigDir string, localMSPID string) error
- func SetLogLevelFromViper(module string) error
- type BroadcastClient
Constants ¶
View Source
const UndefinedParamValue = ""
UndefinedParamValue defines what undefined parameters in the command line will initialise to
Variables ¶
This section is empty.
Functions ¶
func CheckLogLevel ¶
CheckLogLevel checks that a given log level string is valid
func GetAdminClient ¶
func GetAdminClient() (pb.AdminClient, error)
GetAdminClient returns a new admin client connection for this peer
func GetDefaultSigner ¶
func GetDefaultSigner() (msp.SigningIdentity, error)
GetDefaultSigner return a default Signer(Default/PERR) for cli
func GetEndorserClient ¶
func GetEndorserClient() (pb.EndorserClient, error)
GetEndorserClient returns a new endorser client connection for this peer
func GetMockAdminClient ¶
func GetMockAdminClient(err error) pb.AdminClient
func GetMockEndorserClient ¶
func GetMockEndorserClient(response *pb.ProposalResponse, err error) pb.EndorserClient
GetMockEndorserClient return a endorser client return specified ProposalResponse and err(nil or error)
func GetOrdererEndpointOfChain ¶
func GetOrdererEndpointOfChain(chainID string, signer msp.SigningIdentity, endorserClient pb.EndorserClient) ([]string, error)
GetOrdererEndpointOfChain returns orderer endpoints of given chain
func InitCrypto ¶
InitCrypto initializes crypto for this peer
Types ¶
type BroadcastClient ¶
type BroadcastClient interface { //Send data to orderer Send(env *cb.Envelope) error Close() error }
func GetBroadcastClient ¶
func GetBroadcastClient(orderingEndpoint string, tlsEnabled bool, caFile string) (BroadcastClient, error)
GetBroadcastClient creates a simple instance of the BroadcastClient interface
func GetMockBroadcastClient ¶
func GetMockBroadcastClient(err error) BroadcastClient
Click to show internal directories.
Click to hide internal directories.