Documentation ¶
Index ¶
- func NewConfig(peerConfigPath string, channelID string) (transactionsnapApi.Config, error)
- type Config
- func (c *Config) GetCommitTimeout() time.Duration
- func (c *Config) GetConfigBytes() []byte
- func (c *Config) GetConfigPath(path string) string
- func (c *Config) GetCryptoProvider() (string, error)
- func (c *Config) GetEndorsementMaxAttempts() int
- func (c *Config) GetEndorsementRetryInterval() time.Duration
- func (c *Config) GetEndorserSelectionInterval() time.Duration
- func (c *Config) GetEndorserSelectionMaxAttempts() int
- func (c *Config) GetGRPCProtocol() string
- func (c *Config) GetLocalPeer() (*transactionsnapApi.PeerConfig, 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) GetTLSKeyPath() string
- func (c *Config) GetTLSRootCert() *x509.Certificate
- func (c *Config) GetTLSRootCertPath() string
- func (c *Config) GetTxnSnapConfig() *viper.Viper
- type PeerConfigs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.1.2
type Config struct {
// contains filtered or unexported fields
}
Config implements Config interface
func (*Config) GetCommitTimeout ¶ added in v0.1.5
GetCommitTimeout is the amount of time to wait for a commit.
func (*Config) GetConfigBytes ¶ added in v0.1.2
GetConfigBytes returns config bytes
func (*Config) GetConfigPath ¶ added in v0.1.2
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 ¶ added in v0.1.9
GetCryptoProvider returns crypto provider name from peer config
func (*Config) GetEndorsementMaxAttempts ¶ added in v0.1.5
GetEndorsementMaxAttempts returns the maximum number of attempts at successful endorsements.
func (*Config) GetEndorsementRetryInterval ¶ added in v0.1.5
GetEndorsementRetryInterval is the amount of time to wait between attempts at endorsements.
func (*Config) GetEndorserSelectionInterval ¶ added in v0.1.4
GetEndorserSelectionInterval is the amount of time to wait between attempts at retrieving at least one endorsing peer group.
func (*Config) GetEndorserSelectionMaxAttempts ¶ added in v0.1.4
GetEndorserSelectionMaxAttempts returns the maximum number of attempts at retrieving at least one endorsing peer group, while waiting the specified interval between attempts.
func (*Config) GetGRPCProtocol ¶ added in v0.1.2
GetGRPCProtocol to get grpc protocol
func (*Config) GetLocalPeer ¶ added in v0.1.2
func (c *Config) GetLocalPeer() (*transactionsnapApi.PeerConfig, error)
GetLocalPeer returns address and ports for the peer running inside the txn snap container
func (*Config) GetMspConfigPath ¶ added in v0.1.2
GetMspConfigPath returns the MSP config path for peer
func (*Config) GetPeerConfig ¶ added in v0.1.2
GetPeerConfig to get peers
func (*Config) GetTLSCert ¶ added in v0.1.9
func (c *Config) GetTLSCert() *x509.Certificate
GetTLSCert returns client TLS certificate
func (*Config) GetTLSCertPath ¶ added in v0.1.2
GetTLSCertPath returns absolute path to the TLS certificate
func (*Config) GetTLSKeyPath ¶ added in v0.1.2
GetTLSKeyPath returns absolute path to the TLS key
func (*Config) GetTLSRootCert ¶ added in v0.1.9
func (c *Config) GetTLSRootCert() *x509.Certificate
GetTLSRootCert returns root TLS certificate
func (*Config) GetTLSRootCertPath ¶ added in v0.1.2
GetTLSRootCertPath returns absolute path to the TLS root certificate
func (*Config) GetTxnSnapConfig ¶ added in v0.1.2
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)