Documentation ¶
Index ¶
- Constants
- Variables
- func Flatten(i interface{}) []string
- type Authentication
- type ChannelParticipation
- type Cluster
- type Consumer
- type Debug
- type FileLedger
- type General
- type Kafka
- type Keepalive
- type Metadata
- type Metrics
- type NetworkTimeouts
- type Operations
- type Producer
- type Profile
- type Retry
- type SASLPlain
- type Statsd
- type TLS
- type TopLevel
- type Topic
Constants ¶
const Prefix = "ORDERER"
Prefix for environment variables.
Variables ¶
var Defaults = TopLevel{ General: General{ ListenAddress: "127.0.0.1", ListenPort: 7050, BootstrapMethod: "file", BootstrapFile: "genesisblock", Profile: Profile{ Enabled: false, Address: "0.0.0.0:6060", }, Cluster: Cluster{ ReplicationMaxRetries: 12, RPCTimeout: time.Second * 7, DialTimeout: time.Second * 5, ReplicationBufferSize: 20971520, SendBufferSize: 10, ReplicationBackgroundRefreshInterval: time.Minute * 5, ReplicationRetryTimeout: time.Second * 5, ReplicationPullTimeout: time.Second * 5, CertExpirationWarningThreshold: time.Hour * 24 * 7, }, LocalMSPDir: "msp", LocalMSPID: "SampleOrg", BCCSP: bccsp.GetDefaultOpts(), Authentication: Authentication{ TimeWindow: time.Duration(15 * time.Minute), }, }, FileLedger: FileLedger{ Location: "/var/hyperledger/production/orderer", Prefix: "hyperledger-fabric-ordererledger", }, Kafka: Kafka{ Retry: Retry{ ShortInterval: 1 * time.Minute, ShortTotal: 10 * time.Minute, LongInterval: 10 * time.Minute, LongTotal: 12 * time.Hour, NetworkTimeouts: NetworkTimeouts{ DialTimeout: 30 * time.Second, ReadTimeout: 30 * time.Second, WriteTimeout: 30 * time.Second, }, Metadata: Metadata{ RetryBackoff: 250 * time.Millisecond, RetryMax: 3, }, Producer: Producer{ RetryBackoff: 100 * time.Millisecond, RetryMax: 3, }, Consumer: Consumer{ RetryBackoff: 2 * time.Second, }, }, Verbose: false, Version: sarama.V0_10_2_0, TLS: TLS{ Enabled: false, }, Topic: Topic{ ReplicationFactor: 3, }, }, Debug: Debug{ BroadcastTraceDir: "", DeliverTraceDir: "", }, Operations: Operations{ ListenAddress: "127.0.0.1:0", }, Metrics: Metrics{ Provider: "disabled", }, ChannelParticipation: ChannelParticipation{ Enabled: false, RemoveStorage: false, }, }
Defaults carries the default orderer configuration values.
Functions ¶
Types ¶
type Authentication ¶
Authentication contains configuration parameters related to authenticating client messages.
type ChannelParticipation ¶
type ChannelParticipation struct { Enabled bool RemoveStorage bool // Whether to permanently remove storage on channel removal. }
ChannelParticipation provides the channel participation API configuration for the orderer. Channel participation uses the same ListenAddress and TLS settings of the Operations service.
type Cluster ¶
type Cluster struct { ListenAddress string ListenPort uint16 ServerCertificate string ServerPrivateKey string ClientCertificate string ClientPrivateKey string RootCAs []string DialTimeout time.Duration RPCTimeout time.Duration ReplicationBufferSize int ReplicationPullTimeout time.Duration ReplicationRetryTimeout time.Duration ReplicationBackgroundRefreshInterval time.Duration ReplicationMaxRetries int SendBufferSize int CertExpirationWarningThreshold time.Duration TLSHandshakeTimeShift time.Duration }
type Consumer ¶
Consumer contains configuration for the consumer's retries when failing to read from a Kafa partition.
type FileLedger ¶
FileLedger contains configuration for the file-based ledger.
type General ¶
type General struct { ListenAddress string ListenPort uint16 TLS TLS Cluster Cluster Keepalive Keepalive ConnectionTimeout time.Duration GenesisMethod string // For compatibility only, will be replaced by BootstrapMethod GenesisFile string // For compatibility only, will be replaced by BootstrapFile BootstrapMethod string BootstrapFile string Profile Profile LocalMSPDir string LocalMSPID string BCCSP *bccsp.FactoryOpts Authentication Authentication }
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 SASLPlain SASLPlain Topic Topic }
Kafka contains configuration for the Kafka-based orderer.
type Keepalive ¶
type Keepalive struct { ServerMinInterval time.Duration ServerInterval time.Duration ServerTimeout time.Duration }
Keepalive contains configuration for gRPC servers.
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 Operations ¶
Operations configures the operations endpoint for the orderer.
type Producer ¶
Producer contains configuration for the producer's retries when failing to post a message to a Kafka partition.
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 ClientAuthRequired bool ClientRootCAs []string TLSHandshakeTimeShift time.Duration }
TLS contains configuration for TLS connections.
type TopLevel ¶
type TopLevel struct { General General FileLedger FileLedger Kafka Kafka Debug Debug Consensus interface{} Operations Operations Metrics Metrics ChannelParticipation ChannelParticipation }
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.