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