v1.0.6 Latest Latest

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

Go to latest
Published: Feb 18, 2018 License: Apache-2.0 Imports: 10 Imported by: 0




View Source
const (

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


This section is empty.


This section is empty.


type Consumer

type Consumer struct {
	RetryBackoff time.Duration

Consumer contains configuration for the consumer's retries when failing to read from a Kafa partition.

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
	LogFormat      string
	LocalMSPDir    string
	LocalMSPID     string
	BCCSP          *bccsp.FactoryOpts

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

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 Metadata

type Metadata struct {
	RetryMax     int
	RetryBackoff time.Duration

Metadata contains configuration for the metadata requests to the Kafka cluster.

type NetworkTimeouts

type NetworkTimeouts struct {
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration

NetworkTimeouts contains the socket timeouts for network requests to the Kafka cluster.

type Producer

type Producer struct {
	RetryMax     int
	RetryBackoff time.Duration

Producer contains configuration for the producer's retries when failing to post a message to a Kafka partition.

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 {
	ShortInterval   time.Duration
	ShortTotal      time.Duration
	LongInterval    time.Duration
	LongTotal       time.Duration
	NetworkTimeouts NetworkTimeouts
	Metadata        Metadata
	Producer        Producer
	Consumer        Consumer

Retry contains configuration related to retries and timeouts when the connection to the Kafka cluster cannot be established, or when Metadata requests needs to be repeated (because the cluster is in the middle of a leader election).

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

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 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