config

package
v1.0.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Prefix identifies the prefix for the orderer-related ENV vars.
	Prefix = "ORDERER"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLedger

type FileLedger struct {
	Location string
	Prefix   string
}

FileLedger contains configuration for the file-based ledger.

type General

type General struct {
	LedgerType     string
	ListenAddress  string
	ListenPort     uint16
	TLS            TLS
	GenesisMethod  string
	GenesisProfile string
	GenesisFile    string
	Profile        Profile
	LogLevel       string
	LocalMSPDir    string
	LocalMSPID     string
	BCCSP          *bccsp.FactoryOpts
}

General contains config which should be common among all orderer types.

type Genesis

type Genesis struct {
	DeprecatedBatchTimeout time.Duration
	DeprecatedBatchSize    uint32
	SbftShared             SbftShared
}

Genesis is a deprecated structure which was used to put values into the genesis block, but this is now handled elsewhere. SBFT did not reference these values via the genesis block however so it is being left here for backwards compatibility purposes.

type Kafka

type Kafka struct {
	Retry   Retry
	Verbose bool
	Version sarama.KafkaVersion // TODO Move this to global config
	TLS     TLS
}

Kafka contains configuration for the Kafka-based orderer.

type Profile

type Profile struct {
	Enabled bool
	Address string
}

Profile contains configuration for Go pprof profiling.

type RAMLedger

type RAMLedger struct {
	HistorySize uint
}

RAMLedger contains configuration for the RAM ledger.

type Retry

type Retry struct {
	Period time.Duration
	Stop   time.Duration
}

Retry contains config for the reconnection attempts to the Kafka brokers.

type SbftLocal

type SbftLocal struct {
	PeerCommAddr string
	CertFile     string
	KeyFile      string
	DataDir      string
}

SbftLocal contains configuration for the SBFT peer/replica.

type SbftShared

type SbftShared struct {
	N                  uint64
	F                  uint64
	RequestTimeoutNsec uint64
	Peers              map[string]string // Address to Cert mapping
}

SbftShared contains config for the SBFT network.

type TLS

type TLS struct {
	Enabled           bool
	PrivateKey        string
	Certificate       string
	RootCAs           []string
	ClientAuthEnabled bool
	ClientRootCAs     []string
}

TLS contains config for TLS connections.

type TopLevel

type TopLevel struct {
	General    General
	FileLedger FileLedger
	RAMLedger  RAMLedger
	Kafka      Kafka
	Genesis    Genesis
	SbftLocal  SbftLocal
}

TopLevel directly corresponds to the orderer config YAML. Note, for non 1-1 mappings, you may append something like `mapstructure:"weirdFoRMat"` to modify the default mapping, see the "Unmarshal" section of https://github.com/spf13/viper for more info

func Load

func Load() *TopLevel

Load parses the orderer.yaml file and environment, producing a struct suitable for config use

Jump to

Keyboard shortcuts

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