config

package
v1.0.0-preview Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Prefix string = "ORDERER"

Prefix is the default config prefix for the orderer

Variables

This section is empty.

Functions

func ExactWithDateUnmarshal

func ExactWithDateUnmarshal(v *viper.Viper, output interface{}) error

ExactWithDateUnmarshal is intended to unmarshal a config file into a structure producing error when extraneous variables are introduced and supporting the time.Duration type

Types

type BatchSize

type BatchSize struct {
	MaxMessageCount   uint32
	AbsoluteMaxBytes  uint32
	PreferredMaxBytes uint32
}

BatchSize contains configuration affecting the size of batches

type FileLedger

type FileLedger struct {
	Location string
	Prefix   string
}

FileLedger contains config for the File ledger

type General

type General struct {
	LedgerType    string
	QueueSize     uint32
	MaxWindowSize uint32
	ListenAddress string
	ListenPort    uint16
	TLS           TLS
	GenesisMethod string
	GenesisFile   string
	Profile       Profile
	LogLevel      string
	LocalMSPDir   string
}

General contains config which should be common among all orderer types

type Genesis

type Genesis struct {
	OrdererType  string
	BatchTimeout time.Duration
	BatchSize    BatchSize
}

Genesis contains config which is used by the provisional bootstrapper

type Kafka

type Kafka struct {
	Brokers []string // TODO This should be deprecated and this information should be stored in the config block
	Retry   Retry
	Verbose bool
	Version sarama.KafkaVersion
}

Kafka contains config for the Kafka 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 config 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 Sbft

type Sbft struct {
	PeerCommAddr       string
	CertFile           string
	KeyFile            string
	DataDir            string
	N                  uint64
	F                  uint64
	BatchDurationNsec  uint64
	BatchSizeBytes     uint64
	RequestTimeoutNsec uint64
	Peers              map[string]string // Address to Cert mapping
}

Sbft contains config for the SBFT orderer

type TLS

type TLS struct {
	Enabled           bool
	ServerKey         string
	ServerCertificate string
	ServerRootCAs     []string
	ClientAuthEnabled bool
	ClientRootCAs     []string
}

TLS contains config used to configure TLS for the grpc server

type TopLevel

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

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