config

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const KafkaTLSProtocolFlag = "TLS"

KafkaTLSProtocolFlag informs service to use TLS protocol for kafka

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AwsRegion                  string        `envconfig:"AWS_REGION"`
	AwsService                 string        `envconfig:"AWS_SERVICE"`
	BindAddr                   string        `envconfig:"BIND_ADDR"`
	ElasticSearchAPIURL        string        `envconfig:"ELASTIC_SEARCH_URL"`
	GracefulShutdownTimeout    time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	HealthCheckInterval        time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	HierarchyAPIURL            string        `envconfig:"HIERARCHY_API_URL"`
	KafkaConfig                KafkaConfig
	MaxRetries                 int    `envconfig:"REQUEST_MAX_RETRIES"`
	SearchBuilderURL           string `envconfig:"SEARCH_BUILDER_URL"`
	SignElasticsearchRequests  bool   `envconfig:"SIGN_ELASTICSEARCH_REQUESTS"`
}

Config is the filing resource handler config

func Get

func Get() (*Config, error)

Get configures the application and returns the configuration

type KafkaConfig added in v1.9.0

type KafkaConfig struct {
	BindAddr           []string `envconfig:"KAFKA_ADDR"                 json:"-"`
	Version            string   `envconfig:"KAFKA_VERSION"`
	MaxBytes           string   `envconfig:"KAFKA_MAX_BYTES"`
	SecProtocol        string   `envconfig:"KAFKA_SEC_PROTO"`
	SecCACerts         string   `envconfig:"KAFKA_SEC_CA_CERTS"`
	SecClientCert      string   `envconfig:"KAFKA_SEC_CLIENT_CERT"`
	SecClientKey       string   `envconfig:"KAFKA_SEC_CLIENT_KEY"       json:"-"`
	SecSkipVerify      bool     `envconfig:"KAFKA_SEC_SKIP_VERIFY"`
	OffsetOldest       bool     `envconfig:"KAFKA_OFFSET_OLDEST"`
	ConsumerGroup      string   `envconfig:"CONSUMER_GROUP"`
	ConsumerTopic      string   `envconfig:"HIERARCHY_BUILT_TOPIC"`
	EventReporterTopic string   `envconfig:"EVENT_REPORTER_TOPIC"`
	ProducerTopic      string   `envconfig:"PRODUCER_TOPIC"`
}

KafkaConfig contains the config required to connect to Kafka

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL