Documentation ¶
Overview ¶
Copyright IBM Corp. 2016-2017 All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. 2016-2017 All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- Variables
- func AddOrdererFlags(cmd *cobra.Command)
- func CheckLogLevel(level string) error
- func GetCertificate() (tls.Certificate, error)
- func GetDefaultSigner() (msp.SigningIdentity, error)
- func GetDeliverClient(address, tlsRootCertFile string) (pb.Deliver_DeliverClient, error)
- func GetEndorserClient(address, tlsRootCertFile string) (pb.EndorserClient, error)
- func GetMockEndorserClient(response *pb.ProposalResponse, err error) pb.EndorserClient
- func GetOrdererEndpointOfChain(chainID string, signer Signer, endorserClient pb.EndorserClient) ([]string, error)
- func GetPeerDeliverClient(address, tlsRootCertFile string) (pb.DeliverClient, error)
- func InitCmd(cmd *cobra.Command, args []string)
- func InitConfig(cmdRoot string) error
- func InitCrypto(mspMgrConfigDir, localMSPID, localMSPType string) error
- func SetBCCSPKeystorePath()
- func SetOrdererEnv(cmd *cobra.Command, args []string)
- type BroadcastClient
- type BroadcastGRPCClient
- type CAConfig
- type CCType
- type ChannelNetworkConfig
- type ClientConfig
- type CommonClient
- type CredentialStoreType
- type DeliverClient
- type EnrollCredentials
- type LoggingType
- type MutualTLSConfig
- type NetworkConfig
- type OrdererClient
- type OrdererConfig
- type OrganizationConfig
- type PeerChannelConfig
- type PeerClient
- type PeerConfig
- type Signer
- type TLSConfig
- type TLSKeyPair
- type TLSType
Constants ¶
View Source
const CmdRoot = "core"
View Source
const UndefinedParamValue = ""
Variables ¶
View Source
var ( GetEndorserClientFnc func(address, tlsRootCertFile string) (pb.EndorserClient, error) GetPeerDeliverClientFnc func(address, tlsRootCertFile string) (pb.DeliverClient, error) GetDeliverClientFnc func(address, tlsRootCertFile string) (pb.Deliver_DeliverClient, error) GetDefaultSignerFnc func() (msp.SigningIdentity, error) GetBroadcastClientFnc func() (BroadcastClient, error) GetOrdererEndpointOfChainFnc func(chainID string, signer Signer, endorserClient pb.EndorserClient) ([]string, error) GetCertificateFnc func() (tls.Certificate, error) )
View Source
var (
OrderingEndpoint string
)
Functions ¶
func AddOrdererFlags ¶
func CheckLogLevel ¶
func GetCertificate ¶
func GetCertificate() (tls.Certificate, error)
func GetDefaultSigner ¶
func GetDefaultSigner() (msp.SigningIdentity, error)
func GetDeliverClient ¶
func GetDeliverClient(address, tlsRootCertFile string) (pb.Deliver_DeliverClient, error)
func GetEndorserClient ¶
func GetEndorserClient(address, tlsRootCertFile string) (pb.EndorserClient, error)
func GetMockEndorserClient ¶
func GetMockEndorserClient(response *pb.ProposalResponse, err error) pb.EndorserClient
func GetPeerDeliverClient ¶
func GetPeerDeliverClient(address, tlsRootCertFile string) (pb.DeliverClient, error)
func InitConfig ¶
func InitCrypto ¶
func SetBCCSPKeystorePath ¶
func SetBCCSPKeystorePath()
func SetOrdererEnv ¶
Types ¶
type BroadcastClient ¶
func GetBroadcastClient ¶
func GetBroadcastClient() (BroadcastClient, error)
func GetMockBroadcastClient ¶
func GetMockBroadcastClient(err error) BroadcastClient
type BroadcastGRPCClient ¶
type BroadcastGRPCClient struct {
Client ab.AtomicBroadcast_BroadcastClient
}
func (*BroadcastGRPCClient) Close ¶
func (s *BroadcastGRPCClient) Close() error
type CAConfig ¶
type CAConfig struct { URL string `yaml:"url"` HTTPOptions map[string]interface{} `yaml:"httpOptions"` TLSCACerts MutualTLSConfig `yaml:"tlsCACerts"` Registrar EnrollCredentials `yaml:"registrar"` CaName string `yaml:"caName"` }
type ChannelNetworkConfig ¶
type ChannelNetworkConfig struct { Orderers []string `yaml:"orderers"` Peers map[string]PeerChannelConfig `yaml:"peers"` Chaincodes []string `yaml:"chaincodes"` }
type ClientConfig ¶
type ClientConfig struct { Organization string `yaml:"organization"` Logging LoggingType `yaml:"logging"` CryptoConfig CCType `yaml:"cryptoconfig"` TLS TLSType `yaml:"tls"` CredentialStore CredentialStoreType `yaml:"credentialStore"` }
type CommonClient ¶
type CommonClient struct { *comm.GRPCClient Address string // contains filtered or unexported fields }
type CredentialStoreType ¶
type DeliverClient ¶
type DeliverClient struct { Signer identity.SignerSerializer Service ab.AtomicBroadcast_DeliverClient ChannelID string TLSCertHash []byte BestEffort bool }
func NewDeliverClientForOrderer ¶
func NewDeliverClientForOrderer(channelID string, signer identity.SignerSerializer, bestEffort bool) (*DeliverClient, error)
func NewDeliverClientForPeer ¶
func NewDeliverClientForPeer(channelID string, signer identity.SignerSerializer, bestEffort bool) (*DeliverClient, error)
func (*DeliverClient) Close ¶
func (d *DeliverClient) Close() error
func (*DeliverClient) GetNewestBlock ¶
func (d *DeliverClient) GetNewestBlock() (*cb.Block, error)
func (*DeliverClient) GetOldestBlock ¶
func (d *DeliverClient) GetOldestBlock() (*cb.Block, error)
func (*DeliverClient) GetSpecifiedBlock ¶
func (d *DeliverClient) GetSpecifiedBlock(num uint64) (*cb.Block, error)
type EnrollCredentials ¶
type LoggingType ¶
type LoggingType struct {
Level string `yaml:"level"`
}
type MutualTLSConfig ¶
type MutualTLSConfig struct { Pem []string `yaml:"pem"` Path string `yaml:"path"` Client TLSKeyPair `yaml:"client"` }
type NetworkConfig ¶
type NetworkConfig struct { Name string `yaml:"name"` Xtype string `yaml:"x-type"` Description string `yaml:"description"` Version string `yaml:"version"` Channels map[string]ChannelNetworkConfig `yaml:"channels"` Organizations map[string]OrganizationConfig `yaml:"organizations"` Peers map[string]PeerConfig `yaml:"peers"` Client ClientConfig `yaml:"client"` Orderers map[string]OrdererConfig `yaml:"orderers"` CertificateAuthorities map[string]CAConfig `yaml:"certificateAuthorities"` }
func GetConfig ¶
func GetConfig(fileName string) (*NetworkConfig, error)
type OrdererClient ¶
type OrdererClient struct {
CommonClient
}
func NewOrdererClientFromEnv ¶
func NewOrdererClientFromEnv() (*OrdererClient, error)
func (*OrdererClient) Broadcast ¶
func (oc *OrdererClient) Broadcast() (ab.AtomicBroadcast_BroadcastClient, error)
func (*OrdererClient) Certificate ¶
func (oc *OrdererClient) Certificate() tls.Certificate
func (*OrdererClient) Deliver ¶
func (oc *OrdererClient) Deliver() (ab.AtomicBroadcast_DeliverClient, error)
type OrdererConfig ¶
type OrganizationConfig ¶
type PeerChannelConfig ¶
type PeerClient ¶
type PeerClient struct {
CommonClient
}
func NewPeerClientForAddress ¶
func NewPeerClientForAddress(address, tlsRootCertFile string) (*PeerClient, error)
func NewPeerClientFromEnv ¶
func NewPeerClientFromEnv() (*PeerClient, error)
func (*PeerClient) Certificate ¶
func (pc *PeerClient) Certificate() tls.Certificate
func (*PeerClient) Deliver ¶
func (pc *PeerClient) Deliver() (pb.Deliver_DeliverClient, error)
func (*PeerClient) Endorser ¶
func (pc *PeerClient) Endorser() (pb.EndorserClient, error)
func (*PeerClient) PeerDeliver ¶
func (pc *PeerClient) PeerDeliver() (pb.DeliverClient, error)
type PeerConfig ¶
type TLSKeyPair ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.