Documentation ¶
Index ¶
- func NewConfig(peerConfigPath string, channelID string) (transactionsnapApi.Config, errors.Error)
- func NewNetworkPeer(peerConfig *fabApi.PeerConfig, mspID string, pemBytes []byte) (*fabApi.NetworkPeer, error)
- type Config
- func (c *Config) CCErrorRetryableCodes() ([]int32, errors.Error)
- func (c *Config) GetClientCacheRefreshInterval() time.Duration
- func (c *Config) GetConfigBytes() []byte
- func (c *Config) GetConfigPath(path string) string
- func (c *Config) GetCryptoProvider() (string, errors.Error)
- func (c *Config) GetEndorserSelectionInterval() time.Duration
- func (c *Config) GetEndorserSelectionMaxAttempts() int
- func (c *Config) GetLocalPeer() (*transactionsnapApi.PeerConfig, errors.Error)
- func (c *Config) GetMspConfigPath() string
- func (c *Config) GetMspID() string
- func (c *Config) GetPeerConfig() *viper.Viper
- func (c *Config) GetTLSCert() *x509.Certificate
- func (c *Config) GetTLSCertPath() string
- func (c *Config) GetTLSCertPem() []byte
- func (c *Config) GetTLSKeyPath() string
- func (c *Config) GetTLSRootCert() *x509.Certificate
- func (c *Config) GetTLSRootCertPath() string
- func (c *Config) GetTxnSnapConfig() *viper.Viper
- func (c *Config) RetryOpts() retry.Opts
- type PeerConfigs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNetworkPeer ¶ added in v0.2.0
func NewNetworkPeer(peerConfig *fabApi.PeerConfig, mspID string, pemBytes []byte) (*fabApi.NetworkPeer, error)
NewNetworkPeer creates a NetworkPeer
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config implements Config interface
func (*Config) CCErrorRetryableCodes ¶ added in v0.2.0
CCErrorRetryableCodes configuration for chaincode errors to retry
func (*Config) GetClientCacheRefreshInterval ¶ added in v0.2.0
GetClientCacheRefreshInterval the client cache refresh interval
func (*Config) GetConfigBytes ¶
GetConfigBytes returns config bytes
func (*Config) GetConfigPath ¶
GetConfigPath returns the absolute value of the given path that is relative to the config file For example, if the config file is at /etc/hyperledger/config.yaml, calling GetConfigPath("tls/cert") will return /etc/hyperledger/tls/cert
func (*Config) GetCryptoProvider ¶
GetCryptoProvider returns crypto provider name from peer config
func (*Config) GetEndorserSelectionInterval ¶
GetEndorserSelectionInterval is the amount of time to wait between attempts at retrieving at least one endorsing peer group.
func (*Config) GetEndorserSelectionMaxAttempts ¶
GetEndorserSelectionMaxAttempts returns the maximum number of attempts at retrieving at least one endorsing peer group, while waiting the specified interval between attempts.
func (*Config) GetLocalPeer ¶
func (c *Config) GetLocalPeer() (*transactionsnapApi.PeerConfig, errors.Error)
GetLocalPeer returns address and ports for the peer running inside the txn snap container
func (*Config) GetMspConfigPath ¶
GetMspConfigPath returns the MSP config path for peer
func (*Config) GetPeerConfig ¶
GetPeerConfig to get peers
func (*Config) GetTLSCert ¶
func (c *Config) GetTLSCert() *x509.Certificate
GetTLSCert returns client TLS certificate
func (*Config) GetTLSCertPath ¶
GetTLSCertPath returns absolute path to the TLS certificate
func (*Config) GetTLSCertPem ¶
GetTLSCertPem returns client TLS certificate pem
func (*Config) GetTLSKeyPath ¶
GetTLSKeyPath returns absolute path to the TLS key
func (*Config) GetTLSRootCert ¶
func (c *Config) GetTLSRootCert() *x509.Certificate
GetTLSRootCert returns root TLS certificate
func (*Config) GetTLSRootCertPath ¶
GetTLSRootCertPath returns absolute path to the TLS root certificate
func (*Config) GetTxnSnapConfig ¶
GetTxnSnapConfig returns txnSnapConfig
type PeerConfigs ¶
type PeerConfigs []transactionsnapApi.PeerConfig
PeerConfigs represents a list of peers. It implements the sort interface
func (PeerConfigs) Len ¶
func (p PeerConfigs) Len() int
func (PeerConfigs) Less ¶
func (p PeerConfigs) Less(i, j int) bool
func (PeerConfigs) Swap ¶
func (p PeerConfigs) Swap(i, j int)