{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.0.6","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package config\n\n## Constants\n\n```go\nconst (\n\n\t// Prefix identifies the prefix for the orderer-related ENV vars.\n\tPrefix = \"ORDERER\"\n)\n```\n\n## Types\n\n```go\ntype Consumer struct {\n\tRetryBackoff time.Duration\n}\n```\nConsumer contains configuration for the consumer's retries when failing to read from a Kafa partition.\n\n```go\ntype FileLedger struct {\n\tLocation string\n\tPrefix   string\n}\n```\nFileLedger contains configuration for the file-based ledger.\n\n```go\ntype General struct {\n\tLedgerType     string\n\tListenAddress  string\n\tListenPort     uint16\n\tTLS            TLS\n\tGenesisMethod  string\n\tGenesisProfile string\n\tGenesisFile    string\n\tProfile        Profile\n\tLogLevel       string\n\tLogFormat      string\n\tLocalMSPDir    string\n\tLocalMSPID     string\n\tBCCSP          *bccsp.FactoryOpts\n}\n```\nGeneral contains config which should be common among all orderer types.\n\n```go\ntype Kafka struct {\n\tRetry   Retry\n\tVerbose bool\n\tVersion sarama.KafkaVersion // TODO Move this to global config\n\tTLS     TLS\n}\n```\nKafka contains configuration for the Kafka-based orderer.\n\n```go\ntype Metadata struct {\n\tRetryMax     int\n\tRetryBackoff time.Duration\n}\n```\nMetadata contains configuration for the metadata requests to the Kafka cluster.\n\n```go\ntype NetworkTimeouts struct {\n\tDialTimeout  time.Duration\n\tReadTimeout  time.Duration\n\tWriteTimeout time.Duration\n}\n```\nNetworkTimeouts contains the socket timeouts for network requests to the Kafka cluster.\n\n```go\ntype Producer struct {\n\tRetryMax     int\n\tRetryBackoff time.Duration\n}\n```\nProducer contains configuration for the producer's retries when failing to post a message to a Kafka partition.\n\n```go\ntype Profile struct {\n\tEnabled bool\n\tAddress string\n}\n```\nProfile contains configuration for Go pprof profiling.\n\n```go\ntype RAMLedger struct {\n\tHistorySize uint\n}\n```\nRAMLedger contains configuration for the RAM ledger.\n\n```go\ntype Retry struct {\n\tShortInterval   time.Duration\n\tShortTotal      time.Duration\n\tLongInterval    time.Duration\n\tLongTotal       time.Duration\n\tNetworkTimeouts NetworkTimeouts\n\tMetadata        Metadata\n\tProducer        Producer\n\tConsumer        Consumer\n}\n```\nRetry 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).\n\n```go\ntype TLS struct {\n\tEnabled           bool\n\tPrivateKey        string\n\tCertificate       string\n\tRootCAs           []string\n\tClientAuthEnabled bool\n\tClientRootCAs     []string\n}\n```\nTLS contains config for TLS connections.\n\n```go\ntype TopLevel struct {\n\tGeneral    General\n\tFileLedger FileLedger\n\tRAMLedger  RAMLedger\n\tKafka      Kafka\n}\n```\nTopLevel 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](https://github.com/spf13/viper) for more info\n\n```go\nfunc Load() *TopLevel\n```\nLoad parses the orderer.yaml file and environment, producing a struct suitable for config use\n\n","path":"github.com/eric-erki/https-hyperledger.org/orderer/localconfig","name":"config","synopsis":"","isRedistributable":true}
