Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CobraInit ¶
func CobraInit(cmd *cobra.Command, conf *RESTGatewayConf)
CobraInitRPC sets the standard command-line parameters for RPC
Types ¶
type EventstreamConf ¶
type EventstreamConf struct { PollingIntervalSec int `mapstructure:"pollingInterval"` WebhooksAllowPrivateIPs bool `json:"webhooksAllowPrivateIPs,omitempty"` LevelDB LevelDBReceiptsConf `mapstructure:"leveldb"` }
type KafkaConf ¶
type KafkaConf struct { Brokers []string `mapstructure:"brokers"` ClientID string `mapstructure:"clientID"` ConsumerGroup string `mapstructure:"consumerGroup"` TopicIn string `mapstructure:"topicIn"` TopicOut string `mapstructure:"topicOut"` ProducerFlush struct { Frequency int `mapstructure:"frequency"` Messages int `mapstructure:"messages"` Bytes int `mapstructure:"bytes"` } `mapstructure:"producerFlush"` SASL struct { Username string Password string } `mapstructure:"sasl"` TLS TLSConfig `mapstructure:"tls"` }
KafkaConf - Common configuration for Kafka
type LevelDBReceiptsConf ¶
type LevelDBReceiptsConf struct {
Path string `mapstructure:"path"`
}
type MongoDBReceiptsConf ¶
type MongoDBReceiptsConf struct { URL string `mapstructure:"url"` Database string `mapstructure:"database"` Collection string `mapstructure:"collection"` ConnectTimeoutMS int `mapstructure:"connectTimeout"` }
MongoDBReceiptStoreConf is the configuration for a MongoDB receipt store
type RESTGatewayConf ¶
type RESTGatewayConf struct { MaxInFlight int `mapstructure:"maxInFlight"` MaxTXWaitTime int `mapstructure:"maxTXWaitTime"` SendConcurrency int `mapstructure:"sendConcurrency"` Kafka KafkaConf `mapstructure:"kafka"` Receipts ReceiptsDBConf `mapstructure:"receipts"` Events EventstreamConf `mapstructure:"events"` HTTP HTTPConf `mapstructure:"http"` RPC RPCConf `mapstructure:"rpc"` }
RESTGatewayConf defines the YAML config structure
type RPCConf ¶
type RPCConf struct { // whether to use the Gateway client in the SDK or // relying on the static network described by CCP only UseGatewayClient bool `mapstructure:"useGatewayClient"` // whether to use the Gateway server with a lightweight SDK // only applicable to Fabric node 2.4 or later UseGatewayServer bool `mapstructure:"useGatewayServer"` ConfigPath string `mapstructure:"configPath"` }
type ReceiptsDBConf ¶
type ReceiptsDBConf struct { MaxDocs int `mapstructure:"maxDocs"` QueryLimit int `mapstructure:"queryLimit"` RetryInitialDelayMS int `mapstructure:"retryInitialDelay"` RetryTimeoutMS int `mapstructure:"retryTimeout"` MongoDB MongoDBReceiptsConf `mapstructure:"mongodb"` LevelDB LevelDBReceiptsConf `mapstructure:"leveldb"` }
type TLSConfig ¶
type TLSConfig struct { ClientCertsFile string `mapstructure:"clientCertsFile"` ClientKeyFile string `mapstructure:"clientKeyFile"` CACertsFile string `mapstructure:"caCertsFile"` Enabled bool `mapstructure:"enabled"` InsecureSkipVerify bool `mapstructure:"insecureSkipVerify"` }
TLSConfig is the common TLS config
Click to show internal directories.
Click to hide internal directories.