config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const KafkaTLSProtocol = "TLS"

KafkaTLSProtocol informs service to use TLS protocol for kafka

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr                   string        `envconfig:"BIND_ADDR"`
	EnableTopicTagging         bool          `envconfig:"TOPIC_TAGGING_ENABLED"`
	TopicCacheUpdateInterval   time.Duration `envconfig:"TOPIC_CACHE_UPDATE_INTERVAL"`
	TopicAPIURL                string        `envconfig:"TOPIC_API_URL"`
	GracefulShutdownTimeout    time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	HealthCheckInterval        time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`

	ZebedeeURL               string `envconfig:"ZEBEDEE_URL"`
	KeywordsLimit            int    `envconfig:"KEYWORDS_LIMITS"`
	DatasetAPIURL            string `envconfig:"DATASET_API_URL"`
	ServiceAuthToken         string `envconfig:"SERVICE_AUTH_TOKEN"            json:"-"`
	StopConsumingOnUnhealthy bool   `envconfig:"STOP_CONSUMING_ON_UNHEALTHY"`
	Kafka                    *Kafka
}

Config represents service configuration for dp-search-data-extractor

func Get

func Get() (*Config, error)

Get returns the default config with any modifications through environment variables

type Kafka added in v0.24.0

type Kafka struct {
	ContentUpdatedGroup       string   `envconfig:"KAFKA_CONTENT_UPDATED_GROUP"`
	ContentUpdatedTopic       string   `envconfig:"KAFKA_CONTENT_UPDATED_TOPIC"`
	ProducerTopic             string   `envconfig:"KAFKA_PRODUCER_TOPIC"`
	Addr                      []string `envconfig:"KAFKA_ADDR"`
	Version                   string   `envconfig:"KAFKA_VERSION"`
	OffsetOldest              bool     `envconfig:"KAFKA_OFFSET_OLDEST"`
	NumWorkers                int      `envconfig:"KAFKA_NUM_WORKERS"`
	SecProtocol               string   `envconfig:"KAFKA_SEC_PROTO"`
	SecCACerts                string   `envconfig:"KAFKA_SEC_CA_CERTS"            json:"-"`
	SecClientCert             string   `envconfig:"KAFKA_SEC_CLIENT_CERT"         json:"-"`
	SecClientKey              string   `envconfig:"KAFKA_SEC_CLIENT_KEY"          json:"-"`
	SecSkipVerify             bool     `envconfig:"KAFKA_SEC_SKIP_VERIFY"`
	MaxBytes                  int      `envconfig:"KAFKA_MAX_BYTES"`
	ConsumerMinBrokersHealthy int      `envconfig:"KAFKA_CONSUMER_MIN_BROKERS_HEALTHY"`
	ProducerMinBrokersHealthy int      `envconfig:"KAFKA_PRODUCER_MIN_BROKERS_HEALTHY"`
}

Kafka 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