github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/integration/nwo/fabricconfig/orderer.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package fabricconfig 8 9 import "time" 10 11 type Orderer struct { 12 General *General `yaml:"General,omitempty"` 13 FileLedger *FileLedger `yaml:"FileLedger,omitempty"` 14 Kafka *Kafka `yaml:"Kafka,omitempty"` 15 Operations *OrdererOperations `yaml:"Operations,omitempty"` 16 ChannelParticipation *ChannelParticipation `yaml:"ChannelParticipation,omitempty"` 17 Consensus map[string]string `yaml:"Consensus,omitempty"` 18 19 ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` 20 } 21 22 type General struct { 23 ListenAddress string `yaml:"ListenAddress,omitempty"` 24 ListenPort uint16 `yaml:"ListenPort,omitempty"` 25 TLS *OrdererTLS `yaml:"TLS,omitempty"` 26 Keepalive *OrdererKeepalive `yaml:"Keepalive,omitempty"` 27 BootstrapMethod string `yaml:"BootstrapMethod,omitempty"` 28 GenesisProfile string `yaml:"GenesisProfile,omitempty"` 29 GenesisFile string `yaml:"GenesisFile,omitempty"` // will be replaced by the BootstrapFile 30 BootstrapFile string `yaml:"BootstrapFile,omitempty"` 31 LocalMSPDir string `yaml:"LocalMSPDir,omitempty"` 32 LocalMSPID string `yaml:"LocalMSPID,omitempty"` 33 Profile *OrdererProfile `yaml:"Profile,omitempty"` 34 BCCSP *BCCSP `yaml:"BCCSP,omitempty"` 35 Authentication *OrdererAuthentication `yaml:"Authentication,omitempty"` 36 Cluster *Cluster `yaml:"Cluster,omitempty"` 37 38 ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` 39 } 40 41 type Cluster struct { 42 ListenAddress string `yaml:"ListenAddress,omitempty"` 43 ListenPort uint16 `yaml:"ListenPort,omitempty"` 44 ServerCertificate string `yaml:"ServerCertificate,omitempty"` 45 ServerPrivateKey string `yaml:"ServerPrivateKey,omitempty"` 46 ClientCertificate string `yaml:"ClientCertificate,omitempty"` 47 ClientPrivateKey string `yaml:"ClientPrivateKey,omitempty"` 48 RootCAs []string `yaml:"RootCAs,omitempty"` 49 DialTimeout time.Duration `yaml:"DialTimeout,omitempty"` 50 RPCTimeout time.Duration `yaml:"RPCTimeout,omitempty"` 51 ReplicationBufferSize int `yaml:"ReplicationBufferSize,omitempty"` 52 ReplicationPullTimeout time.Duration `yaml:"ReplicationPullTimeout,omitempty"` 53 ReplicationRetryTimeout time.Duration `yaml:"ReplicationRetryTimeout,omitempty"` 54 ReplicationBackgroundRefreshInterval time.Duration `yaml:"ReplicationBackgroundRefreshInterval,omitempty"` 55 ReplicationMaxRetries int `yaml:"ReplicationMaxRetries,omitempty"` 56 SendBufferSize int `yaml:"SendBufferSize,omitempty"` 57 CertExpirationWarningThreshold time.Duration `yaml:"CertExpirationWarningThreshold,omitempty"` 58 TLSHandshakeTimeShift time.Duration `yaml:"TLSHandshakeTimeShift,omitempty"` 59 } 60 61 type OrdererTLS struct { 62 Enabled bool `yaml:"Enabled"` 63 PrivateKey string `yaml:"PrivateKey,omitempty"` 64 Certificate string `yaml:"Certificate,omitempty"` 65 RootCAs []string `yaml:"RootCAs,omitempty"` 66 ClientAuthRequired bool `yaml:"ClientAuthRequired"` 67 ClientRootCAs []string `yaml:"ClientRootCAs,omitempty"` 68 TLSHandshakeTimeShift time.Duration `yaml:"TLSHandshakeTimeShift,omitempty"` 69 } 70 71 type OrdererSASLPlain struct { 72 Enabled bool `yaml:"Enabled"` 73 User string `yaml:"User,omitempty"` 74 Password string `yaml:"Password,omitempty"` 75 } 76 77 type OrdererKeepalive struct { 78 ServerMinInterval time.Duration `yaml:"ServerMinInterval,omitempty"` 79 ServerInterval time.Duration `yaml:"ServerInterval,omitempty"` 80 ServerTimeout time.Duration `yaml:"ServerTimeout,omitempty"` 81 } 82 83 type OrdererProfile struct { 84 Enabled bool `yaml:"Enabled"` 85 Address string `yaml:"Address,omitempty"` 86 } 87 88 type OrdererAuthentication struct { 89 TimeWindow time.Duration `yaml:"TimeWindow,omitempty"` 90 } 91 92 type OrdererTopic struct { 93 ReplicationFactor int16 94 } 95 96 type FileLedger struct { 97 Location string `yaml:"Location,omitempty"` 98 Prefix string `yaml:"Prefix,omitempty"` 99 } 100 101 type Kafka struct { 102 Retry *Retry `yaml:"Retry,omitempty"` 103 Verbose bool `yaml:"Verbose"` 104 TLS *OrdererTLS `yaml:"TLS,omitempty"` 105 SASLPlain *OrdererSASLPlain `yaml:"SASLPlain,omitempty"` 106 Topic *OrdererTopic `yaml:"Topic,omitempty"` 107 } 108 109 type Retry struct { 110 ShortInterval time.Duration `yaml:"ShortInterval,omitempty"` 111 ShortTotal time.Duration `yaml:"ShortTotal,omitempty"` 112 LongInterval time.Duration `yaml:"LongInterval,omitempty"` 113 LongTotal time.Duration `yaml:"LongTotal,omitempty"` 114 NetworkTimeouts *NetworkTimeouts `yaml:"NetworkTimeouts,omitempty"` 115 Metadata *Backoff `yaml:"Metadata,omitempty"` 116 Producer *Backoff `yaml:"Producer,omitempty"` 117 Consumer *Backoff `yaml:"Consumer,omitempty"` 118 } 119 120 type NetworkTimeouts struct { 121 DialTimeout time.Duration `yaml:"DialTimeout,omitempty"` 122 ReadTimeout time.Duration `yaml:"ReadTimeout,omitempty"` 123 WriteTimeout time.Duration `yaml:"WriteTimeout,omitempty"` 124 } 125 126 type Backoff struct { 127 RetryBackoff time.Duration `yaml:"RetryBackoff,omitempty"` 128 RetryMax int `yaml:"RetryMax,omitempty"` 129 } 130 131 type OrdererOperations struct { 132 ListenAddress string `yaml:"ListenAddress,omitempty"` 133 Metrics *OrdererMetrics `yaml:"Metrics,omitempty"` 134 TLS *OrdererTLS `yaml:"TLS"` 135 } 136 137 type OrdererMetrics struct { 138 Provider string `yaml:"Provider"` 139 Statsd *OrdererStatsd `yaml:"Statsd,omitempty"` 140 } 141 142 type OrdererStatsd struct { 143 Network string `yaml:"Network,omitempty"` 144 Address string `yaml:"Address,omitempty"` 145 WriteInterval time.Duration `yaml:"WriteInterval,omitempty"` 146 Prefix string `yaml:"Prefix,omitempty"` 147 } 148 149 type ChannelParticipation struct { 150 Enabled bool `yaml:"Enabled"` 151 }