config

package
v0.1.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(peerConfigPath string, channelID string) (transactionsnapApi.Config, error)

NewConfig returns config struct

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config implements Config interface

func (*Config) GetConfigBytes

func (c *Config) GetConfigBytes() []byte

GetConfigBytes returns config bytes

func (*Config) GetConfigPath

func (c *Config) GetConfigPath(path string) string

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

func (c *Config) GetCryptoProvider() (string, error)

GetCryptoProvider returns crypto provider name from peer config

func (*Config) GetEndorserSelectionInterval

func (c *Config) GetEndorserSelectionInterval() time.Duration

GetEndorserSelectionInterval is the amount of time to wait between attempts at retrieving at least one endorsing peer group.

func (*Config) GetEndorserSelectionMaxAttempts

func (c *Config) GetEndorserSelectionMaxAttempts() int

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

func (c *Config) GetGRPCProtocol() string

GetGRPCProtocol to get grpc protocol

func (*Config) GetHandlerTimeout

func (c *Config) GetHandlerTimeout() time.Duration

GetHandlerTimeout is the amount of time to wait for sdk handler

func (*Config) GetLocalPeer

func (c *Config) GetLocalPeer() (*transactionsnapApi.PeerConfig, error)

GetLocalPeer returns address and ports for the peer running inside the txn snap container

func (*Config) GetMspConfigPath

func (c *Config) GetMspConfigPath() string

GetMspConfigPath returns the MSP config path for peer

func (*Config) GetMspID

func (c *Config) GetMspID() string

GetMspID returns the MSP ID for the local peer

func (*Config) GetPeerConfig

func (c *Config) GetPeerConfig() *viper.Viper

GetPeerConfig to get peers

func (*Config) GetTLSCert

func (c *Config) GetTLSCert() *x509.Certificate

GetTLSCert returns client TLS certificate

func (*Config) GetTLSCertPath

func (c *Config) GetTLSCertPath() string

GetTLSCertPath returns absolute path to the TLS certificate

func (*Config) GetTLSCertPem

func (c *Config) GetTLSCertPem() []byte

GetTLSCertPem returns client TLS certificate pem

func (*Config) GetTLSKeyPath

func (c *Config) GetTLSKeyPath() string

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

func (c *Config) GetTLSRootCertPath() string

GetTLSRootCertPath returns absolute path to the TLS root certificate

func (*Config) GetTxnSnapConfig

func (c *Config) GetTxnSnapConfig() *viper.Viper

GetTxnSnapConfig returns txnSnapConfig

func (*Config) RetryOnCCError added in v0.1.14

func (c *Config) RetryOnCCError() bool

RetryOnCCError configuration for chaincode error retry

func (*Config) RetryOpts

func (c *Config) RetryOpts() retry.Opts

RetryOpts transaction snap retry options

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL