config

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CAConfig

type CAConfig struct {
	Crypto CryptoConfig `yaml:"crypto"`
	Host   string       `yaml:"host"`
	Tls    TlsConfig    `yaml:"tls"`
}

type Config

type Config struct {
	Crypto CryptoConfig `yaml:"crypto"`
	// Deprecated: use Orderers.
	Orderer   *ConnectionConfig  `yaml:"orderer"`
	Orderers  []ConnectionConfig `yaml:"orderers"`
	Discovery DiscoveryConfig    `yaml:"discovery"`
	MSP       []MSPConfig        `yaml:"msp"`
	Pool      PoolConfig         `yaml:"pool"`
	// if tls is enabled maps TLS certs to discovered peers
	TLSCertsMap []TLSCertsMapperConfig `yaml:"tls_certs_map"`
}

func NewYamlConfig

func NewYamlConfig(configPath string) (*Config, error)

type ConnectionConfig

type ConnectionConfig struct {
	Host    string     `yaml:"host"`
	Tls     TlsConfig  `yaml:"tls"`
	GRPC    GRPCConfig `yaml:"grpc"`
	Timeout Duration   `yaml:"timeout"`
}

type CryptoConfig

type CryptoConfig struct {
	Type    string          `yaml:"type"`
	Options CryptoSuiteOpts `yaml:"options"`
}

type CryptoSuiteOpts

type CryptoSuiteOpts map[string]interface{}

type DiscoveryChaincode

type DiscoveryChaincode struct {
	Name    string `json:"chaincode_name" yaml:"name"`
	Version string `json:"version"`
	Policy  string `json:"policy"`
}

type DiscoveryChannel

type DiscoveryChannel struct {
	Name       string               `json:"channel_name" yaml:"name"`
	Chaincodes []DiscoveryChaincode `json:"chaincodes" yaml:"chaincodes"`
	Orderers   []ConnectionConfig   `json:"orderers" yaml:"orderers"`
}

type DiscoveryConfig

type DiscoveryConfig struct {
	Type string `yaml:"type"`
	// connection to local MSP which will be used for gossip discovery
	Connection *ConnectionConfig `yaml:"connection"`
	// configuration of channels/chaincodes in local(from config) discovery type
	Options DiscoveryConfigOpts `yaml:"options"`
}

type DiscoveryConfigOpts

type DiscoveryConfigOpts map[string]interface{}

DiscoveryConfigOpts - channel configuration for local config contains []DiscoveryChannel

type Duration

type Duration struct {
	time.Duration
}

func (*Duration) UnmarshalYAML

func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error

type GRPCConfig

type GRPCConfig struct {
	KeepAlive *GRPCKeepAliveConfig `yaml:"keep_alive"`
	Retry     *GRPCRetryConfig     `yaml:"retry"`
}

type GRPCKeepAliveConfig

type GRPCKeepAliveConfig struct {
	// See keepalive.ClientParameters.Time, current value in seconds, default: 1 min.
	Time int `yaml:"time" default:"60"`
	// See keepalive.ClientParameters.Timeout, current value in seconds, default: 20 sec.
	Timeout int `yaml:"timeout" default:"20"`
}

type GRPCRetryConfig

type GRPCRetryConfig struct {
	// Count for max retries
	Max uint `yaml:"max"`
	// Timeout is used for back-off
	Timeout Duration `yaml:"timeout"`
}

type MSPConfig

type MSPConfig struct {
	Name      string             `yaml:"name"`
	Endorsers []ConnectionConfig `yaml:"endorsers"`
}

type PoolConfig

type PoolConfig struct {
	DeliverTimeout Duration `yaml:"deliver_timeout"`
}

type TLSCertsMapperConfig

type TLSCertsMapperConfig struct {
	Address   string    `yaml:"address"`
	TlsConfig TlsConfig `yaml:"tls"`
}

type TlsConfig

type TlsConfig struct {
	Enabled      bool   `yaml:"enabled"`
	SkipVerify   bool   `yaml:"skip_verify"`
	HostOverride string `yaml:"host_override"`
	CertPath     string `yaml:"cert_path"`
	KeyPath      string `yaml:"key_path"`
	CACertPath   string `yaml:"ca_cert_path"`
}

Jump to

Keyboard shortcuts

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