config

package
v0.4.33 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBCCSPProvider added in v0.1.9

func GetBCCSPProvider(peerConfigPathOverride string) (string, errors.Error)

GetBCCSPProvider get default BCCSP provider from the peer config

func GetDefaultRefreshInterval added in v0.1.5

func GetDefaultRefreshInterval() time.Duration

GetDefaultRefreshInterval get default interval

func GetMinimumRefreshInterval added in v0.1.5

func GetMinimumRefreshInterval() time.Duration

GetMinimumRefreshInterval get minimum refresh interval

func GetPeerID added in v0.1.5

func GetPeerID(peerConfigPathOverride string) (string, errors.Error)

GetPeerID returns peerID

func GetPeerMSPID added in v0.1.5

func GetPeerMSPID(peerConfigPathOverride string) (string, errors.Error)

GetPeerMSPID returns peerMspID

Types

type CSRConfig added in v0.1.5

type CSRConfig struct {
	CommonName     string
	Country        string
	StateProvince  string
	Locality       string
	Org            string
	OrgUnit        string
	DNSNames       []string
	EmailAddresses []string
	IPAddresses    []net.IP
}

CSRConfig used to pass CSR configuration parameters

func GetCSRConfigOptions added in v0.1.5

func GetCSRConfigOptions(channelID string, peerConfigPath string) (*CSRConfig, error)

GetCSRConfigOptions to pass CSR config opts

type Config

type Config struct {
	// PeerID is the local ID of the peer
	PeerID string
	// PeerMspID is the MSP ID of the local peer
	PeerMspID string
	//cache refresh interval
	RefreshInterval  time.Duration
	ConfigSnapConfig *viper.Viper
}

Config contains the configuration for the config snap

func New

func New(channelID, peerConfigPathOverride string) (*Config, errors.Error)

New returns a new config snap configuration for the given channel

Jump to

Keyboard shortcuts

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