Documentation
¶
Index ¶
- Constants
- Variables
- type Authentication
- 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 RAMLedger
- type Retry
- type SASLPlain
- type Statsd
- type TLS
- type TopLevel
- type Topic
Constants ¶
View Source
const Prefix = "ORDERER"
环境变量的前缀。
Variables ¶
View Source
var Defaults = TopLevel{ General: General{ LedgerType: "file", ListenAddress: "127.0.0.1", ListenPort: 7050, GenesisMethod: "provisional", GenesisProfile: "SampleSingleMSPSolo", SystemChannel: "test-system-channel-name", GenesisFile: "genesisblock", Profile: Profile{ Enabled: false, Address: "0.0.0.0:6060", }, LocalMSPDir: "msp", LocalMSPID: "SampleOrg", BCCSP: bccsp.GetDefaultOpts(), Authentication: Authentication{ TimeWindow: time.Duration(15 * time.Minute), }, }, RAMLedger: RAMLedger{ HistorySize: 10000, }, 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", }, }
默认值包含默认的订购者配置值。
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
身份验证包含与身份验证相关的配置参数 客户端消息。
type FileLedger ¶
file ledger包含基于文件的分类帐的配置。
type General ¶
type General struct { LedgerType string ListenAddress string ListenPort uint16 TLS TLS Cluster Cluster Keepalive Keepalive GenesisMethod string GenesisProfile string SystemChannel string GenesisFile string Profile Profile LocalMSPDir string LocalMSPID string BCCSP *bccsp.FactoryOpts Authentication Authentication }
General包含在所有排序器类型中应该是通用的配置。
type Kafka ¶
type Kafka struct { Retry Retry Verbose bool Version sarama.KafkaVersion //TODO将此移动到全局配置 TLS TLS SASLPlain SASLPlain Topic Topic }
Kafka包含基于Kafka的医嘱者的配置。
type Keepalive ¶
type Keepalive struct { ServerMinInterval time.Duration ServerInterval time.Duration ServerTimeout time.Duration }
keepalive包含GRPC服务器的配置。
type NetworkTimeouts ¶
type NetworkTimeouts struct { DialTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration }
NetworkTimeouts包含网络请求的套接字超时 卡夫卡簇。
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 }
重试包含与重试和超时相关的配置,当 无法建立到Kafka群集的连接,或者当元数据 需要重复请求(因为集群位于 领袖选举)。
type TLS ¶
type TLS struct { Enabled bool PrivateKey string Certificate string RootCAs []string ClientAuthRequired bool ClientRootCAs []string }
TLS包含TLS连接的配置。
type TopLevel ¶
type TopLevel struct { General General FileLedger FileLedger RAMLedger RAMLedger Kafka Kafka Debug Debug Consensus interface{} Operations Operations Metrics Metrics }
顶层直接对应于订购者配置yaml。 注意,对于非1-1映射,可以附加 类似于'mapstructure:“weirdformat”`to 修改默认映射,请参见“取消标记” 更多信息,请访问https://github.com/spf13/viper。
Click to show internal directories.
Click to hide internal directories.