config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: MIT Imports: 6 Imported by: 2

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"`
	Orderer   ConnectionConfig `yaml:"orderer"`
	Discovery DiscoveryConfig  `yaml:"discovery"`
	MSP       []MSPConfig      `yaml:"msp"`
	Pool      PoolConfig       `yaml:"pool"`
}

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 DiscoveryConfig

type DiscoveryConfig struct {
	Type    string              `yaml:"type"`
	Options DiscoveryConfigOpts `yaml:"options"`
}

type DiscoveryConfigOpts

type DiscoveryConfigOpts map[string]interface{}

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 OrdererConfig

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

type PoolConfig

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

type TlsConfig

type TlsConfig struct {
	Enabled      bool   `yaml:"enabled"`
	HostOverride string `yaml:"host_override"`
	CertPath     string `yaml:"cert_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